From 780b68ee183d9e7e2ba3f5663ee4693b8f94ba84 Mon Sep 17 00:00:00 2001 From: XHY Date: Tue, 7 May 2024 15:47:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=BE=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=AE=B9=E5=99=A8=E8=83=8C=E6=99=AF=E8=89=B2=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 498489d825a95ad347b0f2e91ceb41b1beaad850) --- pages.json | 6 ++++ .../set-page-backgroundColorContent.test.js | 14 +++++++++ .../set-page-backgroundColorContent.uvue | 31 +++++++++++++++++++ pages/tabBar/API.uvue | 4 +++ 4 files changed, 55 insertions(+) create mode 100644 pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent.test.js create mode 100644 pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent.uvue diff --git a/pages.json b/pages.json index bc085520..d1d2f3f5 100644 --- a/pages.json +++ b/pages.json @@ -396,6 +396,12 @@ "navigationBarTitleText": "设置导航条标题" } }, + { + "path": "pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent", + "style": { + "navigationBarTitleText": "设置页面容器背景色" + } + }, { "path": "pages/API/navigator/new-page/new-page-1", "style": { diff --git a/pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent.test.js b/pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent.test.js new file mode 100644 index 00000000..74a4c5f6 --- /dev/null +++ b/pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent.test.js @@ -0,0 +1,14 @@ +describe('set-page-backgroundColorContent', () => { + let page + beforeAll(async () => { + page = await program.reLaunch('/pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent') + await page.waitFor(600); + }) + + it('check_backgroundColorContent_red', async () => { + await page.callMethod('changeColor', "") + page.waitFor(100) + const image = await program.screenshot({fullPage: true}); + expect(image).toSaveImageSnapshot(); + }) +}) diff --git a/pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent.uvue b/pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent.uvue new file mode 100644 index 00000000..a04d25eb --- /dev/null +++ b/pages/API/set-page-backgroundColorContent/set-page-backgroundColorContent.uvue @@ -0,0 +1,31 @@ + + + + + diff --git a/pages/tabBar/API.uvue b/pages/tabBar/API.uvue index f550acb3..b7d8853c 100644 --- a/pages/tabBar/API.uvue +++ b/pages/tabBar/API.uvue @@ -109,6 +109,10 @@ name: '设置导航条颜色', url: 'set-navigation-bar-color', }, + { + name: '设置页面容器背景色', + url: 'set-page-backgroundColorContent', + }, { name: '设置TabBar', url: 'set-tabbar', -- GitLab