fix(仪表板): 过滤组件多选时,进行输入搜索选项,会把之前勾选的清空

This commit is contained in:
dataeaseShu 2024-03-18 14:10:58 +08:00
parent 878cac2434
commit 15ccc06d6f
4 changed files with 8 additions and 2 deletions

View File

@ -52,6 +52,7 @@
class="tree-select-all" class="tree-select-all"
><el-checkbox ><el-checkbox
v-model="selectAll" v-model="selectAll"
class="is-tree-select"
:indeterminate="isIndeterminate" :indeterminate="isIndeterminate"
@change="selectAllChange" @change="selectAllChange"
>{{ $t('dataset.check_all') }}</el-checkbox></p> >{{ $t('dataset.check_all') }}</el-checkbox></p>
@ -595,7 +596,7 @@ export default {
padding: 10px 20px 0 24px; padding: 10px 20px 0 24px;
} }
.tree-select-all .el-checkbox__label { .tree-select-all .el-checkbox__label {
color: var(--SelectTreeColor, #606266); color: var(--SelectTreeColor, #606266) !important;
} }
[aria-disabled='true'] > .el-tree-node__content { [aria-disabled='true'] > .el-tree-node__content {
color: inherit !important; color: inherit !important;

View File

@ -19,6 +19,7 @@
> >
<el-checkbox <el-checkbox
v-model="selectAll" v-model="selectAll"
class="is-tree-select"
v-customStyle="customStyle" v-customStyle="customStyle"
:indeterminate="isIndeterminate" :indeterminate="isIndeterminate"
@change="selectAllChange" @change="selectAllChange"

View File

@ -317,6 +317,10 @@ export default {
this.refreshOptions() this.refreshOptions()
}, 1000), }, 1000),
filterMethod(key) { filterMethod(key) {
if (!key && !this.keyWord) {
this.keyWord = key
return
}
this.keyWord = key this.keyWord = key
this.searchWithKey() this.searchWithKey()
}, },

View File

@ -829,7 +829,7 @@ div:focus {
} }
.el-checkbox__input.is-checked:not(.is-disabled)+.el-checkbox__label { .el-checkbox:not(.is-tree-select) .el-checkbox__input.is-checked:not(.is-disabled)+.el-checkbox__label {
color: #1F2329 !important; color: #1F2329 !important;
} }