@yoooloo42/joker 1.0.140 → 1.0.142
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 +69 -46
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +69 -46
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -22553,7 +22553,7 @@ return (_ctx, _cache) => {
|
|
|
22553
22553
|
|
|
22554
22554
|
script$k.__file = "src/form/LabelBox.vue";
|
|
22555
22555
|
|
|
22556
|
-
const _hoisted_1$
|
|
22556
|
+
const _hoisted_1$f = { key: 12 };
|
|
22557
22557
|
const _hoisted_2$e = { key: 0 };
|
|
22558
22558
|
const _hoisted_3$7 = { key: 13 };
|
|
22559
22559
|
const _hoisted_4$5 = { key: 0 };
|
|
@@ -22992,7 +22992,7 @@ return (_ctx, _cache) => {
|
|
|
22992
22992
|
}, 8 /* PROPS */, ["modelValue", "disabled", "onChange"]))
|
|
22993
22993
|
: createCommentVNode("v-if", true),
|
|
22994
22994
|
(unref(propsItem_box).inputType === 'button-group' && unref(propsItem_box).box && unref(propsItem_box).box.length > 0)
|
|
22995
|
-
? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
22995
|
+
? (openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
22996
22996
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(propsItem_box).box, (item0, index0) => {
|
|
22997
22997
|
return (openBlock(), createBlock(_component_el_button_group, {
|
|
22998
22998
|
key: index0,
|
|
@@ -23326,7 +23326,7 @@ return (_ctx, _cache) => {
|
|
|
23326
23326
|
script$j.__scopeId = "data-v-a94fa4ba";
|
|
23327
23327
|
script$j.__file = "src/form/InputBox.vue";
|
|
23328
23328
|
|
|
23329
|
-
const _hoisted_1$
|
|
23329
|
+
const _hoisted_1$e = { key: 0 };
|
|
23330
23330
|
const _hoisted_2$d = ["colspan"];
|
|
23331
23331
|
const _hoisted_3$6 = { key: 0 };
|
|
23332
23332
|
const _hoisted_4$4 = ["colspan"];
|
|
@@ -23434,7 +23434,7 @@ return (_ctx, _cache) => {
|
|
|
23434
23434
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (item0, index0) => {
|
|
23435
23435
|
return (openBlock(), createElementBlock(Fragment, { key: index0 }, [
|
|
23436
23436
|
(item0.hdlVisible ? item0.hdlVisible({formData: unref(formData_box), scopeThis: unref(scopeThis_box)}) : true)
|
|
23437
|
-
? (openBlock(), createElementBlock("tr", _hoisted_1$
|
|
23437
|
+
? (openBlock(), createElementBlock("tr", _hoisted_1$e, [
|
|
23438
23438
|
(!!item0.label)
|
|
23439
23439
|
? (openBlock(), createElementBlock("td", {
|
|
23440
23440
|
key: 0,
|
|
@@ -41418,6 +41418,9 @@ return (_ctx, _cache) => {
|
|
|
41418
41418
|
|
|
41419
41419
|
script$f.__file = "src/richtext/index.vue";
|
|
41420
41420
|
|
|
41421
|
+
const _hoisted_1$d = { style: {"text-align":"center"} };
|
|
41422
|
+
|
|
41423
|
+
|
|
41421
41424
|
var script$e = {
|
|
41422
41425
|
__name: 'PickCol',
|
|
41423
41426
|
props: {
|
|
@@ -41434,34 +41437,43 @@ const tableProps_box = props.tableProps;
|
|
|
41434
41437
|
|
|
41435
41438
|
let checkedAll = ref(false); // 是否全选状态
|
|
41436
41439
|
let isIndeterminate = ref(false); // 不确定状态:非全选、非全空
|
|
41437
|
-
let itemsChecked =
|
|
41440
|
+
let itemsChecked = ref([]); // 已选中条目
|
|
41441
|
+
let itemsAll = ref([]); // 全部条目
|
|
41438
41442
|
|
|
41439
41443
|
const hdl = {
|
|
41440
41444
|
// 获取键值数组
|
|
41441
|
-
|
|
41445
|
+
getItems(p) {
|
|
41442
41446
|
let a = [];
|
|
41443
|
-
p.forEach(
|
|
41444
|
-
a.push(
|
|
41447
|
+
p.forEach((item, index) => {
|
|
41448
|
+
a.push(item.key);
|
|
41445
41449
|
});
|
|
41446
41450
|
return a
|
|
41447
41451
|
},
|
|
41448
41452
|
// 全选
|
|
41449
41453
|
checkedAll(val) {
|
|
41450
|
-
itemsChecked.
|
|
41454
|
+
itemsChecked.value = [];
|
|
41451
41455
|
if (val) {
|
|
41452
|
-
|
|
41453
|
-
|
|
41456
|
+
itemsChecked.value.push(...itemsAll.value);
|
|
41457
|
+
}
|
|
41458
|
+
if(itemsChecked.value.length > 0 && itemsChecked.value.length === itemsAll.value.length){
|
|
41459
|
+
checkedAll.value = true;
|
|
41460
|
+
isIndeterminate.value = false;
|
|
41461
|
+
}else if(itemsChecked.value.length > 0 && itemsChecked.value.length !== itemsAll.value.length){
|
|
41462
|
+
checkedAll.value = false;
|
|
41463
|
+
isIndeterminate.value = true;
|
|
41464
|
+
}else if(itemsChecked.value.length === 0){
|
|
41465
|
+
checkedAll.value = false;
|
|
41466
|
+
isIndeterminate.value = false;
|
|
41454
41467
|
}
|
|
41455
|
-
isIndeterminate.value = !val;
|
|
41456
41468
|
},
|
|
41457
41469
|
// 选中或取消某一条
|
|
41458
41470
|
checkedItemsChange(val) {
|
|
41459
|
-
if(val.length > 0 && val.length ===
|
|
41471
|
+
if(val.length > 0 && val.length === itemsAll.value.length){
|
|
41460
41472
|
checkedAll.value = true;
|
|
41461
41473
|
isIndeterminate.value = false;
|
|
41462
41474
|
return
|
|
41463
41475
|
}
|
|
41464
|
-
if(val.length > 0 && val.length !==
|
|
41476
|
+
if(val.length > 0 && val.length !== itemsAll.value.length){
|
|
41465
41477
|
checkedAll.value = false;
|
|
41466
41478
|
isIndeterminate.value = true;
|
|
41467
41479
|
return
|
|
@@ -41473,9 +41485,9 @@ const hdl = {
|
|
|
41473
41485
|
},
|
|
41474
41486
|
confirm() { // 确认提交
|
|
41475
41487
|
tableProps_box.table.cols = [];
|
|
41476
|
-
itemsChecked.forEach(
|
|
41477
|
-
tableProps_box.table.cols.push(tableProps_box.table.pickCol.colsInit.find(
|
|
41478
|
-
return
|
|
41488
|
+
itemsChecked.value.forEach((item, index) => {
|
|
41489
|
+
tableProps_box.table.cols.push(tableProps_box.table.pickCol.colsInit.find((item0, index0) => {
|
|
41490
|
+
return item === '' + item0.key
|
|
41479
41491
|
}));
|
|
41480
41492
|
});
|
|
41481
41493
|
tableProps_box.table.pickCol.popup.visible = false;
|
|
@@ -41487,24 +41499,33 @@ watch(
|
|
|
41487
41499
|
() => tableProps_box.table.pickCol.popup.visible,
|
|
41488
41500
|
(newVal, oldVal) => {
|
|
41489
41501
|
if (newVal) {
|
|
41490
|
-
|
|
41502
|
+
itemsAll.value = hdl.getItems(tableProps_box.table.pickCol.colsInit);
|
|
41503
|
+
itemsChecked.value = hdl.getItems(tableProps_box.table.cols);
|
|
41504
|
+
if(itemsChecked.value.length > 0 && itemsChecked.value.length === itemsAll.value.length){
|
|
41491
41505
|
checkedAll.value = true;
|
|
41492
41506
|
isIndeterminate.value = false;
|
|
41493
|
-
}else if(
|
|
41507
|
+
}else if(itemsChecked.value.length > 0 && itemsChecked.value.length !== itemsAll.value.length){
|
|
41494
41508
|
checkedAll.value = false;
|
|
41495
41509
|
isIndeterminate.value = true;
|
|
41496
|
-
}else if(
|
|
41510
|
+
}else if(itemsChecked.value.length === 0){
|
|
41497
41511
|
checkedAll.value = false;
|
|
41498
41512
|
isIndeterminate.value = false;
|
|
41499
41513
|
}
|
|
41500
|
-
itemsChecked = hdl.getKeys(tableProps_box.table.cols);
|
|
41501
41514
|
}
|
|
41502
41515
|
}
|
|
41503
41516
|
);
|
|
41504
41517
|
|
|
41518
|
+
const style = {
|
|
41519
|
+
line: {
|
|
41520
|
+
height: '1px',
|
|
41521
|
+
'background-color': '#bdbdbd',
|
|
41522
|
+
'margin-top': '10px',
|
|
41523
|
+
'margin-bottom': '10px'
|
|
41524
|
+
}
|
|
41525
|
+
};
|
|
41526
|
+
|
|
41505
41527
|
return (_ctx, _cache) => {
|
|
41506
41528
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
41507
|
-
const _component_el_row = resolveComponent("el-row");
|
|
41508
41529
|
const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
|
|
41509
41530
|
const _component_el_button = resolveComponent("el-button");
|
|
41510
41531
|
const _component_el_dialog = resolveComponent("el-dialog");
|
|
@@ -41521,31 +41542,33 @@ return (_ctx, _cache) => {
|
|
|
41521
41542
|
}, {
|
|
41522
41543
|
default: withCtx(() => [
|
|
41523
41544
|
createVNode(_component_el_checkbox, {
|
|
41524
|
-
indeterminate: unref(isIndeterminate),
|
|
41525
41545
|
modelValue: unref(checkedAll),
|
|
41526
41546
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(checkedAll) ? (checkedAll).value = $event : checkedAll = $event)),
|
|
41547
|
+
indeterminate: unref(isIndeterminate),
|
|
41527
41548
|
onChange: hdl.checkedAll
|
|
41528
41549
|
}, {
|
|
41529
41550
|
default: withCtx(() => [...(_cache[3] || (_cache[3] = [
|
|
41530
41551
|
createTextVNode("全选", -1 /* CACHED */)
|
|
41531
41552
|
]))]),
|
|
41532
41553
|
_: 1 /* STABLE */
|
|
41533
|
-
}, 8 /* PROPS */, ["
|
|
41534
|
-
|
|
41554
|
+
}, 8 /* PROPS */, ["modelValue", "indeterminate", "onChange"]),
|
|
41555
|
+
createElementVNode("div", {
|
|
41556
|
+
style: normalizeStyle(style.line)
|
|
41557
|
+
}, null, 4 /* STYLE */),
|
|
41535
41558
|
createVNode(_component_el_checkbox_group, {
|
|
41536
41559
|
modelValue: unref(itemsChecked),
|
|
41537
41560
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (isRef(itemsChecked) ? (itemsChecked).value = $event : itemsChecked = $event)),
|
|
41538
41561
|
onChange: hdl.checkedItemsChange
|
|
41539
41562
|
}, {
|
|
41540
41563
|
default: withCtx(() => [
|
|
41541
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tableProps_box).table.pickCol.colsInit, (item) => {
|
|
41564
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tableProps_box).table.pickCol.colsInit, (item, index) => {
|
|
41542
41565
|
return (openBlock(), createBlock(_component_el_checkbox, {
|
|
41543
|
-
|
|
41544
|
-
|
|
41545
|
-
|
|
41566
|
+
label: item.key,
|
|
41567
|
+
key: index,
|
|
41568
|
+
style: {"display":"block","margin-bottom":"10px"}
|
|
41546
41569
|
}, {
|
|
41547
41570
|
default: withCtx(() => [
|
|
41548
|
-
createTextVNode(toDisplayString(item
|
|
41571
|
+
createTextVNode(toDisplayString(item.label), 1 /* TEXT */)
|
|
41549
41572
|
]),
|
|
41550
41573
|
_: 2 /* DYNAMIC */
|
|
41551
41574
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["label"]))
|
|
@@ -41553,22 +41576,21 @@ return (_ctx, _cache) => {
|
|
|
41553
41576
|
]),
|
|
41554
41577
|
_: 1 /* STABLE */
|
|
41555
41578
|
}, 8 /* PROPS */, ["modelValue", "onChange"]),
|
|
41556
|
-
|
|
41557
|
-
|
|
41558
|
-
|
|
41559
|
-
|
|
41560
|
-
|
|
41561
|
-
|
|
41562
|
-
|
|
41563
|
-
|
|
41564
|
-
|
|
41565
|
-
|
|
41566
|
-
|
|
41567
|
-
|
|
41568
|
-
|
|
41569
|
-
])
|
|
41570
|
-
|
|
41571
|
-
})
|
|
41579
|
+
createElementVNode("div", {
|
|
41580
|
+
style: normalizeStyle(style.line)
|
|
41581
|
+
}, null, 4 /* STYLE */),
|
|
41582
|
+
createElementVNode("div", _hoisted_1$d, [
|
|
41583
|
+
createVNode(_component_el_button, {
|
|
41584
|
+
type: "success",
|
|
41585
|
+
round: "",
|
|
41586
|
+
onClick: hdl.confirm
|
|
41587
|
+
}, {
|
|
41588
|
+
default: withCtx(() => [...(_cache[4] || (_cache[4] = [
|
|
41589
|
+
createTextVNode("确认", -1 /* CACHED */)
|
|
41590
|
+
]))]),
|
|
41591
|
+
_: 1 /* STABLE */
|
|
41592
|
+
}, 8 /* PROPS */, ["onClick"])
|
|
41593
|
+
])
|
|
41572
41594
|
]),
|
|
41573
41595
|
_: 1 /* STABLE */
|
|
41574
41596
|
}, 8 /* PROPS */, ["modelValue"])
|
|
@@ -42079,6 +42101,7 @@ return (_ctx, _cache) => {
|
|
|
42079
42101
|
layout: "total, sizes, prev, pager, next, jumper"
|
|
42080
42102
|
}, null, 8 /* PROPS */, ["total", "page-size", "page-sizes", "current-page", "style", "onSizeChange", "onCurrentChange"]),
|
|
42081
42103
|
createCommentVNode(" 选择列 "),
|
|
42104
|
+
createCommentVNode(" 使用该组件,必须设置每一列的唯一标识:key "),
|
|
42082
42105
|
createVNode(script$e, { tableProps: unref(tableProps_box) }, null, 8 /* PROPS */, ["tableProps"])
|
|
42083
42106
|
]))
|
|
42084
42107
|
}
|