vue-treeselect开启多选设置了默认值,不能删除,新添加的可以删除
<el-form-item label="下发部门" prop="depts">
<treeselect v-model="form.depts"
:options="deptOptions" :show-count="true"
:disabled="operate === 'details'"
:flat="true"
:multiple="true"
placeholder="请选择下发部门" />
</el-form-item>
this.form.depts = this.form.dept.split(',').map(id => Number(id));
需要将string类型的id值转换成Number类型的,要不然不能删除