fix : 修复所属公司选择框右侧的删除功能

This commit is contained in:
2024-06-18 16:45:19 +08:00
parent 506c794c5d
commit df513a91fe

View File

@@ -51,8 +51,7 @@
<el-empty :image-size="100" description="请点击左侧列表选择数据" v-show="selectList.length === 0"/>
<div v-for="(selectItem, selectIndex) in selectList" :key="selectIndex" class="org-item">
{{ selectItem.label }}
<el-icon @click="noSelected(selectItem)" size="20" style="margin-left: 10px;cursor: pointer;"
v-if="showCheckbox===false">
<el-icon @click="noSelected(selectItem)" size="20" style="margin-left: 10px;cursor: pointer;">
<CircleClose/>
</el-icon>
</div>
@@ -155,7 +154,6 @@ const show = () => {
getList()
};
const handleChange = (data, checked) => {
console.log('data, checked',data, checked)
// 左侧有选择框
// if (props.showCheckbox) {
// 左侧有选择框 + 多选
@@ -217,8 +215,8 @@ const noSelected = (selectItem) => {
//左侧无选择框时,右侧显示×
for (let i = 0; i < selectList.value.length; i++) {
if (selectList.value[i].value === selectItem.value) {
tree.value.setChecked(selectList.value[i].value,false);
selectList.value.splice(i, 1);
tree.value.setCheckedKeys(i);
break;
}
}