企业🤖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; } }, ```