From 4cd149d3b06d3e4d273b4c47cbce992d3aa86263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Wed, 20 Nov 2024 19:41:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20setPageStyle=E3=80=81getPageStyle?= =?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/get-current-pages/get-current-pages.test.js | 4 ++++ pages/API/get-current-pages/get-current-pages.uvue | 7 ++++--- .../set-page-style-disable-pull-down-refresh.test.js | 5 ++++- pages/API/get-window-info/window-area.uvue | 2 ++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pages/API/get-current-pages/get-current-pages.test.js b/pages/API/get-current-pages/get-current-pages.test.js index 962be6d8..5e749c42 100644 --- a/pages/API/get-current-pages/get-current-pages.test.js +++ b/pages/API/get-current-pages/get-current-pages.test.js @@ -26,6 +26,10 @@ describe('getCurrentPages', () => { const data = await page.data() expect(data.checked).toBe(true) }) + + if (process.env.uniTestPlatformInfo.startsWith('mp')) { + return + } it('page-style', async () => { await page.callMethod('getPageStyle') await page.waitFor(200) diff --git a/pages/API/get-current-pages/get-current-pages.uvue b/pages/API/get-current-pages/get-current-pages.uvue index a81d30e1..da350afc 100644 --- a/pages/API/get-current-pages/get-current-pages.uvue +++ b/pages/API/get-current-pages/get-current-pages.uvue @@ -25,8 +25,8 @@ - - + + + + diff --git a/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.test.js b/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.test.js index dbd15e35..c8c27141 100644 --- a/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.test.js +++ b/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh.test.js @@ -1,7 +1,10 @@ const PAGE_PATH = '/pages/API/get-current-pages/set-page-style-disable-pull-down-refresh' describe('getCurrentPages', () => { - if (process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios')) { + if ( + process.env.uniTestPlatformInfo.toLowerCase().startsWith('ios') || + process.env.uniTestPlatformInfo.startsWith('mp') + ) { it('not-support', async () => { expect(1).toBe(1) }) diff --git a/pages/API/get-window-info/window-area.uvue b/pages/API/get-window-info/window-area.uvue index 1be2b95f..9c206d5a 100644 --- a/pages/API/get-window-info/window-area.uvue +++ b/pages/API/get-window-info/window-area.uvue @@ -105,8 +105,10 @@ onReady(() => { const pages = getCurrentPages(); + // #ifndef MP isStatusBarShow.value = !(pages[pages.length - 1].getPageStyle()['hideStatusBar'] as boolean); isBottomNavigationIndicatorShow.value = !(pages[pages.length - 1].getPageStyle()['hideBottomNavigationIndicator'] as boolean); + // #endif getWindowInfo(); }); -- GitLab