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

feat: 调整示例与测试例适配web端

上级 14cd48c9
...@@ -79,6 +79,8 @@ describe('ExtApi-Request', () => { ...@@ -79,6 +79,8 @@ describe('ExtApi-Request', () => {
await request(page, 'HEAD'); await request(page, 'HEAD');
}); });
if (process.env.uniTestPlatformInfo.indexOf('web') === -1) {
it('Check Set Cookie', async () => { it('Check Set Cookie', async () => {
res = await page.callMethod('jest_set_cookie') res = await page.callMethod('jest_set_cookie')
await page.waitFor(500); await page.waitFor(500);
...@@ -91,4 +93,5 @@ describe('ExtApi-Request', () => { ...@@ -91,4 +93,5 @@ describe('ExtApi-Request', () => {
res = await page.data('jest_result'); res = await page.data('jest_result');
expect(res).toBe(true) expect(res).toBe(true)
}); });
}
}); });
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<text>position: relative</text> <text>position: relative</text>
<scroll-view <scroll-view
style="width: 500rpx; height: 500rpx; background-color: gray" style="width: 500rpx; height: 500rpx; background-color: gray"
scroll-y="true"
> >
<view <view
style="width: 100rpx; height: 100rpx; background-color: red" style="width: 100rpx; height: 100rpx; background-color: red"
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
<text>position: absolute</text> <text>position: absolute</text>
<scroll-view <scroll-view
style="width: 500rpx; height: 500rpx; background-color: gray" style="width: 500rpx; height: 500rpx; background-color: gray"
scroll-y="true"
> >
<view <view
style="width: 100rpx; height: 100rpx; background-color: red" style="width: 100rpx; height: 100rpx; background-color: red"
...@@ -77,6 +79,7 @@ ...@@ -77,6 +79,7 @@
<text>position: fixed</text> <text>position: fixed</text>
<scroll-view <scroll-view
style="width: 500rpx; height: 500rpx; background-color: gray" style="width: 500rpx; height: 500rpx; background-color: gray"
scroll-y="true"
> >
<view <view
style="width: 100rpx; height: 100rpx; background-color: red" style="width: 100rpx; height: 100rpx; background-color: red"
......
<template> <template>
<scroll-view class="page"> <scroll-view class="page" scroll-y="true">
<view class="trace"> <view class="trace">
<view class="base reserve"> <view class="base reserve">
......
<template> <template>
<scroll-view class="page"> <scroll-view class="page" scroll-y="true">
<view class="trace"> <view class="trace">
<view class="base reserve"> <view class="base reserve">
<text class="reserve-text">scaleX(0.6)</text> <text class="reserve-text">scaleX(0.6)</text>
......
<template> <template>
<scroll-view class="page"> <scroll-view class="page" scroll-y="true">
<view class="trace"> <view class="trace">
<view class="base reserve"> <view class="base reserve">
<text class="reserve-text">translateX(80%)</text> <text class="reserve-text">translateX(80%)</text>
......
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
propertyChangeBackground() { propertyChangeBackground() {
if (!this.isSetTransition) { if (!this.isSetTransition) {
this.propertyStyleBackground?.style?.setProperty("transition-property", "background-color") this.propertyStyleBackground?.style?.setProperty("transition-property", "background-color")
this.propertyStyleBackground?.style?.setProperty("transition-duration", "1000") this.propertyStyleBackground?.style?.setProperty("transition-duration", "1000ms")
this.isSetTransition = true this.isSetTransition = true
} }
this.propertyStyleBackground?.style?.setProperty("background-color", this.isTransitionpropertystyleBackground this.propertyStyleBackground?.style?.setProperty("background-color", this.isTransitionpropertystyleBackground
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册