|
|
@@ -0,0 +1,57 @@
|
|
|
+import { SeatingPlanPageViewModel } from '../viewModel/SeatingPlanPageViewModel';
|
|
|
+import { window } from '@kit.ArkUI';
|
|
|
+
|
|
|
+@ComponentV2
|
|
|
+struct SeatingPlanPage {
|
|
|
+ @Local vm: SeatingPlanPageViewModel = new SeatingPlanPageViewModel(this.getUIContext());
|
|
|
+
|
|
|
+ aboutToAppear() {
|
|
|
+ window.getLastWindow(this.getUIContext().getHostContext())
|
|
|
+ .then(res => {
|
|
|
+ res.setPreferredOrientation(window.Orientation.LANDSCAPE)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ aboutToDisappear(): void {
|
|
|
+ this.vm._onBackPressed()
|
|
|
+ }
|
|
|
+
|
|
|
+ build() {
|
|
|
+ NavDestination() {
|
|
|
+ Column() {
|
|
|
+ Column(){
|
|
|
+ List({space: 4}){
|
|
|
+ ForEach(this.vm.dataSource, (item: number, index) => {
|
|
|
+ ListItem(){
|
|
|
+ Text('四个字的人')
|
|
|
+ .width('100%')
|
|
|
+ .fontSize(14)
|
|
|
+ .borderRadius(15)
|
|
|
+ .border({width: 1, color: item == 1 ? '#7186F9' : '#FB9BC1'})
|
|
|
+ .padding({top: 7, bottom: 7})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ .scrollBar(BarState.Off)
|
|
|
+ }
|
|
|
+ .width(95)
|
|
|
+ .height('100%')
|
|
|
+ .padding({top: 6, bottom: 6, left: 8, right: 8})
|
|
|
+ }
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
+ }
|
|
|
+ .hideTitleBar(true)
|
|
|
+ .onBackPressed(() => { return this.vm._onBackPressed() })
|
|
|
+ .padding({ left: this.vm.safeTop })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@Builder
|
|
|
+function SeatingPlanPageBuilder() {
|
|
|
+ SeatingPlanPage()
|
|
|
+}
|