🔄Update: AI Generate
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import { EmptyPagePathStack } from './view/EmptyPagePathStack';
|
||||
import { SecondPageSearch } from './view/SecondPageSearch';
|
||||
import { BMICalculator } from './pages/BMICalculator';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
private scroller: Scroller = new Scroller();
|
||||
@Provide('appPathStack') appPathStack: NavPathStack = new NavPathStack();
|
||||
@State title: string = 'page_title';
|
||||
|
||||
@Builder
|
||||
PageMap(name: string) {
|
||||
if (name === 'SearchPage') {
|
||||
SecondPageSearch()
|
||||
} else {
|
||||
EmptyPagePathStack()
|
||||
}
|
||||
}
|
||||
|
||||
build() {
|
||||
Navigation(this.appPathStack) {
|
||||
Column() {
|
||||
Scroll(this.scroller) {
|
||||
Column() {
|
||||
BMICalculator()
|
||||
}
|
||||
.width('100%')
|
||||
.justifyContent(FlexAlign.Start)
|
||||
.alignItems(HorizontalAlign.Start)
|
||||
}
|
||||
.scrollable(ScrollDirection.Vertical)
|
||||
.scrollBar(BarState.Off)
|
||||
.width('100%')
|
||||
}
|
||||
.backgroundColor('#F1F3F5')
|
||||
.height('100%')
|
||||
}
|
||||
.navDestination(this.PageMap)
|
||||
.hideTitleBar(true)
|
||||
.mode(NavigationMode.Stack)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user