这是渲染的地方
<el-form-item label="选择项目" :label-width="formLabelWidth" prop="report_project_idsArr">
<el-checkbox-group v-model="form.report_project_idsArr">
<el-checkbox v-for="item in projectList" :label="item.project_id" :key="item.project_id">{{item.project_name}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
这是data里的,report_project_ids是后台返回来的,他的格式是'[1,2]'这样的,report_project_idsArr是我转化成数组的格式[1,2]
form: {
report_name: "",
report_pinyin: "",
report_project_ids:'',
report_project_idsArr:[]
},
这是转化过程
let a = res.data.report_project_ids.replace('[','')
let b = a.replace(']','')
let stringResult = b.split(',').map(Number);
this.form = res.data
this.form.report_project_idsArr = stringResult
回显成功,但是无法再次点击,大佬们这个怎么搞
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…