@yoooloo42/joker 1.0.136 → 1.0.137
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 +16 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +16 -4
- 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
|
|
|
@@ -41452,12 +41452,24 @@ const hdl = {
|
|
|
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 = [];
|