el-checkbox参数动态设置,el-checkbox-group动态设置v-model,未勾选成功。

1.<template>
	<el-checkbox-group 
				v-model="ruleForm.values"
	             class="m-el-checkbox-group" >
	              <el-checkbox
	                v-for="item in ruleForm.list"
	                :label="item.key"
	                :key="item.key"
	                disabled
	                >{{ item.value }}</el-checkbox
	              >
	   </el-checkbox-group>
   </template>
   <script>
			export default {
			  name: ",
			  components: { },
			  data() {
			    return {
			      ruleForm: {},
			    };
			  },
			  created() {
				  this.ruleForm.list=[{
				      	key:1,
				      	value:'list1'
				     }];
				  this.$set(this.ruleForm, "values", [1]);// 深入式响应原理
			  },
			}
</script>

你可能感兴趣的:(vue)