Advertisement

uni-app(七)商城右侧列表分类展示

阅读量:

构建一个演示示例,其中右侧展示了一个可滚动的列表,当用户点击列表中的某一项时,右侧的视图内容将随之发生相应的变化。

从页面结构的角度分析,整体可分为两个区域,即左侧视图与右侧视图。由于右侧内容为滚动列表形式,因此左侧采用scroll-View组件进行布局,而右侧则可根据实际需求自行设计。在本例中,右侧同样使用了scroll-View组件实现功能。

复制代码
 <template>

    
 	<view>
    
 		<view class="pric">
    
  
    
 			<scroll-view scroll-y="true" class="leftView">
    
 				<view v-for="(item,index) in leftList" :key="index" @tap="idexActive(index)"
    
 					>{{item}}</view>
    
 			</scroll-view>
    
 			<scroll-view scroll-y="true" class="rightView">
    

全部评论 (0)

还没有任何评论哟~