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.就很容易的实现多选框回显了

本文介绍了一种使用Vue.js实现多选框选中值回显的方法。通过给每个选项绑定v-model来记录选中状态,当再次打开选择框时能够保留之前的选中状态。
3552

被折叠的 条评论
为什么被折叠?



