@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.cjs.js
CHANGED
|
@@ -41445,13 +41445,17 @@ const hdl = {
|
|
|
41445
41445
|
getKeys(p) {
|
|
41446
41446
|
let a = [];
|
|
41447
41447
|
p.forEach(i => {
|
|
41448
|
-
a.push(i.
|
|
41448
|
+
a.push(i.fieldName);
|
|
41449
41449
|
});
|
|
41450
41450
|
return a
|
|
41451
41451
|
},
|
|
41452
41452
|
// 全选
|
|
41453
41453
|
checkedAll(val) {
|
|
41454
|
-
itemsChecked
|
|
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
|
// 选中或取消某一条
|
|
@@ -41475,7 +41479,7 @@ const hdl = {
|
|
|
41475
41479
|
tableProps_box.table.cols = [];
|
|
41476
41480
|
itemsChecked.forEach(i => {
|
|
41477
41481
|
tableProps_box.table.cols.push(tableProps_box.table.pickCol.colsInit.find(j => {
|
|
41478
|
-
return j.
|
|
41482
|
+
return j.fieldName === i
|
|
41479
41483
|
}));
|
|
41480
41484
|
});
|
|
41481
41485
|
tableProps_box.table.pickCol.popup.visible = false;
|
|
@@ -41484,11 +41488,19 @@ const hdl = {
|
|
|
41484
41488
|
|
|
41485
41489
|
// 窗口弹出监听
|
|
41486
41490
|
vue.watch(
|
|
41487
|
-
|
|
41491
|
+
() => tableProps_box.table.pickCol.popup.visible,
|
|
41488
41492
|
(newVal, oldVal) => {
|
|
41489
41493
|
if (newVal) {
|
|
41490
|
-
|
|
41491
|
-
|
|
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
|
}
|
|
@@ -41533,8 +41545,8 @@ return (_ctx, _cache) => {
|
|
|
41533
41545
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tableProps_box).table.pickCol.colsInit, (item) => {
|
|
41534
41546
|
return (vue.openBlock(), vue.createBlock(_component_el_checkbox, {
|
|
41535
41547
|
style: {"display":"block","margin-bottom":"10px"},
|
|
41536
|
-
label: item ? item.
|
|
41537
|
-
key: item ? item.
|
|
41548
|
+
label: item ? item.fieldName : '',
|
|
41549
|
+
key: item ? item.fieldName : ''
|
|
41538
41550
|
}, {
|
|
41539
41551
|
default: vue.withCtx(() => [
|
|
41540
41552
|
vue.createTextVNode(vue.toDisplayString(item ? item.label : ''), 1 /* TEXT */)
|