如何将复选框的值绑定到多维数组

时间:2019-04-17 09:33:49

标签: vuejs2

当我单击复选框未传递他放置的值true时,我已经生成了绑定到多维数组的复选框

<div class="checkboxes">
    <div v-for="(role,index) in returnedroles" for="x">
        <span>{{role.name}}</span>
        <span v-for="(permission,index2) in permissions">
            {{permission.name}} <input type="checkbox" :value="permission.id" :id="permission.id" v-model="checkedpermissions[index][index2]">
        </span>
    </div>
</div>

0 个答案:

没有答案