vue如何实现checkbox回显效果
1. 当我选中多选框,点击确定后,再打开弹框,如何让之前选中的值回显到页面上。2. 给遍历的元素 双向绑定 v-model="businessregion.checked"<template v-if="businessregionList.length > 0"><template v-for=&q
·
1.
当我选中多选框,点击确定后,再打开弹框,如何让之前选中的值回显到页面上。
2. 给遍历的元素 双向绑定 v-model="businessregion.checked"
<template v-if="businessregionList.length > 0">
<template v-for="businessregion in businessregionList">
<dd>
<input type="checkbox" name="businessregion" class="businessregion" :data-id="businessregion.businessregionCode" v-model="businessregion.checked"/>
<label for="city4">{{businessregion.businessregionName}}</label>
</dd>
</template>
</template>
3.就很容易的实现多选框回显了
更多推荐
已为社区贡献2条内容
所有评论(0)