@yoooloo42/joker 1.0.137 → 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 +20 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +20 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -41441,13 +41441,17 @@ const hdl = {
|
|
|
41441
41441
|
getKeys(p) {
|
|
41442
41442
|
let a = [];
|
|
41443
41443
|
p.forEach(i => {
|
|
41444
|
-
a.push(i.
|
|
41444
|
+
a.push(i.fieldName);
|
|
41445
41445
|
});
|
|
41446
41446
|
return a
|
|
41447
41447
|
},
|
|
41448
41448
|
// 全选
|
|
41449
41449
|
checkedAll(val) {
|
|
41450
|
-
itemsChecked
|
|
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
|
// 选中或取消某一条
|
|
@@ -41471,7 +41475,7 @@ const hdl = {
|
|
|
41471
41475
|
tableProps_box.table.cols = [];
|
|
41472
41476
|
itemsChecked.forEach(i => {
|
|
41473
41477
|
tableProps_box.table.cols.push(tableProps_box.table.pickCol.colsInit.find(j => {
|
|
41474
|
-
return j.
|
|
41478
|
+
return j.fieldName === i
|
|
41475
41479
|
}));
|
|
41476
41480
|
});
|
|
41477
41481
|
tableProps_box.table.pickCol.popup.visible = false;
|
|
@@ -41480,11 +41484,19 @@ const hdl = {
|
|
|
41480
41484
|
|
|
41481
41485
|
// 窗口弹出监听
|
|
41482
41486
|
watch(
|
|
41483
|
-
|
|
41487
|
+
() => tableProps_box.table.pickCol.popup.visible,
|
|
41484
41488
|
(newVal, oldVal) => {
|
|
41485
41489
|
if (newVal) {
|
|
41486
|
-
|
|
41487
|
-
|
|
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
|
}
|
|
@@ -41529,8 +41541,8 @@ return (_ctx, _cache) => {
|
|
|
41529
41541
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tableProps_box).table.pickCol.colsInit, (item) => {
|
|
41530
41542
|
return (openBlock(), createBlock(_component_el_checkbox, {
|
|
41531
41543
|
style: {"display":"block","margin-bottom":"10px"},
|
|
41532
|
-
label: item ? item.
|
|
41533
|
-
key: item ? item.
|
|
41544
|
+
label: item ? item.fieldName : '',
|
|
41545
|
+
key: item ? item.fieldName : ''
|
|
41534
41546
|
}, {
|
|
41535
41547
|
default: withCtx(() => [
|
|
41536
41548
|
createTextVNode(toDisplayString(item ? item.label : ''), 1 /* TEXT */)
|