提交 ced3881d 编写于 作者: shutao-dc's avatar shutao-dc

update scroll-view-props.uvue 调整scroll-view父容器 可复现scroll-into-view跳转位置不准问题

上级 edab64c4
<template> <template>
<view class="page-scroll-view"> <view class="page-scroll-view">
<page-head title="非下拉刷新的scroll-view属性示例"></page-head> <page-head title="非下拉刷新的scroll-view属性示例"></page-head>
<view class="uni-margin-wrap">
<!-- 暂时分成两个方向不同的滚动视图,原因为:scroll-view组件不支持动态改变direction。 --> <!-- 暂时分成两个方向不同的滚动视图,原因为:scroll-view组件不支持动态改变direction。 -->
<scroll-view v-if="scrollX" direction="horizontal" :scroll-top="scrollTop" :scroll-left="scrollLeft" <scroll-view v-if="scrollX" direction="horizontal" :scroll-top="scrollTop" :scroll-left="scrollLeft"
:upper-threshold="upperThreshold" :lower-threshold="lowerThreshold" :scroll-into-view="scrollIntoView" :upper-threshold="upperThreshold" :lower-threshold="lowerThreshold" :scroll-into-view="scrollIntoView"
:enable-back-to-top="enableBackToTop" :scroll-with-animation="scrollWithAnimation" :enable-back-to-top="enableBackToTop" :scroll-with-animation="scrollWithAnimation"
style="flex-direction: row;width: 100%;height: 100%;" :show-scrollbar="showScrollbar" :bounces="bounces" style="flex-direction: row;" class="uni-margin-wrap" :show-scrollbar="showScrollbar" :bounces="bounces"
@scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower" @scroll="scroll" @scrollend="scrollend" @scrolltoupper="scrolltoupper" @scrolltolower="scrolltolower" @scroll="scroll" @scrollend="scrollend"
ref="scrollViewX" id="scrollViewX"> ref="scrollViewX" id="scrollViewX">
<view class="item" :id="'horizontal_'+item.id" v-for="(item,_) in items"> <view class="item" :id="'horizontal_'+item.id" v-for="(item,_) in items">
<text class="uni-text">{{item.label}}</text> <text class="uni-text">{{item.label}}</text>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view v-else direction="vertical" :scroll-top="scrollTop" :scroll-left="scrollLeft" <scroll-view v-else direction="vertical" :scroll-top="scrollTop" :scroll-left="scrollLeft"
:upper-threshold="upperThreshold" :lower-threshold="lowerThreshold" :scroll-into-view="scrollIntoView" :upper-threshold="upperThreshold" :lower-threshold="lowerThreshold" :scroll-into-view="scrollIntoView"
:enable-back-to-top="enableBackToTop" :scroll-with-animation="scrollWithAnimation" :enable-back-to-top="enableBackToTop" :scroll-with-animation="scrollWithAnimation"
:show-scrollbar="showScrollbar" :bounces="bounces" @scrolltoupper="scrolltoupper" @touchmove="onTouchMove" :show-scrollbar="showScrollbar" :bounces="bounces" @scrolltoupper="scrolltoupper" @touchmove="onTouchMove"
@scrolltolower="scrolltolower" @scroll="scroll" @scrollend="scrollend" ref="scrollViewY" id="scrollViewY" @scrolltolower="scrolltolower" @scroll="scroll" @scrollend="scrollend" ref="scrollViewY" id="scrollViewY"
style="width: 100%;height: 100%;"> class="uni-margin-wrap">
<view class="item" :id="item.id" v-for="(item,_) in items"> <view class="item" :id="item.id" v-for="(item,_) in items">
<text class="uni-text">{{item.label}}</text> <text class="uni-text">{{item.label}}</text>
</view> </view>
</scroll-view> </scroll-view>
</view>
<scroll-view class="uni-list" :showScrollbar="true" :scroll-y="true"> <scroll-view class="uni-list" :showScrollbar="true" :scroll-y="true">
<view class="uni-list-cell uni-list-cell-padding"> <view class="uni-list-cell uni-list-cell-padding">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册