@yoooloo42/joker 1.0.140 → 1.0.141
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/dist/bundle.css +6 -0
- package/dist/index.cjs.js +57 -46
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +57 -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,24 @@ 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
|
|
|
41505
41518
|
return (_ctx, _cache) => {
|
|
41506
41519
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
41507
|
-
const _component_el_row = resolveComponent("el-row");
|
|
41508
41520
|
const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
|
|
41509
41521
|
const _component_el_button = resolveComponent("el-button");
|
|
41510
41522
|
const _component_el_dialog = resolveComponent("el-dialog");
|
|
@@ -41521,31 +41533,31 @@ return (_ctx, _cache) => {
|
|
|
41521
41533
|
}, {
|
|
41522
41534
|
default: withCtx(() => [
|
|
41523
41535
|
createVNode(_component_el_checkbox, {
|
|
41524
|
-
indeterminate: unref(isIndeterminate),
|
|
41525
41536
|
modelValue: unref(checkedAll),
|
|
41526
41537
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(checkedAll) ? (checkedAll).value = $event : checkedAll = $event)),
|
|
41538
|
+
indeterminate: unref(isIndeterminate),
|
|
41527
41539
|
onChange: hdl.checkedAll
|
|
41528
41540
|
}, {
|
|
41529
41541
|
default: withCtx(() => [...(_cache[3] || (_cache[3] = [
|
|
41530
41542
|
createTextVNode("全选", -1 /* CACHED */)
|
|
41531
41543
|
]))]),
|
|
41532
41544
|
_: 1 /* STABLE */
|
|
41533
|
-
}, 8 /* PROPS */, ["
|
|
41534
|
-
|
|
41545
|
+
}, 8 /* PROPS */, ["modelValue", "indeterminate", "onChange"]),
|
|
41546
|
+
_cache[5] || (_cache[5] = createElementVNode("div", { class: "line" }, null, -1 /* CACHED */)),
|
|
41535
41547
|
createVNode(_component_el_checkbox_group, {
|
|
41536
41548
|
modelValue: unref(itemsChecked),
|
|
41537
41549
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (isRef(itemsChecked) ? (itemsChecked).value = $event : itemsChecked = $event)),
|
|
41538
41550
|
onChange: hdl.checkedItemsChange
|
|
41539
41551
|
}, {
|
|
41540
41552
|
default: withCtx(() => [
|
|
41541
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tableProps_box).table.pickCol.colsInit, (item) => {
|
|
41553
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tableProps_box).table.pickCol.colsInit, (item, index) => {
|
|
41542
41554
|
return (openBlock(), createBlock(_component_el_checkbox, {
|
|
41543
|
-
|
|
41544
|
-
|
|
41545
|
-
|
|
41555
|
+
label: item.key,
|
|
41556
|
+
key: index,
|
|
41557
|
+
style: {"display":"block","margin-bottom":"10px"}
|
|
41546
41558
|
}, {
|
|
41547
41559
|
default: withCtx(() => [
|
|
41548
|
-
createTextVNode(toDisplayString(item
|
|
41560
|
+
createTextVNode(toDisplayString(item.label), 1 /* TEXT */)
|
|
41549
41561
|
]),
|
|
41550
41562
|
_: 2 /* DYNAMIC */
|
|
41551
41563
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["label"]))
|
|
@@ -41553,22 +41565,19 @@ return (_ctx, _cache) => {
|
|
|
41553
41565
|
]),
|
|
41554
41566
|
_: 1 /* STABLE */
|
|
41555
41567
|
}, 8 /* PROPS */, ["modelValue", "onChange"]),
|
|
41556
|
-
|
|
41557
|
-
|
|
41558
|
-
|
|
41559
|
-
|
|
41560
|
-
|
|
41561
|
-
|
|
41562
|
-
|
|
41563
|
-
|
|
41564
|
-
|
|
41565
|
-
|
|
41566
|
-
|
|
41567
|
-
|
|
41568
|
-
|
|
41569
|
-
]),
|
|
41570
|
-
_: 1 /* STABLE */
|
|
41571
|
-
})
|
|
41568
|
+
_cache[6] || (_cache[6] = createElementVNode("div", { class: "line" }, null, -1 /* CACHED */)),
|
|
41569
|
+
createElementVNode("div", _hoisted_1$d, [
|
|
41570
|
+
createVNode(_component_el_button, {
|
|
41571
|
+
type: "success",
|
|
41572
|
+
round: "",
|
|
41573
|
+
onClick: hdl.confirm
|
|
41574
|
+
}, {
|
|
41575
|
+
default: withCtx(() => [...(_cache[4] || (_cache[4] = [
|
|
41576
|
+
createTextVNode("确认", -1 /* CACHED */)
|
|
41577
|
+
]))]),
|
|
41578
|
+
_: 1 /* STABLE */
|
|
41579
|
+
}, 8 /* PROPS */, ["onClick"])
|
|
41580
|
+
])
|
|
41572
41581
|
]),
|
|
41573
41582
|
_: 1 /* STABLE */
|
|
41574
41583
|
}, 8 /* PROPS */, ["modelValue"])
|
|
@@ -41578,6 +41587,7 @@ return (_ctx, _cache) => {
|
|
|
41578
41587
|
|
|
41579
41588
|
};
|
|
41580
41589
|
|
|
41590
|
+
script$e.__scopeId = "data-v-733feb96";
|
|
41581
41591
|
script$e.__file = "src/table/PickCol.vue";
|
|
41582
41592
|
|
|
41583
41593
|
const _hoisted_1$c = { style: {"padding":"10px"} };
|
|
@@ -42079,6 +42089,7 @@ return (_ctx, _cache) => {
|
|
|
42079
42089
|
layout: "total, sizes, prev, pager, next, jumper"
|
|
42080
42090
|
}, null, 8 /* PROPS */, ["total", "page-size", "page-sizes", "current-page", "style", "onSizeChange", "onCurrentChange"]),
|
|
42081
42091
|
createCommentVNode(" 选择列 "),
|
|
42092
|
+
createCommentVNode(" 使用该组件,必须设置每一列的唯一标识:key "),
|
|
42082
42093
|
createVNode(script$e, { tableProps: unref(tableProps_box) }, null, 8 /* PROPS */, ["tableProps"])
|
|
42083
42094
|
]))
|
|
42084
42095
|
}
|