diff --git a/pages.json b/pages.json
index 8a9093eea7715fe49cd61c59e61857f467e3c77e..d7807b92800781512e689e2a68151d4e7300ec9d 100644
--- a/pages.json
+++ b/pages.json
@@ -1279,7 +1279,16 @@
"navigationBarTitleText" : "",
"backgroundColorContent": "#fffae8"
}
- }
+ },
+ // #endif
+ // #ifdef APP-ANDROID
+ {
+ "path" : "pages/API/resize-observer/resize-observer",
+ "style" :
+ {
+ "navigationBarTitleText" : "resize0bserver"
+ }
+ },
// #endif
],
"globalStyle": {
diff --git a/pages/API/resize-observer/resize-observer.test.js b/pages/API/resize-observer/resize-observer.test.js
new file mode 100644
index 0000000000000000000000000000000000000000..eee1bcdcef692429f2560530ddfda2364dfe5921
--- /dev/null
+++ b/pages/API/resize-observer/resize-observer.test.js
@@ -0,0 +1,20 @@
+describe('api-resize-observer', () => {
+ if (!process.env.uniTestPlatformInfo.startsWith('android')) {
+ it('dummyTest', async () => {
+ expect(1).toBe(1)
+ })
+ return
+ }
+
+ let page
+ beforeAll(async () => {
+ page = await program.reLaunch('/pages/API/resize-observer/resize-observer')
+ await page.waitFor('button')
+ })
+
+ it('check_resize-observer', async () => {
+ await page.waitFor(600)
+ const image = await program.screenshot();
+ expect(image).toSaveImageSnapshot();
+ })
+})
diff --git a/pages/API/resize-observer/resize-observer.uvue b/pages/API/resize-observer/resize-observer.uvue
new file mode 100644
index 0000000000000000000000000000000000000000..14b258a37e16b7b29ad9e4a3295afcea0638466b
--- /dev/null
+++ b/pages/API/resize-observer/resize-observer.uvue
@@ -0,0 +1,88 @@
+
+
+ 点击蓝色或红色方块区域会修改元素宽高
+
+
+
+
+
+
+
+ 蓝色方块元素:
+
+ {{outBoxSizeInfo}}
+
+ 红色方块元素:
+
+ {{innerBoxSizeInfo}}
+
+
+
+
+
+
+
+
diff --git a/pages/tabBar/API.uvue b/pages/tabBar/API.uvue
index dc5a9c355acb5860fd43335b19693e9cebae9530..f550acb35b3590a4a46d497a01f27fcc8adaabef 100644
--- a/pages/tabBar/API.uvue
+++ b/pages/tabBar/API.uvue
@@ -160,6 +160,12 @@
api: ["Element.takeSnapshot"]
},
// #endif
+ // #ifdef APP-ANDROID
+ {
+ name: 'element大小变化监听',
+ url: 'resize-observer'
+ },
+ // #endif
{
name: 'node节点',
url: 'nodes-info',