您好,欢迎来到华佗小知识。
搜索
您的当前位置:首页uniapp利用scroll-view实现左边按钮定位右边页面滚动

uniapp利用scroll-view实现左边按钮定位右边页面滚动

来源:华佗小知识

前言:如果左边数据少的话其实可以不用scroll-view,直接弄出一块一块可以点击的就行,我这里是数据还没有确定,所以需要写个scroll-view提前准备,因为数据多和少都可以使用scroll-view

-----------------------------------------------------无情的分割线-------------------------------------------------------

1.首先我们准备一个容器(flex布局)包裹住两边scroll-view,然后分为左右两块:先写左边

<view class="left">
<scroll-view scroll-y="true" class="sll" :scroll-into-view="'tab'+tab">
<view class="item" v-for="(item,index) in leftlist" :key="item.id" :class="idx==index?'choose':'item'" @click="clksc(index)" :id="'tab'+index">
<view class="small" v-show="idx==index"></view>	<view class="fontt">{
  {item.name}}
</view>
</view>
</scroll-view&g

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- huatuo0.cn 版权所有 湘ICP备2023017654号-2

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务