From f59c79da39b7565fab664fdb51630d09d5ef79ad Mon Sep 17 00:00:00 2001 From: songqq0825 Date: Tue, 1 Aug 2023 10:21:53 +0000 Subject: [PATCH] =?UTF-8?q?showSideBar=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: songqq0825 --- .../typical-layout-scenario.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/zh-cn/application-dev/key-features/multi-device-app-dev/typical-layout-scenario.md b/zh-cn/application-dev/key-features/multi-device-app-dev/typical-layout-scenario.md index 78e8fced82..0817e2f588 100644 --- a/zh-cn/application-dev/key-features/multi-device-app-dev/typical-layout-scenario.md +++ b/zh-cn/application-dev/key-features/multi-device-app-dev/typical-layout-scenario.md @@ -354,16 +354,10 @@ struct MultiLaneList { struct SideBarSample { @StorageLink('currentBreakpoint') private currentBreakpoint: string = "md"; private breakpointSystem: BreakpointSystem = new BreakpointSystem() - @State showSideBar: boolean = false @State selectIndex: number = 0; aboutToAppear() { - this.breakpointSystem.register() - if (this.currentBreakpoint === 'sm') { - this.showSideBar = false - } else { - this.showSideBar = true - } + this.breakpointSystem.register() } aboutToDisappear() { @@ -382,9 +376,6 @@ struct SideBarSample { .height(36) .onClick(() => { this.selectIndex = index - if (this.currentBreakpoint === 'sm') { - this.showSideBar = false - } }) } @@ -412,9 +403,8 @@ struct SideBarSample { .maxSideBarWidth(this.currentBreakpoint === 'sm' ? '100%' : '33.33%') .showControlButton(this.currentBreakpoint === 'sm') .autoHide(false) - .showSideBar(this.showSideBar) .onChange((isBarShow: boolean) => { - this.showSideBar = isBarShow + }) } } -- GitLab