uni-app项目中左右两级列表联动功能

本文介绍了如何在uni-app框架下开发左右两级联动的列表功能,详细讲解了实现步骤,包括数据处理、事件监听和组件交互,帮助开发者创建更复杂的移动端应用交互体验。
摘要由CSDN通过智能技术生成

效果图

<template>
	<view class="proClass flex-row" :style="proClassStyle">
		<!-- 加载动画 -->
		<loading :isShow="isloadingShow"></loading>
		
		<!-- 左侧一级分类列表 -->
		<scroll-view scroll-y class="primaryScroll flex-1 height-100" 
		:scroll-top="primaryScrollTop">
			<block v-for="(item,index) in primaryItemData">
				<view class="primaryItem padding-y-10" 
				@tap="primaryItemActive(index)"
				>
					<view class="padding-y-10 text-center primaryContent" 
					:class="activeIndex===index?'activePrimaryContent':''">
						{
   {
   item.primary_name}}
					</view>
				</view>	
			</block>			
		</scroll-view>
		
		<!-- 右侧二级分类列表 -->
		<scroll-view scroll-y class="flex-3 height-100" 
		:scroll-top="secondaryScrollTop" 
		scroll-with-animation 
		@scroll="secondaryScroll"
		>
			<block v-for="(item,index) in secondaryItemData">
				<view class="secondaryItemContainer" 
				:style="{minHeight:minHeightValue}"
				>
					<view class="scondaryItem row">
						<view class=&#
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值