提交 da1f87e8 编写于 作者: 雪洛's avatar 雪洛

feat: web端启用resize-observer示例

上级 1753dd81
......@@ -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
......
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)
})
......
......@@ -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() {
......
......@@ -166,7 +166,7 @@
api: ["Element.takeSnapshot"]
},
// #endif
// #ifdef APP-ANDROID
// #ifdef APP-ANDROID || WEB
{
name: 'element大小变化监听',
url: 'resize-observer'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册