@yoooloo42/joker 1.0.138 → 1.0.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -41447,7 +41447,11 @@ const hdl = {
41447
41447
  },
41448
41448
  // 全选
41449
41449
  checkedAll(val) {
41450
- itemsChecked = val ? hdl.getKeys(tableProps_box.table.pickCol.colsInit) : [];
41450
+ itemsChecked.splice(0, itemsChecked.length);
41451
+ if (val) {
41452
+ // 正确:重新填充数组,保持响应性
41453
+ itemsChecked.push(...hdl.getKeys(tableProps_box.table.pickCol.colsInit));
41454
+ }
41451
41455
  isIndeterminate.value = !val;
41452
41456
  },
41453
41457
  // 选中或取消某一条
@@ -41480,11 +41484,19 @@ const hdl = {
41480
41484
 
41481
41485
  // 窗口弹出监听
41482
41486
  watch(
41483
- ref(tableProps_box.table.pickCol.popup.visible),
41487
+ () => tableProps_box.table.pickCol.popup.visible,
41484
41488
  (newVal, oldVal) => {
41485
41489
  if (newVal) {
41486
- checkedAll.value = tableProps_box.table.cols.length === tableProps_box.table.pickCol.colsInit.length;
41487
- isIndeterminate.value = tableProps_box.table.cols.length !== tableProps_box.table.pickCol.colsInit.length;
41490
+ if(tableProps_box.table.cols.length > 0 && val.length === tableProps_box.table.pickCol.colsInit.length){
41491
+ checkedAll.value = true;
41492
+ isIndeterminate.value = false;
41493
+ }else if(tableProps_box.table.cols.length > 0 && val.length !== tableProps_box.table.pickCol.colsInit.length){
41494
+ checkedAll.value = false;
41495
+ isIndeterminate.value = true;
41496
+ }else if(tableProps_box.table.cols.length === 0){
41497
+ checkedAll.value = false;
41498
+ isIndeterminate.value = false;
41499
+ }
41488
41500
  itemsChecked = hdl.getKeys(tableProps_box.table.cols);
41489
41501
  }
41490
41502
  }