@yoooloo42/joker 1.0.136 → 1.0.138
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
|
@@ -41432,7 +41432,7 @@ const props = __props;
|
|
|
41432
41432
|
// props属性包装,继承了顶层组件的响应性,页面和js可以使用相同的命名
|
|
41433
41433
|
const tableProps_box = props.tableProps;
|
|
41434
41434
|
|
|
41435
|
-
let checkedAll = ref(
|
|
41435
|
+
let checkedAll = ref(false); // 是否全选状态
|
|
41436
41436
|
let isIndeterminate = ref(false); // 不确定状态:非全选、非全空
|
|
41437
41437
|
let itemsChecked = reactive([]); // 已选中条目
|
|
41438
41438
|
|
|
@@ -41441,25 +41441,37 @@ 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
41450
|
itemsChecked = val ? hdl.getKeys(tableProps_box.table.pickCol.colsInit) : [];
|
|
41451
|
-
isIndeterminate.value =
|
|
41451
|
+
isIndeterminate.value = !val;
|
|
41452
41452
|
},
|
|
41453
41453
|
// 选中或取消某一条
|
|
41454
41454
|
checkedItemsChange(val) {
|
|
41455
|
-
|
|
41456
|
-
|
|
41455
|
+
if(val.length > 0 && val.length === tableProps_box.table.pickCol.colsInit.length){
|
|
41456
|
+
checkedAll.value = true;
|
|
41457
|
+
isIndeterminate.value = false;
|
|
41458
|
+
return
|
|
41459
|
+
}
|
|
41460
|
+
if(val.length > 0 && val.length !== tableProps_box.table.pickCol.colsInit.length){
|
|
41461
|
+
checkedAll.value = false;
|
|
41462
|
+
isIndeterminate.value = true;
|
|
41463
|
+
return
|
|
41464
|
+
}
|
|
41465
|
+
if(val.length === 0){
|
|
41466
|
+
checkedAll.value = false;
|
|
41467
|
+
isIndeterminate.value = false;
|
|
41468
|
+
}
|
|
41457
41469
|
},
|
|
41458
41470
|
confirm() { // 确认提交
|
|
41459
41471
|
tableProps_box.table.cols = [];
|
|
41460
41472
|
itemsChecked.forEach(i => {
|
|
41461
41473
|
tableProps_box.table.cols.push(tableProps_box.table.pickCol.colsInit.find(j => {
|
|
41462
|
-
return j.
|
|
41474
|
+
return j.fieldName === i
|
|
41463
41475
|
}));
|
|
41464
41476
|
});
|
|
41465
41477
|
tableProps_box.table.pickCol.popup.visible = false;
|
|
@@ -41517,8 +41529,8 @@ return (_ctx, _cache) => {
|
|
|
41517
41529
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tableProps_box).table.pickCol.colsInit, (item) => {
|
|
41518
41530
|
return (openBlock(), createBlock(_component_el_checkbox, {
|
|
41519
41531
|
style: {"display":"block","margin-bottom":"10px"},
|
|
41520
|
-
label: item ? item.
|
|
41521
|
-
key: item ? item.
|
|
41532
|
+
label: item ? item.fieldName : '',
|
|
41533
|
+
key: item ? item.fieldName : ''
|
|
41522
41534
|
}, {
|
|
41523
41535
|
default: withCtx(() => [
|
|
41524
41536
|
createTextVNode(toDisplayString(item ? item.label : ''), 1 /* TEXT */)
|