From b078ce77cf6ceaf3bc4b840de3f2354ea9d7584c Mon Sep 17 00:00:00 2001 From: yinjiacheng Date: Sat, 2 Mar 2024 20:29:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E7=8A=B6=E6=80=81=E6=A0=8F?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E8=89=B2=E7=9B=B8=E5=85=B3=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uni-navbar-lite/uni-navbar-lite.uvue | 2 +- pages.json | 25 +++------- ...gation-bar-color-custom-navigation.test.js | 49 ------------------- ...avigation-bar-color-custom-navigation.uvue | 48 ------------------ .../set-navigation-bar-color.uvue | 12 ----- 5 files changed, 7 insertions(+), 129 deletions(-) delete mode 100644 pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation.test.js delete mode 100644 pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation.uvue diff --git a/components/uni-navbar-lite/uni-navbar-lite.uvue b/components/uni-navbar-lite/uni-navbar-lite.uvue index b5063b97..0557dc07 100644 --- a/components/uni-navbar-lite/uni-navbar-lite.uvue +++ b/components/uni-navbar-lite/uni-navbar-lite.uvue @@ -66,7 +66,7 @@ mounted() { uni.setNavigationBarColor({ frontColor: "#000000", - backgroundColor: "#007aff", + backgroundColor: "#ffffff", }); }, methods: { diff --git a/pages.json b/pages.json index 2e9c8a85..6acb3d8e 100644 --- a/pages.json +++ b/pages.json @@ -380,13 +380,6 @@ "navigationBarTitleText": "设置导航条颜色" } }, - { - "path": "pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation", - "style": { - "navigationStyle": "custom", - "navigationBarTitleText": "设置状态栏颜色" - } - }, { "path": "pages/API/set-navigation-bar-title/set-navigation-bar-title", "style": { @@ -1087,8 +1080,7 @@ { "path": "pages/template/swiper-vertical-video/swiper-vertical-video", "style": { - "navigationStyle": "custom", - "navigationBarBackgroundColor": "transparent" + "navigationStyle": "custom" } }, // #ifdef APP @@ -1103,8 +1095,7 @@ "path": "pages/template/scroll-fold-nav/scroll-fold-nav", "style": { "navigationStyle": "custom", - "navigationBarTextStyle": "black", - "navigationBarBackgroundColor": "transparent" + "navigationBarTextStyle": "black" } }, { @@ -1136,16 +1127,14 @@ { "path": "pages/template/pull-zoom-image/pull-zoom-image", "style": { - "navigationStyle": "custom", - "navigationBarBackgroundColor": "transparent" + "navigationStyle": "custom" } }, { "path": "pages/template/navbar-lite/navbar-lite", "style": { "navigationBarTitleText": "自定义导航栏", - "navigationStyle": "custom", - "navigationBarBackgroundColor": "#007aff" + "navigationStyle": "custom" } }, { @@ -1187,16 +1176,14 @@ "path": "pages/webview-screenshot-comparison/webview-screenshot-comparison", "style": { "navigationBarTitleText": "截图对比测试", - "navigationStyle": "custom", - "navigationBarBackgroundColor": "transparent" + "navigationStyle": "custom" } }, { "path": "pages/webview-screenshot/webview-screenshot", "style": { "navigationBarTitleText": "webview 截图测试", - "navigationStyle": "custom", - "navigationBarBackgroundColor": "transparent" + "navigationStyle": "custom" } }, // #ifdef APP diff --git a/pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation.test.js b/pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation.test.js deleted file mode 100644 index 88dc5630..00000000 --- a/pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation.test.js +++ /dev/null @@ -1,49 +0,0 @@ -const CURRENT_PAGE_PATH = - '/pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation' - -describe('set statusBar color', () => { - if (process.env.uniTestPlatformInfo.startsWith('web')) { - it('dummyTest', async () => { - expect(1).toBe(1) - }) - return - } - - let page - const adbScreenShotArea = { - x: 880, - y: 0, - width: 60, - height: 60 - }; - if (process.env.uniTestPlatformInfo.startsWith('android 6')) { - adbScreenShotArea.x = 535 - adbScreenShotArea.width = 90 - adbScreenShotArea.height = 50 - } else if (process.env.uniTestPlatformInfo.startsWith('android 12')) { - adbScreenShotArea.x = 1160 - adbScreenShotArea.width = 70 - adbScreenShotArea.height = 80 - } - beforeAll(async () => { - page = await program.navigateTo(CURRENT_PAGE_PATH) - await page.waitFor(1000) - }) - - it("setNavigationBarColor1", async () => { - await page.callMethod("setNavigationBarColor1"); - const image = await program.screenshot({ - adb: true, - area: adbScreenShotArea - }); - expect(image).toMatchImageSnapshot(); - }); - it("setNavigationBarColor2", async () => { - await page.callMethod("setNavigationBarColor2"); - const image = await program.screenshot({ - adb: true, - area: adbScreenShotArea - }); - expect(image).toMatchImageSnapshot(); - }); -}) diff --git a/pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation.uvue b/pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation.uvue deleted file mode 100644 index 7ee0ee14..00000000 --- a/pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation.uvue +++ /dev/null @@ -1,48 +0,0 @@ - - - diff --git a/pages/API/set-navigation-bar-color/set-navigation-bar-color.uvue b/pages/API/set-navigation-bar-color/set-navigation-bar-color.uvue index 9d000011..c9a7816f 100644 --- a/pages/API/set-navigation-bar-color/set-navigation-bar-color.uvue +++ b/pages/API/set-navigation-bar-color/set-navigation-bar-color.uvue @@ -7,16 +7,9 @@ - - - - - @@ -73,11 +66,6 @@ uni.navigateTo({ url: '/pages/template/navbar-lite/navbar-lite' }) - }, - goCustomNavigation() { - uni.navigateTo({ - url: '/pages/API/set-navigation-bar-color/set-navigation-bar-color-custom-navigation' - }) } }, } -- GitLab