diff --git a/pages/component/scroll-view/scroll-view-props.uvue b/pages/component/scroll-view/scroll-view-props.uvue index 0b721f4d66534942b8e0a571a86dfea033072bb9..aa1140f2cfedf35d50e2a2342f11f5c95589a418 100644 --- a/pages/component/scroll-view/scroll-view-props.uvue +++ b/pages/component/scroll-view/scroll-view-props.uvue @@ -12,10 +12,11 @@ {{item.label}} - {{item.label}} @@ -38,7 +39,11 @@ 是否横向滚动 - + + + + 是否竖向滚动 + @@ -86,7 +91,8 @@ data() { return { items: [] as Item[], - scrollX: false, + scrollX: false, + scrollY: true, rebound: false, scrollTop: 0, scrollLeft: 0, @@ -115,10 +121,21 @@ handleChangeScrollTop(e : SliderChangeEvent) { this.scrollTop = e.detail.value; }, - changeDirection() { - this.scrollX = !this.scrollX; + changeDirectionX() { + this.scrollX = !this.scrollX; + if(this.scrollX) { + this.scrollY = false + } this.scrollTop = 0; this.scrollLeft = 0; + }, + changeDirectionY() { + this.scrollY = !this.scrollY; + if(this.scrollY) { + this.scrollX = false + } + this.scrollTop = 0; + this.scrollLeft = 0; }, handleScrollIntoView() { if (this.scrollX) { @@ -160,6 +177,9 @@ scrollend() { console.log("滚动停止"); }, + onTouchMove() { + console.log("TouchMove"); + }, //自动化测试专用 checkScrollHeight(): Boolean { var element = this.$refs["scrollViewY"]