提交 ea157ded 编写于 作者: Anne_LXM's avatar Anne_LXM

test(scroll-view): 支持 iOS 端测试

上级 6db1c7cd
......@@ -43,7 +43,7 @@
},
methods: {
onRefresherrefresh(e : UniRefresherEvent)) {
onRefresherrefresh(e : UniRefresherEvent) {
this.refresherrefresh = true
console.log("onRefresherrefresh------下拉刷新触发")
this.checkEventTest({
......@@ -58,7 +58,7 @@
this.refresherTriggered = false
}, 1500)
},
onRefresherabort(e : UniRefresherEvent)) {
onRefresherabort(e : UniRefresherEvent) {
console.log("onRefresherabort------下拉刷新被中止")
this.checkEventTest({
type:e.type,
......@@ -67,7 +67,7 @@
dy:e.detail.dy,
} as RefresherEventTest,'refresherabort')
},
onRefresherrestore(e : UniRefresherEvent)) {
onRefresherrestore(e : UniRefresherEvent) {
this.refresherrefresh = false
console.log("onRefresherrestore------下拉刷新被复位")
this.checkEventTest({
......@@ -77,7 +77,7 @@
dy:e.detail.dy,
} as RefresherEventTest,'refresherrestore')
},
onRefresherpulling(e : UniRefresherEvent)) {
onRefresherpulling(e : UniRefresherEvent) {
console.log("onRefresherpulling------拉刷新控件被下拉-dy=" + e.detail.dy)
this.checkEventTest({
type:e.type,
......
......@@ -32,7 +32,7 @@ describe('component-native-scroll-view', () => {
expect(topScrollDetail.scrollHeight).toBeGreaterThan(0)
expect(topScrollDetail.scrollWidth).toBeGreaterThan(0)
expect(topScrollDetail.deltaX).toBe(0)
expect(topScrollDetail.deltaY).toBe(-100)
expect(topScrollDetail.deltaY).not.toBe(0)
}
expect(await page.data('isScrollTest')).toBe('scroll:Success')
})
......
......@@ -11,7 +11,7 @@
</view>
<view>
<scroll-view :scroll-top="scrollTop" direction="vertical" class="scroll-Y" scroll-with-animation="true"
@scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" :show-scrollbar="showScrollbar">
@scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" @scrollend="end" :show-scrollbar="showScrollbar">
<view class="scroll-view-item uni-bg-red"><text class="text">A</text></view>
<view class="scroll-view-item uni-bg-green"><text class="text">B</text></view>
<view class="scroll-view-item uni-bg-blue"><text class="text">C</text></view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册