uniapp checkbox 优化多选

			changeAccidentType(e){
				console.log('e:',e);
				console.log(e.detail.data)
				this.form.accidentType = []
				e.detail.data.forEach((item,index) => {
					console.log(item.text)
					this.form.accidentType.push(item.text)
				})
				
			},
		<u-popup v-model="accidentTypeShow" mode='bottom'>
			<uni-data-checkbox multiple v-model="value" :localdata="range" @change="changeAccidentType" mode='tag'></uni-data-checkbox>
		</u-popup>
			<u-form-item label="事故类型" prop="accidentType" label-width="150">
				<block v-for='(item,index) in form.accidentType' :index='index' :key='key'>
					<u-tag :text="item" shape="square" />
				</block>				
				<u-input placeholder="请点击选择事故类型" :disabled="true" @click='accidentTypeShow = true' />
			</u-form-item>

posted @   盘思动  阅读(690)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
历史上的今天:
2021-09-15 shell 删除文件夹内内容
点击右上角即可分享
微信分享提示