36 lines
940 B
Plaintext
36 lines
940 B
Plaintext
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('详情')
|
||
}
|
||
}
|