</el-checkbox-group>   indexContentArr:[
    {label: '本期', value:'0'},
    {label: '本期排名', value:'1'},
    {label: '同期', value:'2'},
    {label: '同期排名', value:'3'},
    {label: '同比', value:'4'}
  ],     存在indexContent中为什么是label内容:在el-checkbox-button中使用了label属性来绑定每个选项的值,所以当选中某个选项时,该选项的value值会被存储在v-model绑定的formData.indexContent中。由于label属性绑定的是item.label,所以存储在indexContent中的值是选中选项的label值。
Vue.js 中 el-checkbox-group 组件的使用和数据绑定

原文地址: https://www.cveoy.top/t/topic/qyGb 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录