@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.cjs.js CHANGED
@@ -41451,7 +41451,11 @@ const hdl = {
41451
41451
  },
41452
41452
  // 全选
41453
41453
  checkedAll(val) {
41454
- itemsChecked = val ? hdl.getKeys(tableProps_box.table.pickCol.colsInit) : [];
41454
+ itemsChecked.splice(0, itemsChecked.length);
41455
+ if (val) {
41456
+ // 正确:重新填充数组,保持响应性
41457
+ itemsChecked.push(...hdl.getKeys(tableProps_box.table.pickCol.colsInit));
41458
+ }
41455
41459
  isIndeterminate.value = !val;
41456
41460
  },
41457
41461
  // 选中或取消某一条
@@ -41484,11 +41488,19 @@ const hdl = {
41484
41488
 
41485
41489
  // 窗口弹出监听
41486
41490
  vue.watch(
41487
- vue.ref(tableProps_box.table.pickCol.popup.visible),
41491
+ () => tableProps_box.table.pickCol.popup.visible,
41488
41492
  (newVal, oldVal) => {
41489
41493
  if (newVal) {
41490
- checkedAll.value = tableProps_box.table.cols.length === tableProps_box.table.pickCol.colsInit.length;
41491
- isIndeterminate.value = tableProps_box.table.cols.length !== tableProps_box.table.pickCol.colsInit.length;
41494
+ if(tableProps_box.table.cols.length > 0 && val.length === tableProps_box.table.pickCol.colsInit.length){
41495
+ checkedAll.value = true;
41496
+ isIndeterminate.value = false;
41497
+ }else if(tableProps_box.table.cols.length > 0 && val.length !== tableProps_box.table.pickCol.colsInit.length){
41498
+ checkedAll.value = false;
41499
+ isIndeterminate.value = true;
41500
+ }else if(tableProps_box.table.cols.length === 0){
41501
+ checkedAll.value = false;
41502
+ isIndeterminate.value = false;
41503
+ }
41492
41504
  itemsChecked = hdl.getKeys(tableProps_box.table.cols);
41493
41505
  }
41494
41506
  }