@yoooloo42/joker 1.0.134 → 1.0.136

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 CHANGED
@@ -22142,7 +22142,7 @@ var request = {
22142
22142
 
22143
22143
  // 默认值
22144
22144
 
22145
- var ly0default$2 = {
22145
+ var ly0default$3 = {
22146
22146
  myProps: {
22147
22147
  popup: {
22148
22148
  visible: false,
@@ -22498,7 +22498,7 @@ var styleModule = {
22498
22498
  input: input$1
22499
22499
  };
22500
22500
 
22501
- var script$h = {
22501
+ var script$k = {
22502
22502
  __name: 'LabelBox',
22503
22503
  props: {
22504
22504
  modelValue: {
@@ -22555,13 +22555,13 @@ return (_ctx, _cache) => {
22555
22555
 
22556
22556
  };
22557
22557
 
22558
- script$h.__file = "src/form/LabelBox.vue";
22558
+ script$k.__file = "src/form/LabelBox.vue";
22559
22559
 
22560
- const _hoisted_1$d = { key: 12 };
22561
- const _hoisted_2$d = { key: 0 };
22562
- const _hoisted_3$6 = { key: 13 };
22563
- const _hoisted_4$4 = { key: 0 };
22564
- const _hoisted_5$1 = { key: 14 };
22560
+ const _hoisted_1$e = { key: 12 };
22561
+ const _hoisted_2$e = { key: 0 };
22562
+ const _hoisted_3$7 = { key: 13 };
22563
+ const _hoisted_4$5 = { key: 0 };
22564
+ const _hoisted_5$2 = { key: 14 };
22565
22565
  const _hoisted_6 = { key: 0 };
22566
22566
  const _hoisted_7 = { key: 16 };
22567
22567
  const _hoisted_8 = ["innerHTML"];
@@ -22587,7 +22587,7 @@ const _hoisted_27 = { key: 29 };
22587
22587
  const _hoisted_28 = { key: 30 };
22588
22588
 
22589
22589
 
22590
- var script$g = {
22590
+ var script$j = {
22591
22591
  __name: 'InputBox',
22592
22592
  props: {
22593
22593
  modelValue: {
@@ -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$d, [
22999
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
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,
@@ -23025,7 +23025,7 @@ return (_ctx, _cache) => {
23025
23025
  }, {
23026
23026
  default: vue.withCtx(() => [
23027
23027
  (item1.text)
23028
- ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$d, vue.toDisplayString(item1.text), 1 /* TEXT */))
23028
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$e, vue.toDisplayString(item1.text), 1 /* TEXT */))
23029
23029
  : vue.createCommentVNode("v-if", true)
23030
23030
  ]),
23031
23031
  _: 2 /* DYNAMIC */
@@ -23043,7 +23043,7 @@ return (_ctx, _cache) => {
23043
23043
  vue.createCommentVNode(" 图片&富文本&视频 "),
23044
23044
  vue.createCommentVNode(" 图片 "),
23045
23045
  (vue.unref(propsItem_box).inputType === 'image')
23046
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$6, [
23046
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$7, [
23047
23047
  vue.createElementVNode("div", null, [
23048
23048
  vue.createVNode(_component_el_image, {
23049
23049
  style: vue.normalizeStyle(style.image(vue.unref(propsItem_box), vue.unref(formProps_box))),
@@ -23055,7 +23055,7 @@ return (_ctx, _cache) => {
23055
23055
  ]),
23056
23056
  vue.createCommentVNode(" 设置了图片删除功能,同时图片不为空 "),
23057
23057
  (!!vue.unref(propsItem_box).imageDelete && !!vue.unref(formData_box)[vue.unref(propsItem_box).fieldName])
23058
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, [
23058
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$5, [
23059
23059
  vue.createVNode(_component_el_button, {
23060
23060
  size: "small",
23061
23061
  icon: !vue.unref(formData_box)[vue.unref(propsItem_box).imageDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
@@ -23072,7 +23072,7 @@ return (_ctx, _cache) => {
23072
23072
  : vue.createCommentVNode("v-if", true),
23073
23073
  vue.createCommentVNode(" 多个图片 "),
23074
23074
  (vue.unref(propsItem_box).inputType === 'images')
23075
- ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [
23075
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$2, [
23076
23076
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(formData_box)[vue.unref(propsItem_box).fieldName], (itemImages, indexImages) => {
23077
23077
  return (vue.openBlock(), vue.createElementBlock("div", {
23078
23078
  key: indexImages,
@@ -23327,16 +23327,16 @@ return (_ctx, _cache) => {
23327
23327
 
23328
23328
  };
23329
23329
 
23330
- script$g.__scopeId = "data-v-a94fa4ba";
23331
- script$g.__file = "src/form/InputBox.vue";
23330
+ script$j.__scopeId = "data-v-a94fa4ba";
23331
+ script$j.__file = "src/form/InputBox.vue";
23332
23332
 
23333
- const _hoisted_1$c = { key: 0 };
23334
- const _hoisted_2$c = ["colspan"];
23335
- const _hoisted_3$5 = { key: 0 };
23336
- const _hoisted_4$3 = ["colspan"];
23333
+ const _hoisted_1$d = { key: 0 };
23334
+ const _hoisted_2$d = ["colspan"];
23335
+ const _hoisted_3$6 = { key: 0 };
23336
+ const _hoisted_4$4 = ["colspan"];
23337
23337
 
23338
23338
 
23339
- var script$f = {
23339
+ var script$i = {
23340
23340
  __name: 'Form',
23341
23341
  props: {
23342
23342
  modelValue: {
@@ -23438,13 +23438,13 @@ 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$c, [
23441
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$d, [
23442
23442
  (!!item0.label)
23443
23443
  ? (vue.openBlock(), vue.createElementBlock("td", {
23444
23444
  key: 0,
23445
23445
  style: vue.normalizeStyle(style.field_box.left)
23446
23446
  }, [
23447
- vue.createVNode(script$h, {
23447
+ vue.createVNode(script$k, {
23448
23448
  modelValue: vue.unref(formData_box),
23449
23449
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23450
23450
  myProps: vue.unref(formProps_box),
@@ -23488,13 +23488,13 @@ return (_ctx, _cache) => {
23488
23488
  ? item2.hdlVisible({formData: vue.unref(formData_box), scopeThis: vue.unref(scopeThis_box)})
23489
23489
  : true
23490
23490
  )
23491
- ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_3$5, [
23491
+ ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_3$6, [
23492
23492
  (item2.label)
23493
23493
  ? (vue.openBlock(), vue.createElementBlock("td", {
23494
23494
  key: 0,
23495
23495
  style: vue.normalizeStyle(style.field_box.left)
23496
23496
  }, [
23497
- vue.createVNode(script$h, {
23497
+ vue.createVNode(script$k, {
23498
23498
  modelValue: vue.unref(formData_box),
23499
23499
  "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23500
23500
  myProps: vue.unref(formProps_box),
@@ -23507,14 +23507,14 @@ return (_ctx, _cache) => {
23507
23507
  style: vue.normalizeStyle(style.field_box.right),
23508
23508
  colspan: style.no_field_label(item2)
23509
23509
  }, [
23510
- vue.createVNode(script$g, {
23510
+ vue.createVNode(script$j, {
23511
23511
  modelValue: vue.unref(formData_box),
23512
23512
  "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23513
23513
  myProps: vue.unref(formProps_box),
23514
23514
  scopeThis: vue.unref(scopeThis_box),
23515
23515
  item: item2
23516
23516
  }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
23517
- ], 12 /* STYLE, PROPS */, _hoisted_4$3)
23517
+ ], 12 /* STYLE, PROPS */, _hoisted_4$4)
23518
23518
  ]))
23519
23519
  : vue.createCommentVNode("v-if", true)
23520
23520
  ], 64 /* STABLE_FRAGMENT */))
@@ -23530,14 +23530,14 @@ return (_ctx, _cache) => {
23530
23530
  _: 2 /* DYNAMIC */
23531
23531
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["accordion", "modelValue", "onUpdate:modelValue", "style"]))
23532
23532
  : vue.createCommentVNode("v-if", true),
23533
- vue.createVNode(script$g, {
23533
+ vue.createVNode(script$j, {
23534
23534
  modelValue: vue.unref(formData_box),
23535
23535
  "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23536
23536
  myProps: vue.unref(formProps_box),
23537
23537
  scopeThis: vue.unref(scopeThis_box),
23538
23538
  item: item0
23539
23539
  }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis", "item"])
23540
- ], 12 /* STYLE, PROPS */, _hoisted_2$c)
23540
+ ], 12 /* STYLE, PROPS */, _hoisted_2$d)
23541
23541
  ]))
23542
23542
  : vue.createCommentVNode("v-if", true)
23543
23543
  ], 64 /* STABLE_FRAGMENT */))
@@ -23576,7 +23576,7 @@ return (_ctx, _cache) => {
23576
23576
 
23577
23577
  };
23578
23578
 
23579
- script$f.__file = "src/form/Form.vue";
23579
+ script$i.__file = "src/form/Form.vue";
23580
23580
 
23581
23581
  // 引用标准:GB/T 2260
23582
23582
 
@@ -24068,7 +24068,7 @@ var deepClone = {
24068
24068
  var unclassified = {
24069
24069
  deepClone};
24070
24070
 
24071
- var script$e = {
24071
+ var script$h = {
24072
24072
  __name: 'index',
24073
24073
  props: {
24074
24074
  modelValue: {
@@ -24091,7 +24091,7 @@ const props = __props;
24091
24091
  // 顶层组件的props属性需做响应性包装,页面和js可以使用相同的命名
24092
24092
  let formData_box = vue.reactive(props.modelValue);
24093
24093
  const formProps_box = vue.reactive(unclassified.deepClone.deepMerge(
24094
- unclassified.deepClone.deepClone(ly0default$2.myProps),
24094
+ unclassified.deepClone.deepClone(ly0default$3.myProps),
24095
24095
  props.myProps
24096
24096
  ));
24097
24097
  const scopeThis_box = vue.reactive(props.scopeThis);
@@ -24113,7 +24113,7 @@ return (_ctx, _cache) => {
24113
24113
  "destroy-on-close": true
24114
24114
  }, {
24115
24115
  default: vue.withCtx(() => [
24116
- vue.createVNode(script$f, {
24116
+ vue.createVNode(script$i, {
24117
24117
  modelValue: vue.unref(formData_box),
24118
24118
  "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
24119
24119
  myProps: formProps_box,
@@ -24122,7 +24122,7 @@ return (_ctx, _cache) => {
24122
24122
  ]),
24123
24123
  _: 1 /* STABLE */
24124
24124
  }, 8 /* PROPS */, ["modelValue", "title", "width", "top"]))
24125
- : (vue.openBlock(), vue.createBlock(script$f, {
24125
+ : (vue.openBlock(), vue.createBlock(script$i, {
24126
24126
  key: 1,
24127
24127
  modelValue: vue.unref(formData_box),
24128
24128
  "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
@@ -24134,9 +24134,9 @@ return (_ctx, _cache) => {
24134
24134
 
24135
24135
  };
24136
24136
 
24137
- script$e.__file = "src/form/index.vue";
24137
+ script$h.__file = "src/form/index.vue";
24138
24138
 
24139
- var ly0default$1 = {
24139
+ var ly0default$2 = {
24140
24140
  myProps: {
24141
24141
  mode: 'horizontal',
24142
24142
  defaultActive: '',
@@ -24150,14 +24150,14 @@ var ly0default$1 = {
24150
24150
  }
24151
24151
  };
24152
24152
 
24153
- var script$d = {
24153
+ var script$g = {
24154
24154
  __name: 'index',
24155
24155
  props: ["myProps", "scopeThis"],
24156
24156
  setup(__props) {
24157
24157
 
24158
24158
  const props = __props;
24159
24159
  const myProps_box = vue.reactive(unclassified.deepClone.deepMerge(
24160
- unclassified.deepClone.deepClone(ly0default$1.myProps),
24160
+ unclassified.deepClone.deepClone(ly0default$2.myProps),
24161
24161
  props.myProps
24162
24162
  ));
24163
24163
  const scopeThis_box = vue.reactive(props.scopeThis);
@@ -24422,7 +24422,7 @@ return (_ctx, _cache) => {
24422
24422
 
24423
24423
  };
24424
24424
 
24425
- script$d.__file = "src/menu/index.vue";
24425
+ script$g.__file = "src/menu/index.vue";
24426
24426
 
24427
24427
  var quill$1 = {exports: {}};
24428
24428
 
@@ -41278,7 +41278,7 @@ v-model 是一个语法糖(syntactic sugar)。当你在一个自定义组件
41278
41278
  2. 监听一个名为 update:modelValue 的自定义事件(用于更新值)
41279
41279
  */
41280
41280
 
41281
- var script$c = {
41281
+ var script$f = {
41282
41282
  __name: 'index',
41283
41283
  props: {
41284
41284
  // v-model 对应的 prop
@@ -41420,7 +41420,805 @@ return (_ctx, _cache) => {
41420
41420
 
41421
41421
  };
41422
41422
 
41423
- script$c.__file = "src/richtext/index.vue";
41423
+ script$f.__file = "src/richtext/index.vue";
41424
+
41425
+ var script$e = {
41426
+ __name: 'PickCol',
41427
+ props: {
41428
+ tableProps: {
41429
+ type: Object,
41430
+ default: () => ({})
41431
+ }
41432
+ },
41433
+ setup(__props) {
41434
+
41435
+ const props = __props;
41436
+ // props属性包装,继承了顶层组件的响应性,页面和js可以使用相同的命名
41437
+ const tableProps_box = props.tableProps;
41438
+
41439
+ let checkedAll = vue.ref(true); // 是否全选状态
41440
+ let isIndeterminate = vue.ref(false); // 不确定状态:非全选、非全空
41441
+ let itemsChecked = vue.reactive([]); // 已选中条目
41442
+
41443
+ const hdl = {
41444
+ // 获取键值数组
41445
+ getKeys(p) {
41446
+ let a = [];
41447
+ p.forEach(i => {
41448
+ a.push(i.key);
41449
+ });
41450
+ return a
41451
+ },
41452
+ // 全选
41453
+ checkedAll(val) {
41454
+ itemsChecked = val ? hdl.getKeys(tableProps_box.table.pickCol.colsInit) : [];
41455
+ isIndeterminate.value = false;
41456
+ },
41457
+ // 选中或取消某一条
41458
+ checkedItemsChange(val) {
41459
+ checkedAll.value = val.length === tableProps_box.table.pickCol.colsInit.length;
41460
+ isIndeterminate.value = val.length > 0 && val.length < tableProps_box.table.pickCol.colsInit.length;
41461
+ },
41462
+ confirm() { // 确认提交
41463
+ tableProps_box.table.cols = [];
41464
+ itemsChecked.forEach(i => {
41465
+ tableProps_box.table.cols.push(tableProps_box.table.pickCol.colsInit.find(j => {
41466
+ return j.key === i
41467
+ }));
41468
+ });
41469
+ tableProps_box.table.pickCol.popup.visible = false;
41470
+ }
41471
+ };
41472
+
41473
+ // 窗口弹出监听
41474
+ vue.watch(
41475
+ vue.ref(tableProps_box.table.pickCol.popup.visible),
41476
+ (newVal, oldVal) => {
41477
+ if (newVal) {
41478
+ checkedAll.value = tableProps_box.table.cols.length === tableProps_box.table.pickCol.colsInit.length;
41479
+ isIndeterminate.value = tableProps_box.table.cols.length !== tableProps_box.table.pickCol.colsInit.length;
41480
+ itemsChecked = hdl.getKeys(tableProps_box.table.cols);
41481
+ }
41482
+ }
41483
+ );
41484
+
41485
+ return (_ctx, _cache) => {
41486
+ const _component_el_checkbox = vue.resolveComponent("el-checkbox");
41487
+ const _component_el_row = vue.resolveComponent("el-row");
41488
+ const _component_el_checkbox_group = vue.resolveComponent("el-checkbox-group");
41489
+ const _component_el_button = vue.resolveComponent("el-button");
41490
+ const _component_el_dialog = vue.resolveComponent("el-dialog");
41491
+
41492
+ return (vue.openBlock(), vue.createElementBlock("div", null, [
41493
+ vue.createVNode(_component_el_dialog, {
41494
+ modelValue: vue.unref(tableProps_box).table.pickCol.popup.visible,
41495
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((vue.unref(tableProps_box).table.pickCol.popup.visible) = $event)),
41496
+ "custom-class": 'code-template-dialog',
41497
+ "close-on-press-escape": true,
41498
+ "append-to-body": "",
41499
+ title: "选择列",
41500
+ width: "400px"
41501
+ }, {
41502
+ default: vue.withCtx(() => [
41503
+ vue.createVNode(_component_el_checkbox, {
41504
+ indeterminate: vue.unref(isIndeterminate),
41505
+ modelValue: vue.unref(checkedAll),
41506
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(checkedAll) ? (checkedAll).value = $event : checkedAll = $event)),
41507
+ onChange: hdl.checkedAll
41508
+ }, {
41509
+ default: vue.withCtx(() => [...(_cache[3] || (_cache[3] = [
41510
+ vue.createTextVNode("全选", -1 /* CACHED */)
41511
+ ]))]),
41512
+ _: 1 /* STABLE */
41513
+ }, 8 /* PROPS */, ["indeterminate", "modelValue", "onChange"]),
41514
+ vue.createVNode(_component_el_row, { style: {"height":"1px","background-color":"#bdbdbd","margin-top":"10px","margin-bottom":"10px"} }),
41515
+ vue.createVNode(_component_el_checkbox_group, {
41516
+ modelValue: vue.unref(itemsChecked),
41517
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (vue.isRef(itemsChecked) ? (itemsChecked).value = $event : itemsChecked = $event)),
41518
+ onChange: hdl.checkedItemsChange
41519
+ }, {
41520
+ default: vue.withCtx(() => [
41521
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tableProps_box).table.pickCol.colsInit, (item) => {
41522
+ return (vue.openBlock(), vue.createBlock(_component_el_checkbox, {
41523
+ style: {"display":"block","margin-bottom":"10px"},
41524
+ label: item ? item.key : '',
41525
+ key: item ? item.key : ''
41526
+ }, {
41527
+ default: vue.withCtx(() => [
41528
+ vue.createTextVNode(vue.toDisplayString(item ? item.label : ''), 1 /* TEXT */)
41529
+ ]),
41530
+ _: 2 /* DYNAMIC */
41531
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["label"]))
41532
+ }), 128 /* KEYED_FRAGMENT */))
41533
+ ]),
41534
+ _: 1 /* STABLE */
41535
+ }, 8 /* PROPS */, ["modelValue", "onChange"]),
41536
+ vue.createVNode(_component_el_row, { style: {"height":"1px","background-color":"#bdbdbd","margin-top":"10px","margin-bottom":"10px"} }),
41537
+ vue.createVNode(_component_el_row, { style: {"text-align":"center"} }, {
41538
+ default: vue.withCtx(() => [
41539
+ vue.createVNode(_component_el_button, {
41540
+ type: "success",
41541
+ round: "",
41542
+ onClick: hdl.confirm
41543
+ }, {
41544
+ default: vue.withCtx(() => [...(_cache[4] || (_cache[4] = [
41545
+ vue.createTextVNode("确认", -1 /* CACHED */)
41546
+ ]))]),
41547
+ _: 1 /* STABLE */
41548
+ }, 8 /* PROPS */, ["onClick"])
41549
+ ]),
41550
+ _: 1 /* STABLE */
41551
+ })
41552
+ ]),
41553
+ _: 1 /* STABLE */
41554
+ }, 8 /* PROPS */, ["modelValue"])
41555
+ ]))
41556
+ }
41557
+ }
41558
+
41559
+ };
41560
+
41561
+ script$e.__file = "src/table/PickCol.vue";
41562
+
41563
+ const _hoisted_1$c = { style: {"padding":"10px"} };
41564
+ const _hoisted_2$c = { key: 0 };
41565
+ const _hoisted_3$5 = ["onClick", "onMouseover"];
41566
+ const _hoisted_4$3 = ["href", "download"];
41567
+ const _hoisted_5$1 = {
41568
+ key: 1,
41569
+ style: {"color":"#6a6a6a"}
41570
+ };
41571
+
41572
+
41573
+ var script$d = {
41574
+ __name: 'Table',
41575
+ props: {
41576
+ modelValue: {
41577
+ type: Object,
41578
+ default: () => ({})
41579
+ },
41580
+ myProps: {
41581
+ type: Object,
41582
+ default: () => ({})
41583
+ },
41584
+ scopeThis: {
41585
+ type: Object,
41586
+ default: () => ({})
41587
+ }
41588
+ },
41589
+ setup(__props) {
41590
+
41591
+ const props = __props;
41592
+
41593
+ // props属性包装,继承了顶层组件的响应性,页面和js可以使用相同的命名
41594
+ let tableData_box = props.modelValue;
41595
+ const tableProps_box = props.myProps;
41596
+ const scopeThis_box = props.scopeThis;
41597
+ // 设置列选择初始化参数
41598
+ tableProps_box.table.pickCol.colsInit = unclassified.deepClone.deepClone(tableProps_box.table.cols);
41599
+
41600
+ const hdl = {
41601
+ cellMouseEnter(row, column, cell, event) {
41602
+ // 当单元格hover进入时会触发该事件
41603
+ if (tableProps_box.table.hdlCellMouseEnter) {
41604
+ tableProps_box.table.hdlCellMouseEnter({scopeThis: scopeThis_box, tableProps: tableProps_box, inherit: {
41605
+ row,
41606
+ column,
41607
+ cell,
41608
+ event
41609
+ }});
41610
+ } else {
41611
+ tableProps_box.table.cellTooltip = [];
41612
+ }
41613
+ },
41614
+ rowClick(row, column, event) {
41615
+ // 当某一行被点击时会触发该事件
41616
+ if (tableProps_box.table.hdlRowClick) {
41617
+ tableProps_box.table.hdlRowClick({scopeThis: scopeThis_box, inherit: {
41618
+ row,
41619
+ column,
41620
+ event
41621
+ }});
41622
+ }
41623
+ },
41624
+ selectionChange(selection) {
41625
+ // 当选择项发生变化时会触发该事件
41626
+ if (tableProps_box.table.hdlSelectionChange) {
41627
+ tableProps_box.table.hdlSelectionChange({scopeThis: scopeThis_box, inherit: {
41628
+ selection
41629
+ }});
41630
+ }
41631
+ },
41632
+ sortChange(para) {
41633
+ // 当表格的排序条件发生变化的时候会触发该事件,一般用于远程排序
41634
+ // para.column
41635
+ // para.prop
41636
+ // para.order
41637
+
41638
+ if (tableProps_box.table.hdlSortChange) {
41639
+ tableProps_box.table.hdlSortChange({scopeThis: scopeThis_box, inherit: {
41640
+ column: para.column,
41641
+ prop: para.prop,
41642
+ order: para.order,
41643
+ }});
41644
+ }
41645
+ },
41646
+ cellMouseover({col, row}) {
41647
+ if (col.hdlMouseover) {
41648
+ col.hdlMouseover({scopeThis: scopeThis_box, row, col});
41649
+ } else {
41650
+ tableData_box.cellTooltip = [];
41651
+ }
41652
+ },
41653
+ download({row, col}) {
41654
+ if(!col.hdlGetSrc){
41655
+ return {
41656
+ src: '',
41657
+ label: tableProps_box.table.colShow.download.downloadLabelNoSrc,
41658
+ fileName: tableProps_box.table.colShow.download.fileName
41659
+ }
41660
+ }
41661
+
41662
+ const src = col.hdlGetSrc({scopeThis: scopeThis_box, row});
41663
+ const label = col.hdlGetDownloadLabel
41664
+ ? col.hdlGetDownloadLabel({scopeThis: scopeThis_box, row})
41665
+ : tableProps_box.table.colShow.download.downloadLabel;
41666
+ const fileName = col.hdlGetFileName
41667
+ ? col.hdlGetFileName({scopeThis: scopeThis_box, row})
41668
+ : tableProps_box.table.colShow.download.fileName;
41669
+ return {
41670
+ src: src || '',
41671
+ label: src ? label : tableProps_box.table.colShow.download.downloadLabelNoSrc,
41672
+ fileName: src ? fileName : tableProps_box.table.colShow.download.fileName
41673
+ }
41674
+ },
41675
+ pageSizeChange(pageSize) {
41676
+ // 重新分页
41677
+ tableProps_box.query.pageSize = pageSize;
41678
+ tableProps_box.query.currentPage = 1;
41679
+ },
41680
+ currentPageChange(currentPage) {
41681
+ // 修改当前页号
41682
+ tableProps_box.query.currentPage = currentPage;
41683
+ }
41684
+ };
41685
+
41686
+ const style = {
41687
+ topButtonGroups: {
41688
+ rootBox: {
41689
+ display: 'flex',
41690
+ 'justify-content': 'space-between',
41691
+ 'margin-bottom': '10px'
41692
+ },
41693
+ button(index, index0){return {
41694
+ style: tableProps_box.topButtonGroups[index][index0].style || {
41695
+ "background-color": "#009f95",
41696
+ color: "#ffffff"
41697
+ },
41698
+ icon: tableProps_box.topButtonGroups[index][index0].icon || "", // el-图标
41699
+ type: tableProps_box.topButtonGroups[index][index0].type || "",
41700
+ size: tableProps_box.topButtonGroups[index][index0].size || "",
41701
+ plain: tableProps_box.topButtonGroups[index][index0].plain || false,
41702
+ round: tableProps_box.topButtonGroups[index][index0].round || false,
41703
+ circle: tableProps_box.topButtonGroups[index][index0].circle || false
41704
+ }}
41705
+ },
41706
+ cell: {
41707
+ text: {
41708
+ 'white-space': 'pre-line' // 保留换行符
41709
+ },
41710
+ buttonGroup({item}){return {
41711
+ style: item.style || {
41712
+ 'background-color': '#009f95',
41713
+ color: '#ffffff'
41714
+ },
41715
+ icon: item.icon || "", // el-图标
41716
+ type: item.type || "",
41717
+ size: item.size || "",
41718
+ plain: item.plain || false,
41719
+ round: item.round || false,
41720
+ circle: item.circle || false
41721
+ }},
41722
+ image({col}){return {
41723
+ width: col.imageWidth || tableProps_box.table.colShow.image.width,
41724
+ height: col.imageHeight || tableProps_box.table.colShow.image.height,
41725
+ }}
41726
+ },
41727
+ pagination: {
41728
+ "text-align": "left",
41729
+ "margin-top": "10px"
41730
+ }
41731
+ };
41732
+
41733
+ return (_ctx, _cache) => {
41734
+ const _component_el_divider = vue.resolveComponent("el-divider");
41735
+ const _component_ly0Menu = vue.resolveComponent("ly0Menu");
41736
+ const _component_el_button = vue.resolveComponent("el-button");
41737
+ const _component_el_tooltip = vue.resolveComponent("el-tooltip");
41738
+ const _component_el_button_group = vue.resolveComponent("el-button-group");
41739
+ const _component_el_table_column = vue.resolveComponent("el-table-column");
41740
+ const _component_el_switch = vue.resolveComponent("el-switch");
41741
+ const _component_el_image = vue.resolveComponent("el-image");
41742
+ const _component_ly0d7thumb = vue.resolveComponent("ly0d7thumb");
41743
+ const _component_ly0d7group = vue.resolveComponent("ly0d7group");
41744
+ const _component_ly0d7size = vue.resolveComponent("ly0d7size");
41745
+ const _component_ly0d7price = vue.resolveComponent("ly0d7price");
41746
+ const _component_el_table = vue.resolveComponent("el-table");
41747
+ const _component_el_pagination = vue.resolveComponent("el-pagination");
41748
+ const _directive_loading = vue.resolveDirective("loading");
41749
+
41750
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$c, [
41751
+ vue.createCommentVNode(" 标题线 "),
41752
+ (vue.unref(tableProps_box).titleLine.text)
41753
+ ? (vue.openBlock(), vue.createElementBlock("div", {
41754
+ key: 0,
41755
+ style: vue.normalizeStyle(vue.unref(tableProps_box).titleLine.style.line)
41756
+ }, [
41757
+ vue.createVNode(_component_el_divider, { "content-position": "left" }, {
41758
+ default: vue.withCtx(() => [
41759
+ vue.createElementVNode("span", {
41760
+ style: vue.normalizeStyle(vue.unref(tableProps_box).titleLine.style.text)
41761
+ }, vue.toDisplayString(vue.unref(tableProps_box).titleLine.text), 5 /* TEXT, STYLE */)
41762
+ ]),
41763
+ _: 1 /* STABLE */
41764
+ })
41765
+ ], 4 /* STYLE */))
41766
+ : vue.createCommentVNode("v-if", true),
41767
+ vue.createCommentVNode(" 置顶菜单 "),
41768
+ (!!vue.unref(tableProps_box).menu)
41769
+ ? (vue.openBlock(), vue.createBlock(_component_ly0Menu, {
41770
+ key: 1,
41771
+ myProps: vue.unref(tableProps_box).menu,
41772
+ scopeThis: vue.unref(scopeThis_box)
41773
+ }, null, 8 /* PROPS */, ["myProps", "scopeThis"]))
41774
+ : vue.createCommentVNode("v-if", true),
41775
+ vue.createCommentVNode(" 置顶快捷按钮组 "),
41776
+ (vue.unref(tableProps_box).topButtonGroups.length > 0)
41777
+ ? (vue.openBlock(), vue.createElementBlock("div", {
41778
+ key: 2,
41779
+ style: vue.normalizeStyle(style.topButtonGroups.rootBox)
41780
+ }, [
41781
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tableProps_box).topButtonGroups, (item, index) => {
41782
+ return (vue.openBlock(), vue.createBlock(_component_el_button_group, { key: index }, {
41783
+ default: vue.withCtx(() => [
41784
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item, (item0, index0) => {
41785
+ return (vue.openBlock(), vue.createBlock(_component_el_tooltip, {
41786
+ key: index0,
41787
+ disabled: !item0.tip,
41788
+ content: item0.tip && item0.tip.content ? item0.tip.content : '',
41789
+ placement: item0.tip && item0.tip.placement ? item0.tip.placement : 'bottom',
41790
+ effect: "light"
41791
+ }, {
41792
+ default: vue.withCtx(() => [
41793
+ vue.createVNode(_component_el_button, {
41794
+ style: vue.normalizeStyle(style.topButtonGroups.button(index, index0).style),
41795
+ icon: style.topButtonGroups.button(index, index0).icon,
41796
+ type: style.topButtonGroups.button(index, index0).type,
41797
+ size: style.topButtonGroups.button(index, index0).size,
41798
+ plain: style.topButtonGroups.button(index, index0).plain,
41799
+ round: style.topButtonGroups.button(index, index0).round,
41800
+ circle: style.topButtonGroups.button(index, index0).circle,
41801
+ onClick: $event => (item0.hdlClick ? item0.hdlClick({tableData: vue.unref(tableData_box), tableProps: vue.unref(tableProps_box), scopeThis: vue.unref(scopeThis_box)}) : null)
41802
+ }, {
41803
+ default: vue.withCtx(() => [
41804
+ (item0.text)
41805
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$c, vue.toDisplayString(item0.text), 1 /* TEXT */))
41806
+ : vue.createCommentVNode("v-if", true)
41807
+ ]),
41808
+ _: 2 /* DYNAMIC */
41809
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["style", "icon", "type", "size", "plain", "round", "circle", "onClick"])
41810
+ ]),
41811
+ _: 2 /* DYNAMIC */
41812
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled", "content", "placement"]))
41813
+ }), 128 /* KEYED_FRAGMENT */))
41814
+ ]),
41815
+ _: 2 /* DYNAMIC */
41816
+ }, 1024 /* DYNAMIC_SLOTS */))
41817
+ }), 128 /* KEYED_FRAGMENT */))
41818
+ ], 4 /* STYLE */))
41819
+ : vue.createCommentVNode("v-if", true),
41820
+ vue.createCommentVNode(" 表体 "),
41821
+ vue.withDirectives((vue.openBlock(), vue.createBlock(_component_el_table, {
41822
+ data: vue.unref(tableData_box).data,
41823
+ stripe: "",
41824
+ border: "",
41825
+ onCellMouseEnter: hdl.cellMouseEnter,
41826
+ onRowClick: hdl.rowClick,
41827
+ onSelectionChange: hdl.selectionChange,
41828
+ onSortChange: hdl.sortChange
41829
+ }, {
41830
+ default: vue.withCtx(() => [
41831
+ vue.createCommentVNode(" 左手第1列:是否可以选择记录行 "),
41832
+ (vue.unref(tableProps_box).table.selection.yes)
41833
+ ? (vue.openBlock(), vue.createBlock(_component_el_table_column, {
41834
+ key: 0,
41835
+ type: "selection",
41836
+ width: vue.unref(tableProps_box).table.selection.width
41837
+ }, null, 8 /* PROPS */, ["width"]))
41838
+ : vue.createCommentVNode("v-if", true),
41839
+ vue.createCommentVNode(" 列 "),
41840
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tableProps_box).table.cols, (col, colIndex) => {
41841
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: colIndex }, [
41842
+ (col.hdlVisible ? col.hdlVisible({scopeThis: vue.unref(scopeThis_box)}) : true)
41843
+ ? (vue.openBlock(), vue.createBlock(_component_el_table_column, {
41844
+ key: 0,
41845
+ modelValue: col.fieldName,
41846
+ "onUpdate:modelValue": $event => ((col.fieldName) = $event),
41847
+ label: col.label,
41848
+ sortable: col.sortable,
41849
+ "sort-method": (row2, row1)=>{
41850
+ if(col.hdlSortMethod){
41851
+ return col.hdlSortMethod({inherit: {row2, row1}})
41852
+ }else {
41853
+ if(row2.name > row1.name){
41854
+ return 1 // 升序
41855
+ } else {
41856
+ return -1 // 降序
41857
+ }
41858
+ }
41859
+ },
41860
+ width: col.width ? col.width : ''
41861
+ }, {
41862
+ default: vue.withCtx((scope) => [
41863
+ vue.createVNode(_component_el_tooltip, {
41864
+ placement: "left",
41865
+ effect: "dark",
41866
+ disabled: vue.unref(tableProps_box).table.cellTooltip.length === 0
41867
+ }, {
41868
+ content: vue.withCtx(() => [
41869
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(tableProps_box).table.cellTooltip, (item, index) => {
41870
+ return (vue.openBlock(), vue.createElementBlock("div", { key: index }, vue.toDisplayString(item), 1 /* TEXT */))
41871
+ }), 128 /* KEYED_FRAGMENT */))
41872
+ ]),
41873
+ default: vue.withCtx(() => [
41874
+ vue.createElementVNode("div", {
41875
+ onClick: $event => (col.hdlClick ? col.hdlClick({scopeThis: vue.unref(scopeThis_box), row: scope.row}) : null),
41876
+ onMouseover: $event => (hdl.cellMouseover({col, row: scope.row}))
41877
+ }, [
41878
+ (col.show === 'text')
41879
+ ? (vue.openBlock(), vue.createElementBlock("span", {
41880
+ key: 0,
41881
+ style: vue.normalizeStyle(style.cell.text)
41882
+ }, vue.toDisplayString(scope.row[col.fieldName]), 5 /* TEXT, STYLE */))
41883
+ : vue.createCommentVNode("v-if", true),
41884
+ (!col.show)
41885
+ ? (vue.openBlock(), vue.createElementBlock("span", {
41886
+ key: 1,
41887
+ style: vue.normalizeStyle(style.cell.text)
41888
+ }, vue.toDisplayString(scope.row[col.fieldName]), 5 /* TEXT, STYLE */))
41889
+ : vue.createCommentVNode("v-if", true),
41890
+ (col.show === 'expression')
41891
+ ? (vue.openBlock(), vue.createElementBlock("span", {
41892
+ key: 2,
41893
+ style: vue.normalizeStyle(style.cell.text)
41894
+ }, vue.toDisplayString(col.hdlExpression({scopeThis: __props.scopeThis, row: scope.row})), 5 /* TEXT, STYLE */))
41895
+ : vue.createCommentVNode("v-if", true),
41896
+ (col.show === 'switch')
41897
+ ? (vue.openBlock(), vue.createBlock(_component_el_switch, {
41898
+ key: 3,
41899
+ modelValue: scope.row[col.fieldName],
41900
+ "onUpdate:modelValue": $event => ((scope.row[col.fieldName]) = $event),
41901
+ "active-value": col.activeValue,
41902
+ "inactive-value": col.inactiveValue,
41903
+ "active-text": col.activeText,
41904
+ "inactive-text": col.inactiveText,
41905
+ "active-color": col.activeColor,
41906
+ onChange:
41907
+ (valNew) => {
41908
+ if(col.hdlChange){
41909
+ col.hdlChange({scopeThis: vue.unref(scopeThis_box), row: scope.row, inherit: {valNew}});
41910
+ }
41911
+ }
41912
+
41913
+ }, null, 8 /* PROPS */, ["modelValue", "onUpdate:modelValue", "active-value", "inactive-value", "active-text", "inactive-text", "active-color", "onChange"]))
41914
+ : vue.createCommentVNode("v-if", true),
41915
+ (col.show === 'button-group')
41916
+ ? (vue.openBlock(), vue.createBlock(_component_el_button_group, { key: 4 }, {
41917
+ default: vue.withCtx(() => [
41918
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(col.buttonGroup, (item, index) => {
41919
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index }, [
41920
+ (item.hdlVisible ? item.hdlVisible({scopeThis: vue.unref(scopeThis_box), row: scope.row}) : true)
41921
+ ? (vue.openBlock(), vue.createBlock(_component_el_button, {
41922
+ key: index,
41923
+ style: vue.normalizeStyle(style.cell.buttonGroup({item}).style),
41924
+ icon: style.cell.buttonGroup({item}).icon,
41925
+ type: style.cell.buttonGroup({item}).type,
41926
+ size: style.cell.buttonGroup({item}).size,
41927
+ plain: style.cell.buttonGroup({item}).plain,
41928
+ round: style.cell.buttonGroup({item}).round,
41929
+ circle: style.cell.buttonGroup({item}).circle,
41930
+ onClick: $event => (item.hdlClick({scopeThis: vue.unref(scopeThis_box), row: scope.row}))
41931
+ }, {
41932
+ default: vue.withCtx(() => [
41933
+ vue.createTextVNode(vue.toDisplayString(item.text ? item.text : item.hdlText({scopeThis: vue.unref(scopeThis_box), row: scope.row})), 1 /* TEXT */)
41934
+ ]),
41935
+ _: 2 /* DYNAMIC */
41936
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["style", "icon", "type", "size", "plain", "round", "circle", "onClick"]))
41937
+ : vue.createCommentVNode("v-if", true)
41938
+ ], 64 /* STABLE_FRAGMENT */))
41939
+ }), 128 /* KEYED_FRAGMENT */))
41940
+ ]),
41941
+ _: 2 /* DYNAMIC */
41942
+ }, 1024 /* DYNAMIC_SLOTS */))
41943
+ : vue.createCommentVNode("v-if", true),
41944
+ (col.show === 'image')
41945
+ ? (vue.openBlock(), vue.createBlock(_component_el_image, {
41946
+ key: 5,
41947
+ style: vue.normalizeStyle(style.cell.image({col})),
41948
+ src: scope.row[col.fieldName][0] || '',
41949
+ "preview-src-list": scope.row[col.fieldName] || [''],
41950
+ "preview-teleported": true,
41951
+ "hide-on-click-modal": true
41952
+ }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"]))
41953
+ : vue.createCommentVNode("v-if", true),
41954
+ (col.show === 'download')
41955
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 6 }, [
41956
+ (hdl.download({col, row: scope.row}).src)
41957
+ ? (vue.openBlock(), vue.createElementBlock("a", {
41958
+ key: 0,
41959
+ style: {"text-decoration":"underline","color":"#0000ff"},
41960
+ href: hdl.download({col, row: scope.row}).src,
41961
+ download: hdl.download({col, row: scope.row}).fileName
41962
+ }, [
41963
+ vue.createElementVNode("span", null, vue.toDisplayString(hdl.download({col, row: scope.row}).label), 1 /* TEXT */)
41964
+ ], 8 /* PROPS */, _hoisted_4$3))
41965
+ : (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$1, vue.toDisplayString(hdl.download({col, row: scope.row}).label), 1 /* TEXT */))
41966
+ ], 64 /* STABLE_FRAGMENT */))
41967
+ : vue.createCommentVNode("v-if", true),
41968
+ vue.createCommentVNode(" 商品缩略图 "),
41969
+ (col.show === 'd7thumb')
41970
+ ? (vue.openBlock(), vue.createBlock(_component_ly0d7thumb, {
41971
+ key: 7,
41972
+ modelValue: scope.row,
41973
+ "onUpdate:modelValue": $event => ((scope.row) = $event),
41974
+ myProps: {
41975
+ thumb: {
41976
+ fieldName: col.thumb.fieldName,
41977
+ width: col.thumb.width || vue.unref(tableProps_box).table.colShow.ly0d7thumb.thumb.width,
41978
+ height: col.thumb.height || vue.unref(tableProps_box).table.colshow.ly0d7thumb.thumb.height
41979
+ },
41980
+ number: {
41981
+ fieldName: col.number.fieldName
41982
+ },
41983
+ name: {
41984
+ fieldName: col.name.fieldName
41985
+ },
41986
+ readOnly: !!col.readOnly
41987
+ }
41988
+ }, null, 8 /* PROPS */, ["modelValue", "onUpdate:modelValue", "myProps"]))
41989
+ : vue.createCommentVNode("v-if", true),
41990
+ vue.createCommentVNode(" 商品分类 "),
41991
+ (col.show === 'd7group')
41992
+ ? (vue.openBlock(), vue.createBlock(_component_ly0d7group, {
41993
+ key: 8,
41994
+ modelValue: scope.row[col.fieldName],
41995
+ "onUpdate:modelValue": $event => ((scope.row[col.fieldName]) = $event),
41996
+ myProps: {readOnly: !!col.readOnly}
41997
+ }, null, 8 /* PROPS */, ["modelValue", "onUpdate:modelValue", "myProps"]))
41998
+ : vue.createCommentVNode("v-if", true),
41999
+ vue.createCommentVNode(" 商品规格 "),
42000
+ (col.show === 'd7size')
42001
+ ? (vue.openBlock(), vue.createBlock(_component_ly0d7size, {
42002
+ key: 9,
42003
+ modelValue: scope.row[col.fieldName],
42004
+ "onUpdate:modelValue": $event => ((scope.row[col.fieldName]) = $event),
42005
+ myProps: {readOnly: !!col.readOnly}
42006
+ }, null, 8 /* PROPS */, ["modelValue", "onUpdate:modelValue", "myProps"]))
42007
+ : vue.createCommentVNode("v-if", true),
42008
+ vue.createCommentVNode(" 商品标价 "),
42009
+ (col.show === 'd7price')
42010
+ ? (vue.openBlock(), vue.createBlock(_component_ly0d7price, {
42011
+ key: 10,
42012
+ modelValue: scope.row[col.fieldName],
42013
+ "onUpdate:modelValue": $event => ((scope.row[col.fieldName]) = $event),
42014
+ myProps: {readOnly: !!col.readOnly}
42015
+ }, null, 8 /* PROPS */, ["modelValue", "onUpdate:modelValue", "myProps"]))
42016
+ : vue.createCommentVNode("v-if", true)
42017
+ ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_3$5)
42018
+ ]),
42019
+ _: 2 /* DYNAMIC */
42020
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled"])
42021
+ ]),
42022
+ _: 2 /* DYNAMIC */
42023
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "onUpdate:modelValue", "label", "sortable", "sort-method", "width"]))
42024
+ : vue.createCommentVNode("v-if", true)
42025
+ ], 64 /* STABLE_FRAGMENT */))
42026
+ }), 128 /* KEYED_FRAGMENT */))
42027
+ ]),
42028
+ _: 1 /* STABLE */
42029
+ }, 8 /* PROPS */, ["data", "onCellMouseEnter", "onRowClick", "onSelectionChange", "onSortChange"])), [
42030
+ [_directive_loading, vue.unref(tableProps_box).query.loading.visible],
42031
+ [
42032
+ _directive_loading,
42033
+ vue.unref(tableProps_box).query.loading.visible ? vue.unref(tableProps_box).query.loading.text : '',
42034
+ void 0,
42035
+ { text: true }
42036
+ ],
42037
+ [
42038
+ _directive_loading,
42039
+ vue.unref(tableProps_box).query.loading.visible ? vue.unref(tableProps_box).query.loading.spinner : '',
42040
+ void 0,
42041
+ { spinner: true }
42042
+ ],
42043
+ [
42044
+ _directive_loading,
42045
+ vue.unref(tableProps_box).query.loading.visible ? vue.unref(tableProps_box).query.loading.background : '',
42046
+ void 0,
42047
+ { background: true }
42048
+ ]
42049
+ ]),
42050
+ vue.createCommentVNode(" 分页 "),
42051
+ vue.createVNode(_component_el_pagination, {
42052
+ total: vue.unref(tableData_box).total,
42053
+ "page-size": vue.unref(tableProps_box).query.pageSize,
42054
+ "page-sizes": [vue.unref(tableProps_box).query.pageSize],
42055
+ "current-page": vue.unref(tableProps_box).query.currentPage,
42056
+ style: vue.normalizeStyle(style.pagination),
42057
+ onSizeChange: hdl.pageSizeChange,
42058
+ onCurrentChange: hdl.currentPageChange,
42059
+ layout: "total, sizes, prev, pager, next, jumper"
42060
+ }, null, 8 /* PROPS */, ["total", "page-size", "page-sizes", "current-page", "style", "onSizeChange", "onCurrentChange"]),
42061
+ vue.createCommentVNode(" 选择列 "),
42062
+ vue.createVNode(script$e, { tableProps: vue.unref(tableProps_box) }, null, 8 /* PROPS */, ["tableProps"])
42063
+ ]))
42064
+ }
42065
+ }
42066
+
42067
+ };
42068
+
42069
+ script$d.__file = "src/table/Table.vue";
42070
+
42071
+ // 默认值
42072
+
42073
+ var ly0default$1 = {
42074
+ myProps: {
42075
+ popup: {
42076
+ visible: false,
42077
+ title: '',
42078
+ width: "1024px",
42079
+ top: "15vh"
42080
+ },
42081
+ titleLine: {
42082
+ // 标题线
42083
+ text: '',
42084
+ style: {
42085
+ Line: {
42086
+ "margin-bottom": "50px"
42087
+ },
42088
+ text: {
42089
+ "font-size": "large",
42090
+ color: "#828282"
42091
+ }
42092
+ }
42093
+ },
42094
+ topButtonGroups: [],
42095
+ table: {
42096
+ colShow: {
42097
+ // 列元素类型
42098
+ image: {
42099
+ // 图标
42100
+ width: "40px",
42101
+ height: "30px"
42102
+ },
42103
+ download: {
42104
+ // 下载
42105
+ fileName: "new-file",
42106
+ // 下载文件名
42107
+ downloadLabel: "点击这里下载",
42108
+ // 下载标签
42109
+ downloadLabelNoSrc: "没有可供下载的资源" // 下载标签
42110
+ },
42111
+ ly0d7thumb: {
42112
+ // 商品图标
42113
+ thumb: {
42114
+ width: "80px",
42115
+ height: "60px"
42116
+ }
42117
+ }
42118
+ },
42119
+ selection: {
42120
+ // 行选择器
42121
+ yes: false,
42122
+ width: "48px" // 行选择器的列宽度
42123
+ },
42124
+ cellTooltip: [],
42125
+ // 单元格提示信息
42126
+ pickCol: {
42127
+ // 选择列
42128
+ colsInit: [],
42129
+ popup: {
42130
+ visible: false
42131
+ }
42132
+ },
42133
+ excel: {
42134
+ fileName: "table-to-excel.xlsx" // 另存excel文件名}
42135
+ }
42136
+ },
42137
+ query: {
42138
+ // 查询体
42139
+ sort: {
42140
+ label: "",
42141
+ order: ""
42142
+ },
42143
+ pageSize: 10,
42144
+ currentPage: 1,
42145
+ loading: {
42146
+ visible: false,
42147
+ text: "加载中...",
42148
+ spinner: 'el-icon-loading',
42149
+ background: 'rgba(0, 0, 0, 0.8)'
42150
+ }
42151
+ }
42152
+ }};
42153
+
42154
+ var script$c = {
42155
+ __name: 'Index',
42156
+ props: {
42157
+ modelValue: {
42158
+ type: Object,
42159
+ default: () => ({})
42160
+ },
42161
+ myProps: {
42162
+ type: Object,
42163
+ default: () => ({})
42164
+ },
42165
+ scopeThis: {
42166
+ type: Object,
42167
+ default: () => ({})
42168
+ }
42169
+ },
42170
+ setup(__props) {
42171
+
42172
+ const props = __props;
42173
+
42174
+ // 顶层组件的props属性需做响应性包装,页面和js可以使用相同的命名
42175
+ let tableData_box = vue.reactive(props.modelValue);
42176
+ const tableProps_box = vue.reactive(unclassified.deepClone.deepMerge(
42177
+ unclassified.deepClone.deepClone(ly0default$1.myProps),
42178
+ props.myProps
42179
+ ));
42180
+
42181
+ const scopeThis_box = vue.reactive(props.scopeThis);
42182
+
42183
+ return (_ctx, _cache) => {
42184
+ const _component_el_dialog = vue.resolveComponent("el-dialog");
42185
+
42186
+ return (tableProps_box.popup.visible)
42187
+ ? (vue.openBlock(), vue.createBlock(_component_el_dialog, {
42188
+ key: 0,
42189
+ modelValue: tableProps_box.popup.visible,
42190
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((tableProps_box.popup.visible) = $event)),
42191
+ "custom-class": 'code-template-dialog',
42192
+ "close-on-press-escape": true,
42193
+ "append-to-body": "",
42194
+ title: tableProps_box.popup.title,
42195
+ width: tableProps_box.popup.width,
42196
+ top: tableProps_box.popup.top,
42197
+ "destroy-on-close": true
42198
+ }, {
42199
+ default: vue.withCtx(() => [
42200
+ vue.createVNode(script$d, {
42201
+ modelValue: vue.unref(tableData_box),
42202
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(tableData_box) ? (tableData_box).value = $event : tableData_box = $event)),
42203
+ myProps: tableProps_box,
42204
+ scopeThis: scopeThis_box
42205
+ }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis"])
42206
+ ]),
42207
+ _: 1 /* STABLE */
42208
+ }, 8 /* PROPS */, ["modelValue", "title", "width", "top"]))
42209
+ : (vue.openBlock(), vue.createBlock(script$d, {
42210
+ key: 1,
42211
+ modelValue: vue.unref(tableData_box),
42212
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (vue.isRef(tableData_box) ? (tableData_box).value = $event : tableData_box = $event)),
42213
+ myProps: tableProps_box,
42214
+ scopeThis: scopeThis_box
42215
+ }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis"]))
42216
+ }
42217
+ }
42218
+
42219
+ };
42220
+
42221
+ script$c.__file = "src/table/Index.vue";
41424
42222
 
41425
42223
  var ly0default = {
41426
42224
  myProps: {
@@ -44279,9 +45077,10 @@ script.__file = "src/ly0d7thumb/index.vue";
44279
45077
  var index = {
44280
45078
  install(app, options) {
44281
45079
  // 全局注册组件
44282
- app.component('ly0Form', script$e);
44283
- app.component('ly0Menu', script$d);
44284
- app.component('ly0Richtext', script$c);
45080
+ app.component('ly0Form', script$h);
45081
+ app.component('ly0Menu', script$g);
45082
+ app.component('ly0Table', script$c);
45083
+ app.component('ly0Richtext', script$f);
44285
45084
  app.component('ly0Upload', upload.Upload);
44286
45085
  app.component('ly0Upload_avatar', upload.Upload_avatar);
44287
45086
  app.component('ly0Upload_carplate', upload.Upload_carplate);