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