Commit 4fd2051bc0403bfc5345ed6a5fc283a372ef7a92
1 parent
a96cb250
fix(table): settings indeterminate state effect
修复存在操作列的情况下,表格设置组件中的半选状态显示不正确的问题
Showing
1 changed file
with
2 additions
and
4 deletions
src/components/Table/src/components/settings/ColumnSetting.vue
@@ -200,7 +200,7 @@ | @@ -200,7 +200,7 @@ | ||
200 | const columns = getColumns(); | 200 | const columns = getColumns(); |
201 | 201 | ||
202 | const checkList = table | 202 | const checkList = table |
203 | - .getColumns() | 203 | + .getColumns({ ignoreAction: true }) |
204 | .map((item) => { | 204 | .map((item) => { |
205 | if (item.defaultHidden) { | 205 | if (item.defaultHidden) { |
206 | return ''; | 206 | return ''; |
@@ -244,9 +244,7 @@ | @@ -244,9 +244,7 @@ | ||
244 | const indeterminate = computed(() => { | 244 | const indeterminate = computed(() => { |
245 | const len = plainOptions.value.length; | 245 | const len = plainOptions.value.length; |
246 | let checkdedLen = state.checkedList.length; | 246 | let checkdedLen = state.checkedList.length; |
247 | - if (unref(checkIndex)) { | ||
248 | - checkdedLen--; | ||
249 | - } | 247 | + unref(checkIndex) && checkdedLen--; |
250 | return checkdedLen > 0 && checkdedLen < len; | 248 | return checkdedLen > 0 && checkdedLen < len; |
251 | }); | 249 | }); |
252 | 250 |