diff --git a/pages.json b/pages.json index cefb9d2760741d3f49dd443e6b6f26d820546d9b..7242737488290f37f1592f7fb42bac580023ef83 100644 --- a/pages.json +++ b/pages.json @@ -1305,12 +1305,12 @@ "backgroundColorContent": "#fffae8" } } - // #ifdef APP-ANDROID + // #ifdef APP-ANDROID || WEB ,{ "path" : "pages/API/resize-observer/resize-observer", "style" : { - "navigationBarTitleText" : "resize0bserver" + "navigationBarTitleText" : "resize bserver" } }, // #endif diff --git a/pages/API/resize-observer/resize-observer.test.js b/pages/API/resize-observer/resize-observer.test.js index fb854f890a13ec371d0bd207a544ee235a3eefed..22160835196358c0332b10f71d7863294c9283e4 100644 --- a/pages/API/resize-observer/resize-observer.test.js +++ b/pages/API/resize-observer/resize-observer.test.js @@ -1,5 +1,8 @@ describe('api-resize-observer', () => { - if (!process.env.uniTestPlatformInfo.startsWith('android')) { + if ( + !process.env.uniTestPlatformInfo.startsWith('android') && + !process.env.uniTestPlatformInfo.startsWith('web') + ) { it('dummyTest', async () => { expect(1).toBe(1) }) diff --git a/pages/API/resize-observer/resize-observer.uvue b/pages/API/resize-observer/resize-observer.uvue index a03e7e32dd1d6a9be0f8c37286e9688aeb267615..d2377add5f940a4bcfabd86e00dacaefc8f84f28 100644 --- a/pages/API/resize-observer/resize-observer.uvue +++ b/pages/API/resize-observer/resize-observer.uvue @@ -70,14 +70,14 @@ methods: { innerBoxClick() { if (this.innerBoxElement != null) { - this.innerBoxElement!.style.setProperty("width", this.innerBoxElement!.offsetWidth + this.offset) - this.innerBoxElement!.style.setProperty("height", this.innerBoxElement!.offsetWidth + this.offset) + this.innerBoxElement!.style.setProperty("width", this.innerBoxElement!.offsetWidth + this.offset + 'px') + this.innerBoxElement!.style.setProperty("height", this.innerBoxElement!.offsetWidth + this.offset + 'px') } }, outBoxClick() { if (this.outBoxElement != null) { - this.outBoxElement!.style.setProperty("width", this.outBoxElement!.offsetWidth + this.offset) - this.outBoxElement!.style.setProperty("height", this.outBoxElement!.offsetWidth + this.offset) + this.outBoxElement!.style.setProperty("width", this.outBoxElement!.offsetWidth + this.offset + 'px') + this.outBoxElement!.style.setProperty("height", this.outBoxElement!.offsetWidth + this.offset + 'px') } }, revertBoxSize() { diff --git a/pages/tabBar/API.uvue b/pages/tabBar/API.uvue index 5d23df706f9845b51ae83b2a7089539cf304631d..f3d312fb01d5361409b2fcf6991757d0e0289c26 100644 --- a/pages/tabBar/API.uvue +++ b/pages/tabBar/API.uvue @@ -166,7 +166,7 @@ api: ["Element.takeSnapshot"] }, // #endif - // #ifdef APP-ANDROID + // #ifdef APP-ANDROID || WEB { name: 'element大小变化监听', url: 'resize-observer'