@yoooloo42/joker 1.0.139 → 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.
@@ -6,6 +6,12 @@
6
6
  height: 40px;
7
7
  line-height: 40px;
8
8
  }
9
+ .line[data-v-733feb96] {
10
+ height: 1px;
11
+ background-color: #bdbdbd;
12
+ margin-top: 10px;
13
+ margin-bottom: 10px;
14
+ }
9
15
  .avatar[data-v-0b647a60] {
10
16
  border: 1px dashed #d9d9d9;
11
17
  }
package/dist/index.cjs.js CHANGED
@@ -22557,7 +22557,7 @@ return (_ctx, _cache) => {
22557
22557
 
22558
22558
  script$k.__file = "src/form/LabelBox.vue";
22559
22559
 
22560
- const _hoisted_1$e = { key: 12 };
22560
+ const _hoisted_1$f = { key: 12 };
22561
22561
  const _hoisted_2$e = { key: 0 };
22562
22562
  const _hoisted_3$7 = { key: 13 };
22563
22563
  const _hoisted_4$5 = { key: 0 };
@@ -22996,7 +22996,7 @@ return (_ctx, _cache) => {
22996
22996
  }, 8 /* PROPS */, ["modelValue", "disabled", "onChange"]))
22997
22997
  : vue.createCommentVNode("v-if", true),
22998
22998
  (vue.unref(propsItem_box).inputType === 'button-group' && vue.unref(propsItem_box).box && vue.unref(propsItem_box).box.length > 0)
22999
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
22999
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
23000
23000
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(propsItem_box).box, (item0, index0) => {
23001
23001
  return (vue.openBlock(), vue.createBlock(_component_el_button_group, {
23002
23002
  key: index0,
@@ -23330,7 +23330,7 @@ return (_ctx, _cache) => {
23330
23330
  script$j.__scopeId = "data-v-a94fa4ba";
23331
23331
  script$j.__file = "src/form/InputBox.vue";
23332
23332
 
23333
- const _hoisted_1$d = { key: 0 };
23333
+ const _hoisted_1$e = { key: 0 };
23334
23334
  const _hoisted_2$d = ["colspan"];
23335
23335
  const _hoisted_3$6 = { key: 0 };
23336
23336
  const _hoisted_4$4 = ["colspan"];
@@ -23438,7 +23438,7 @@ return (_ctx, _cache) => {
23438
23438
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.items, (item0, index0) => {
23439
23439
  return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index0 }, [
23440
23440
  (item0.hdlVisible ? item0.hdlVisible({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)}) : true)
23441
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$d, [
23441
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$e, [
23442
23442
  (!!item0.label)
23443
23443
  ? (vue.openBlock(), vue.createElementBlock("td", {
23444
23444
  key: 0,
@@ -41422,6 +41422,9 @@ return (_ctx, _cache) => {
41422
41422
 
41423
41423
  script$f.__file = "src/richtext/index.vue";
41424
41424
 
41425
+ const _hoisted_1$d = { style: {"text-align":"center"} };
41426
+
41427
+
41425
41428
  var script$e = {
41426
41429
  __name: 'PickCol',
41427
41430
  props: {
@@ -41438,34 +41441,43 @@ const tableProps_box = props.tableProps;
41438
41441
 
41439
41442
  let checkedAll = vue.ref(false); // 是否全选状态
41440
41443
  let isIndeterminate = vue.ref(false); // 不确定状态:非全选、非全空
41441
- let itemsChecked = vue.reactive([]); // 已选中条目
41444
+ let itemsChecked = vue.ref([]); // 已选中条目
41445
+ let itemsAll = vue.ref([]); // 全部条目
41442
41446
 
41443
41447
  const hdl = {
41444
41448
  // 获取键值数组
41445
- getKeys(p) {
41449
+ getItems(p) {
41446
41450
  let a = [];
41447
- p.forEach(i => {
41448
- a.push(i.fieldName);
41451
+ p.forEach((item, index) => {
41452
+ a.push(item.key);
41449
41453
  });
41450
41454
  return a
41451
41455
  },
41452
41456
  // 全选
41453
41457
  checkedAll(val) {
41454
- itemsChecked.splice(0, itemsChecked.length);
41458
+ itemsChecked.value = [];
41455
41459
  if (val) {
41456
- // 正确:重新填充数组,保持响应性
41457
- itemsChecked.push(...hdl.getKeys(tableProps_box.table.pickCol.colsInit));
41460
+ itemsChecked.value.push(...itemsAll.value);
41461
+ }
41462
+ if(itemsChecked.value.length > 0 && itemsChecked.value.length === itemsAll.value.length){
41463
+ checkedAll.value = true;
41464
+ isIndeterminate.value = false;
41465
+ }else if(itemsChecked.value.length > 0 && itemsChecked.value.length !== itemsAll.value.length){
41466
+ checkedAll.value = false;
41467
+ isIndeterminate.value = true;
41468
+ }else if(itemsChecked.value.length === 0){
41469
+ checkedAll.value = false;
41470
+ isIndeterminate.value = false;
41458
41471
  }
41459
- isIndeterminate.value = !val;
41460
41472
  },
41461
41473
  // 选中或取消某一条
41462
41474
  checkedItemsChange(val) {
41463
- if(val.length > 0 && val.length === tableProps_box.table.pickCol.colsInit.length){
41475
+ if(val.length > 0 && val.length === itemsAll.value.length){
41464
41476
  checkedAll.value = true;
41465
41477
  isIndeterminate.value = false;
41466
41478
  return
41467
41479
  }
41468
- if(val.length > 0 && val.length !== tableProps_box.table.pickCol.colsInit.length){
41480
+ if(val.length > 0 && val.length !== itemsAll.value.length){
41469
41481
  checkedAll.value = false;
41470
41482
  isIndeterminate.value = true;
41471
41483
  return
@@ -41477,9 +41489,9 @@ const hdl = {
41477
41489
  },
41478
41490
  confirm() { // 确认提交
41479
41491
  tableProps_box.table.cols = [];
41480
- itemsChecked.forEach(i => {
41481
- tableProps_box.table.cols.push(tableProps_box.table.pickCol.colsInit.find(j => {
41482
- return j.fieldName === i
41492
+ itemsChecked.value.forEach((item, index) => {
41493
+ tableProps_box.table.cols.push(tableProps_box.table.pickCol.colsInit.find((item0, index0) => {
41494
+ return item === '' + item0.key
41483
41495
  }));
41484
41496
  });
41485
41497
  tableProps_box.table.pickCol.popup.visible = false;
@@ -41491,24 +41503,24 @@ vue.watch(
41491
41503
  () => tableProps_box.table.pickCol.popup.visible,
41492
41504
  (newVal, oldVal) => {
41493
41505
  if (newVal) {
41494
- if(tableProps_box.table.cols.length > 0 && val.length === tableProps_box.table.pickCol.colsInit.length){
41506
+ itemsAll.value = hdl.getItems(tableProps_box.table.pickCol.colsInit);
41507
+ itemsChecked.value = hdl.getItems(tableProps_box.table.cols);
41508
+ if(itemsChecked.value.length > 0 && itemsChecked.value.length === itemsAll.value.length){
41495
41509
  checkedAll.value = true;
41496
41510
  isIndeterminate.value = false;
41497
- }else if(tableProps_box.table.cols.length > 0 && val.length !== tableProps_box.table.pickCol.colsInit.length){
41511
+ }else if(itemsChecked.value.length > 0 && itemsChecked.value.length !== itemsAll.value.length){
41498
41512
  checkedAll.value = false;
41499
41513
  isIndeterminate.value = true;
41500
- }else if(tableProps_box.table.cols.length === 0){
41514
+ }else if(itemsChecked.value.length === 0){
41501
41515
  checkedAll.value = false;
41502
41516
  isIndeterminate.value = false;
41503
41517
  }
41504
- itemsChecked = hdl.getKeys(tableProps_box.table.cols);
41505
41518
  }
41506
41519
  }
41507
41520
  );
41508
41521
 
41509
41522
  return (_ctx, _cache) => {
41510
41523
  const _component_el_checkbox = vue.resolveComponent("el-checkbox");
41511
- const _component_el_row = vue.resolveComponent("el-row");
41512
41524
  const _component_el_checkbox_group = vue.resolveComponent("el-checkbox-group");
41513
41525
  const _component_el_button = vue.resolveComponent("el-button");
41514
41526
  const _component_el_dialog = vue.resolveComponent("el-dialog");
@@ -41525,31 +41537,31 @@ return (_ctx, _cache) => {
41525
41537
  }, {
41526
41538
  default: vue.withCtx(() => [
41527
41539
  vue.createVNode(_component_el_checkbox, {
41528
- indeterminate: vue.unref(isIndeterminate),
41529
41540
  modelValue: vue.unref(checkedAll),
41530
41541
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(checkedAll) ? (checkedAll).value = $event : checkedAll = $event)),
41542
+ indeterminate: vue.unref(isIndeterminate),
41531
41543
  onChange: hdl.checkedAll
41532
41544
  }, {
41533
41545
  default: vue.withCtx(() => [...(_cache[3] || (_cache[3] = [
41534
41546
  vue.createTextVNode("全选", -1 /* CACHED */)
41535
41547
  ]))]),
41536
41548
  _: 1 /* STABLE */
41537
- }, 8 /* PROPS */, ["indeterminate", "modelValue", "onChange"]),
41538
- vue.createVNode(_component_el_row, { style: {"height":"1px","background-color":"#bdbdbd","margin-top":"10px","margin-bottom":"10px"} }),
41549
+ }, 8 /* PROPS */, ["modelValue", "indeterminate", "onChange"]),
41550
+ _cache[5] || (_cache[5] = vue.createElementVNode("div", { class: "line" }, null, -1 /* CACHED */)),
41539
41551
  vue.createVNode(_component_el_checkbox_group, {
41540
41552
  modelValue: vue.unref(itemsChecked),
41541
41553
  "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (vue.isRef(itemsChecked) ? (itemsChecked).value = $event : itemsChecked = $event)),
41542
41554
  onChange: hdl.checkedItemsChange
41543
41555
  }, {
41544
41556
  default: vue.withCtx(() => [
41545
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tableProps_box).table.pickCol.colsInit, (item) => {
41557
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tableProps_box).table.pickCol.colsInit, (item, index) => {
41546
41558
  return (vue.openBlock(), vue.createBlock(_component_el_checkbox, {
41547
- style: {"display":"block","margin-bottom":"10px"},
41548
- label: item ? item.fieldName : '',
41549
- key: item ? item.fieldName : ''
41559
+ label: item.key,
41560
+ key: index,
41561
+ style: {"display":"block","margin-bottom":"10px"}
41550
41562
  }, {
41551
41563
  default: vue.withCtx(() => [
41552
- vue.createTextVNode(vue.toDisplayString(item ? item.label : ''), 1 /* TEXT */)
41564
+ vue.createTextVNode(vue.toDisplayString(item.label), 1 /* TEXT */)
41553
41565
  ]),
41554
41566
  _: 2 /* DYNAMIC */
41555
41567
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["label"]))
@@ -41557,22 +41569,19 @@ return (_ctx, _cache) => {
41557
41569
  ]),
41558
41570
  _: 1 /* STABLE */
41559
41571
  }, 8 /* PROPS */, ["modelValue", "onChange"]),
41560
- vue.createVNode(_component_el_row, { style: {"height":"1px","background-color":"#bdbdbd","margin-top":"10px","margin-bottom":"10px"} }),
41561
- vue.createVNode(_component_el_row, { style: {"text-align":"center"} }, {
41562
- default: vue.withCtx(() => [
41563
- vue.createVNode(_component_el_button, {
41564
- type: "success",
41565
- round: "",
41566
- onClick: hdl.confirm
41567
- }, {
41568
- default: vue.withCtx(() => [...(_cache[4] || (_cache[4] = [
41569
- vue.createTextVNode("确认", -1 /* CACHED */)
41570
- ]))]),
41571
- _: 1 /* STABLE */
41572
- }, 8 /* PROPS */, ["onClick"])
41573
- ]),
41574
- _: 1 /* STABLE */
41575
- })
41572
+ _cache[6] || (_cache[6] = vue.createElementVNode("div", { class: "line" }, null, -1 /* CACHED */)),
41573
+ vue.createElementVNode("div", _hoisted_1$d, [
41574
+ vue.createVNode(_component_el_button, {
41575
+ type: "success",
41576
+ round: "",
41577
+ onClick: hdl.confirm
41578
+ }, {
41579
+ default: vue.withCtx(() => [...(_cache[4] || (_cache[4] = [
41580
+ vue.createTextVNode("确认", -1 /* CACHED */)
41581
+ ]))]),
41582
+ _: 1 /* STABLE */
41583
+ }, 8 /* PROPS */, ["onClick"])
41584
+ ])
41576
41585
  ]),
41577
41586
  _: 1 /* STABLE */
41578
41587
  }, 8 /* PROPS */, ["modelValue"])
@@ -41582,6 +41591,7 @@ return (_ctx, _cache) => {
41582
41591
 
41583
41592
  };
41584
41593
 
41594
+ script$e.__scopeId = "data-v-733feb96";
41585
41595
  script$e.__file = "src/table/PickCol.vue";
41586
41596
 
41587
41597
  const _hoisted_1$c = { style: {"padding":"10px"} };
@@ -42083,6 +42093,7 @@ return (_ctx, _cache) => {
42083
42093
  layout: "total, sizes, prev, pager, next, jumper"
42084
42094
  }, null, 8 /* PROPS */, ["total", "page-size", "page-sizes", "current-page", "style", "onSizeChange", "onCurrentChange"]),
42085
42095
  vue.createCommentVNode(" 选择列 "),
42096
+ vue.createCommentVNode(" 使用该组件,必须设置每一列的唯一标识:key "),
42086
42097
  vue.createVNode(script$e, { tableProps: vue.unref(tableProps_box) }, null, 8 /* PROPS */, ["tableProps"])
42087
42098
  ]))
42088
42099
  }