ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` <template> <view> <u-cell-group> <u-cell-item title="多选" :arrow="false"> <u-checkbox-group @change="checkboxGroupChange"> <u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in group" :key="index" :name="item.Id" >{{item.name}}</u-checkbox> </u-checkbox-group> </u-cell-item> </u-cell-group> </view> </template> ``` ``` // 选中某个复选框时,由checkbox时触发 checkboxChange(e) { console.log(e); }, // 选中任一checkbox时,由checkbox-group触发 checkboxGroupChange(e) { console.log(e); }, ``` ``` onLoad() { var values = this.checkboxValues; for (var i = 0, lenI = values.length; i < lenI; ++i) { this.list[i].checked = true; } }, ```