feat(entry): 建立 MVVM+data 分层骨架,接入 V2 状态管理与 Navigation 路由

This commit is contained in:
AndyChen1024
2026-09-11 16:22:45 +08:00
parent 3a116df871
commit 058b978f25
11 changed files with 336 additions and 33 deletions

View File

@@ -0,0 +1,35 @@
import { AppColor, AppSpacing, AppFontSize, AppButton } from 'uikit';
import { AppRouter } from '../router/AppRouter';
/**
* 详情页:NavDestination 页面,演示 Navigation 路由与 @Param 入参。
*/
@ComponentV2
export struct DetailPage {
@Param title: string = '';
build() {
NavDestination() {
Column({ space: AppSpacing.md }) {
Text(this.title)
.fontSize(20)
.fontWeight(FontWeight.Bold)
.fontColor(AppColor.textPrimary)
Text('这是一个 NavDestination 页面,用于演示 Navigation 路由。')
.fontSize(AppFontSize.body)
.fontColor(AppColor.textSecondary)
AppButton({
text: '返回',
onTap: () => {
AppRouter.pop();
}
})
}
.width('100%')
.height('100%')
.padding(AppSpacing.lg)
.backgroundColor(AppColor.background)
}
.title('详情')
}
}