hy-dispatch-ui-v3 0.2.31 → 0.2.33

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.
Files changed (80) hide show
  1. package/dist/tailwind.css +174 -454
  2. package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +4 -4
  3. package/es/components/hyAudioPlayer/style/audioPlayer.scss +11 -12
  4. package/es/components/hyButton/button.vue.mjs +112 -65
  5. package/es/components/hyButton/style/button.scss +291 -233
  6. package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +1 -1
  7. package/es/components/hyForm/form.vue.mjs +2 -1
  8. package/es/components/hyForm/index.mjs +1 -1
  9. package/es/components/hyForm/js/useAppForm.mjs +1 -2
  10. package/es/components/hyForm/style/form.scss +56 -54
  11. package/es/components/hyIcon/style/icon.scss +1 -1
  12. package/es/components/hyIconBox/style/iconBox.scss +19 -18
  13. package/es/components/hyInput/input.vue.mjs +4 -1
  14. package/es/components/hyMenu/menu.vue.mjs +1 -1
  15. package/es/components/hyMenu/style/menu.scss +1 -1
  16. package/es/components/hySearch/index.mjs +1 -1
  17. package/es/components/hySearch/style/search.scss +50 -50
  18. package/es/components/hyTable/cpns/virtualTable.vue.mjs +342 -319
  19. package/es/components/hyTable/js/index.mjs +19 -3
  20. package/es/components/hyTable/js/useAppTable.mjs +1 -1
  21. package/es/components/hyTable/table.vue.mjs +31 -11
  22. package/es/components/hyTableForm/batchTableForm.vue.mjs +478 -0
  23. package/es/components/hyTableForm/index.mjs +4 -1
  24. package/es/components/hyTableForm/js/index.mjs +123 -0
  25. package/es/components/hyTableForm/js/useAppTableForm.mjs +47 -0
  26. package/es/components/hyTableForm/style/batchTableForm.scss +127 -0
  27. package/es/components/hyTableForm/style/tableForm.scss +42 -0
  28. package/es/components/hyTableForm/tableForm.vue.mjs +452 -7
  29. package/es/components/hyTooltip/tooltip.vue.mjs +2 -2
  30. package/es/components/hyVideoPlayer/cpns/mediaLoading.vue.mjs +1 -1
  31. package/es/components/hyVideoPlayer/style/mediaLoading.scss +5 -5
  32. package/es/components/hyVideoPlayer/style/videoPlayer.scss +7 -6
  33. package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +6 -6
  34. package/es/components/index.mjs +4 -3
  35. package/es/index.mjs +4 -3
  36. package/es/static/hy-svg-icons/hy-icon-dispatch-linear-map-treelist.js +8 -0
  37. package/es/static/hy-svg-icons/hy-icon-dispatch-share-guidao.js +8 -0
  38. package/es/style/tailwind.scss +133 -1
  39. package/es/utils/handler.mjs +4 -4
  40. package/es/version.mjs +1 -1
  41. package/lib/components/hyAudioPlayer/audioPlayer.vue.js +4 -4
  42. package/lib/components/hyAudioPlayer/style/audioPlayer.scss +11 -12
  43. package/lib/components/hyButton/button.vue.js +111 -64
  44. package/lib/components/hyButton/style/button.scss +291 -233
  45. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +1 -1
  46. package/lib/components/hyForm/form.vue.js +2 -1
  47. package/lib/components/hyForm/index.js +1 -0
  48. package/lib/components/hyForm/js/useAppForm.js +1 -2
  49. package/lib/components/hyForm/style/form.scss +56 -54
  50. package/lib/components/hyIcon/style/icon.scss +1 -1
  51. package/lib/components/hyIconBox/style/iconBox.scss +19 -18
  52. package/lib/components/hyInput/input.vue.js +4 -1
  53. package/lib/components/hyMenu/menu.vue.js +1 -1
  54. package/lib/components/hyMenu/style/menu.scss +1 -1
  55. package/lib/components/hySearch/index.js +1 -0
  56. package/lib/components/hySearch/style/search.scss +50 -50
  57. package/lib/components/hyTable/cpns/virtualTable.vue.js +340 -317
  58. package/lib/components/hyTable/js/index.js +19 -3
  59. package/lib/components/hyTable/js/useAppTable.js +1 -1
  60. package/lib/components/hyTable/table.vue.js +31 -11
  61. package/lib/components/hyTableForm/batchTableForm.vue.js +482 -0
  62. package/lib/components/hyTableForm/index.js +5 -0
  63. package/lib/components/hyTableForm/js/index.js +127 -0
  64. package/lib/components/hyTableForm/js/useAppTableForm.js +49 -0
  65. package/lib/components/hyTableForm/style/batchTableForm.scss +127 -0
  66. package/lib/components/hyTableForm/style/tableForm.scss +42 -0
  67. package/lib/components/hyTableForm/tableForm.vue.js +451 -6
  68. package/lib/components/hyTooltip/tooltip.vue.js +2 -2
  69. package/lib/components/hyVideoPlayer/cpns/mediaLoading.vue.js +1 -1
  70. package/lib/components/hyVideoPlayer/style/mediaLoading.scss +5 -5
  71. package/lib/components/hyVideoPlayer/style/videoPlayer.scss +7 -6
  72. package/lib/components/hyVideoPlayer/videoPlayer.vue.js +6 -6
  73. package/lib/components/index.js +35 -30
  74. package/lib/index.js +35 -30
  75. package/lib/static/hy-svg-icons/hy-icon-dispatch-linear-map-treelist.js +8 -0
  76. package/lib/static/hy-svg-icons/hy-icon-dispatch-share-guidao.js +8 -0
  77. package/lib/style/tailwind.scss +133 -1
  78. package/lib/utils/handler.js +4 -4
  79. package/lib/version.js +1 -1
  80. package/package.json +5 -3
@@ -1,10 +1,10 @@
1
- import { ref, computed, openBlock, createBlock, unref, withCtx, renderSlot, createCommentVNode, createElementBlock, Fragment, createElementVNode, normalizeClass, renderList, normalizeStyle, withModifiers, createVNode, mergeProps, createTextVNode, toDisplayString, normalizeProps, guardReactiveProps } from 'vue';
1
+ import { computed, ref, openBlock, createBlock, unref, withCtx, renderSlot, createCommentVNode, createElementBlock, Fragment, renderList, normalizeStyle, withModifiers, normalizeClass, createVNode, mergeProps, createTextVNode, toDisplayString, createElementVNode, normalizeProps, guardReactiveProps } from 'vue';
2
2
  import { ElTableV2, ElIcon, ElCheckbox, ElDropdown, ElDropdownMenu, ElDropdownItem } from 'element-plus';
3
3
  import { ArrowRight, MoreFilled } from '@element-plus/icons-vue';
4
4
  import { operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler } from '../js/index.mjs';
5
5
  import _sfc_main$1 from './headerItem.vue.mjs';
6
6
  import { useLocale } from '../../../hooks/useLocale.mjs';
7
- import { isNumber, isEmpty, isBoolean, isArray, isFunction } from '../../../utils/is.mjs';
7
+ import { isNumber, isEmpty, isBoolean, isArray, isString, isFunction } from '../../../utils/is.mjs';
8
8
  import { HyTooltip } from '../../hyTooltip/index.mjs';
9
9
  import { HyIcon } from '../../hyIcon/index.mjs';
10
10
 
@@ -12,7 +12,8 @@ const _sfc_main = {
12
12
  __name: "virtualTable",
13
13
  props: {
14
14
  rowKey: {
15
- type: [String, Number]
15
+ type: [String, Number],
16
+ default: "id"
16
17
  },
17
18
  width: {
18
19
  type: Number
@@ -44,32 +45,27 @@ const _sfc_main = {
44
45
  type: Object,
45
46
  default: () => ({})
46
47
  },
48
+ rowClassName: {
49
+ type: [String, Function]
50
+ },
47
51
  onRowClick: {
48
52
  type: Function
49
53
  },
50
54
  onRowContextmenu: {
51
55
  type: Function
56
+ },
57
+ expandMode: {
58
+ // 展开模式,不支持树形展开
59
+ type: String,
60
+ default: "default"
61
+ // deafult-默认 accordion-手风琴
52
62
  }
53
63
  },
54
- emits: ["search", "select", "select-all"],
64
+ emits: ["search", "select", "select-all", "expand-change"],
55
65
  setup(__props, { expose: __expose, emit: __emit }) {
56
66
  const props = __props;
57
67
  const emits = __emit;
58
68
  const { t } = useLocale();
59
- const expandedKeys = ref([]);
60
- const expandedMap = computed(() => {
61
- return expandedKeys.value.reduce((keyMap, key, index) => {
62
- keyMap.set(key, index);
63
- return keyMap;
64
- }, /* @__PURE__ */ new Map());
65
- });
66
- function onRowExpandSwitch({ rowKey }) {
67
- if (expandedMap.value.has(rowKey)) {
68
- expandedKeys.value.splice(expandedMap.value.get(rowKey), 1);
69
- } else {
70
- expandedKeys.value.push(rowKey);
71
- }
72
- }
73
69
  const avgWidth = computed(() => {
74
70
  const { total, totalWidth } = props.columns.reduce(
75
71
  ({ total: total2, totalWidth: totalWidth2 }, column) => {
@@ -109,7 +105,7 @@ const _sfc_main = {
109
105
  return props.data.map((item) => {
110
106
  item.children = [
111
107
  {
112
- id: /* @__PURE__ */ Symbol("expandKey"),
108
+ [props.rowKey]: /* @__PURE__ */ Symbol("expandKey"),
113
109
  rowType: "expand",
114
110
  dataKey: getRowKey(item)
115
111
  }
@@ -125,6 +121,15 @@ const _sfc_main = {
125
121
  function getRowKey(row) {
126
122
  return row[props.rowKey];
127
123
  }
124
+ function rowClass({ rowData: row, rowIndex }) {
125
+ let className = [];
126
+ if (isString(props.rowClassName)) {
127
+ className.push(props.rowClassName);
128
+ } else if (isFunction(props.rowClassName)) {
129
+ className.push(props.rowClassName({ row, rowIndex }));
130
+ }
131
+ return className.filter(Boolean).join(" ");
132
+ }
128
133
  function generateDataSourceMap(list, dataMap = /* @__PURE__ */ new Map()) {
129
134
  return (list || []).reduce((dataMap2, data) => {
130
135
  if (data.children) {
@@ -247,22 +252,46 @@ const _sfc_main = {
247
252
  const { allChecked } = handler(list, checkedNodeMap, indeterminateKeys2);
248
253
  return { checkedNodeMap, indeterminateKeys: indeterminateKeys2, allChecked };
249
254
  }
250
- __expose({
251
- toggleRowSelection,
252
- toggleAllSelection,
253
- toggleRowExpansion(row, expanded) {
254
- const index = expandedMap.value.get(getRowKey(row));
255
- const isExpanded = isBoolean(expanded) ? expanded : !isNumber(index);
256
- if (isExpanded) {
257
- if (!isNumber(index)) {
255
+ const expandedKeys = ref([]);
256
+ const expandedMap = computed(() => {
257
+ return expandedKeys.value.reduce((keyMap, key, index) => {
258
+ keyMap.set(key, index);
259
+ return keyMap;
260
+ }, /* @__PURE__ */ new Map());
261
+ });
262
+ function toggleRowExpansion(row, expanded) {
263
+ const index = expandedMap.value.get(getRowKey(row));
264
+ const isExpanded = isBoolean(expanded) ? expanded : !isNumber(index);
265
+ if (isExpanded) {
266
+ if (!isNumber(index)) {
267
+ if (props.expandMode === "accordion" && isExpandTable.value) {
268
+ expandedKeys.value = [getRowKey(row)];
269
+ } else {
258
270
  expandedKeys.value.push(getRowKey(row));
259
271
  }
260
- } else {
261
- if (isNumber(index)) {
262
- expandedKeys.value.splice(index, 1);
263
- }
264
272
  }
265
- },
273
+ } else {
274
+ if (isNumber(index)) {
275
+ expandedKeys.value.splice(index, 1);
276
+ }
277
+ }
278
+ if (isExpandTable.value) {
279
+ const expandedList = expandedKeys.value.reduce((list, key) => {
280
+ list.push(dataSourceMap.value.get(key));
281
+ return list;
282
+ }, []);
283
+ emits("expand-change", row, expandedList);
284
+ } else {
285
+ emits("expand-change", row, isExpanded);
286
+ }
287
+ }
288
+ function onRowExpandSwitch({ row, rowKey }) {
289
+ toggleRowExpansion(row, !expandedMap.value.has(rowKey));
290
+ }
291
+ __expose({
292
+ toggleRowSelection,
293
+ toggleAllSelection,
294
+ toggleRowExpansion,
266
295
  clearSelection: () => {
267
296
  isAllChecked.value = false;
268
297
  selectedMap.value.clear();
@@ -283,6 +312,7 @@ const _sfc_main = {
283
312
  "estimated-row-height": 50,
284
313
  "expand-column-key": expandColumn.value?.key,
285
314
  fixed: "",
315
+ "row-class": rowClass,
286
316
  "row-event-handlers": {
287
317
  onClick: onRowClickHandler,
288
318
  onContextmenu: onContextmenuHandler
@@ -332,308 +362,301 @@ const _sfc_main = {
332
362
  { key: 1 },
333
363
  [
334
364
  createCommentVNode(" \u5355\u5143\u683C\u5185\u5BB9 "),
335
- createElementVNode("div", {
336
- class: normalizeClass(["hy-el-table-v2__row is-customized", [
337
- `hy-el-table-v2__row-depth-${depth}`,
338
- { "is-expanded": expandedMap.value.has(getRowKey(row)) }
339
- ]]),
340
- role: "row",
341
- rowkey: getRowKey(row)
342
- }, [
343
- (openBlock(true), createElementBlock(
344
- Fragment,
345
- null,
346
- renderList(columns, (column, cellIndex) => {
347
- return openBlock(), createElementBlock(
348
- "div",
349
- {
350
- key: cellIndex,
351
- class: "hy-el-table-v2__row-cell",
352
- role: "cell",
353
- style: normalizeStyle([{ "flex": "0 0 auto" }, { width: `${column.width}px` }])
354
- },
355
- [
356
- column.type === "expand" ? (openBlock(), createElementBlock(
365
+ (openBlock(true), createElementBlock(
366
+ Fragment,
367
+ null,
368
+ renderList(columns, (column, cellIndex) => {
369
+ return openBlock(), createElementBlock(
370
+ "div",
371
+ {
372
+ key: cellIndex,
373
+ class: "hy-el-table-v2__row-cell",
374
+ role: "cell",
375
+ style: normalizeStyle([{ "flex": "0 0 auto" }, { width: `${column.width}px` }])
376
+ },
377
+ [
378
+ column.type === "expand" ? (openBlock(), createElementBlock(
379
+ Fragment,
380
+ { key: 0 },
381
+ [
382
+ row.children && row.children.length ? (openBlock(), createElementBlock("button", {
383
+ key: 0,
384
+ type: "button",
385
+ "aria-label": "\u5C55\u5F00\u5F53\u524D\u884C",
386
+ "aria-expanded": "false",
387
+ class: normalizeClass(["hy-el-table-v2__expand-icon", { "is-expanded": expandedMap.value.has(getRowKey(row)) }]),
388
+ onClick: withModifiers(($event) => onRowExpandSwitch({
389
+ rowData: _ctx.rowData,
390
+ row,
391
+ rowKey: getRowKey(row)
392
+ }), ["stop"])
393
+ }, [
394
+ createVNode(unref(ElIcon), {
395
+ class: "text-main",
396
+ style: normalizeStyle({ "margin-inline-start": `${depth * 12}px` })
397
+ }, {
398
+ default: withCtx(() => [
399
+ createVNode(unref(ArrowRight))
400
+ ]),
401
+ _: 1
402
+ /* STABLE */
403
+ }, 8, ["style"])
404
+ ], 10, ["onClick"])) : (openBlock(), createElementBlock(
405
+ "div",
406
+ {
407
+ key: 1,
408
+ class: "w-3 h-3",
409
+ style: normalizeStyle({ "margin-inline-start": `${(depth + 1) * 12}px` })
410
+ },
411
+ null,
412
+ 4
413
+ /* STYLE */
414
+ ))
415
+ ],
416
+ 64
417
+ /* STABLE_FRAGMENT */
418
+ )) : createCommentVNode("v-if", true),
419
+ column.type === "selection" ? (openBlock(), createBlock(unref(ElCheckbox), {
420
+ key: 1,
421
+ "model-value": selectedMap.value.has(getRowKey(row)),
422
+ indeterminate: indeterminateKeys.value.has(getRowKey(row)),
423
+ disabled: !isSelectable(row),
424
+ onClick: withModifiers(($event) => switchCheckHandler(row), ["stop"])
425
+ }, null, 8, ["model-value", "indeterminate", "disabled", "onClick"])) : column?.slot && (column.type !== "expand" || !isExpandTable.value) ? renderSlot(_ctx.$slots, column?.slot, mergeProps({
426
+ key: 2,
427
+ ref_for: true
428
+ }, { column, row, $index, cellIndex })) : column.type === "index" ? (openBlock(), createElementBlock(
429
+ Fragment,
430
+ { key: 3 },
431
+ [
432
+ createTextVNode(
433
+ toDisplayString(columnIndexHandler({ column, row, $index, cellIndex })),
434
+ 1
435
+ /* TEXT */
436
+ )
437
+ ],
438
+ 64
439
+ /* STABLE_FRAGMENT */
440
+ )) : column.type === "operator" ? (openBlock(), createElementBlock("div", {
441
+ key: 4,
442
+ class: "w-full flex items-center justify-between text-main",
443
+ onClick: withModifiers(() => {
444
+ }, ["stop"]),
445
+ onContextmenu: withModifiers(() => {
446
+ }, ["stop"])
447
+ }, [
448
+ (openBlock(true), createElementBlock(
357
449
  Fragment,
358
- { key: 0 },
359
- [
360
- row.children && row.children.length ? (openBlock(), createElementBlock("button", {
361
- key: 0,
362
- type: "button",
363
- "aria-label": "\u5C55\u5F00\u5F53\u524D\u884C",
364
- "aria-expanded": "false",
365
- class: normalizeClass(["hy-el-table-v2__expand-icon", { "is-expanded": expandedMap.value.has(getRowKey(row)) }]),
366
- onClick: withModifiers(($event) => onRowExpandSwitch({
367
- rowData: _ctx.rowData,
368
- rowKey: getRowKey(row)
369
- }), ["stop"])
370
- }, [
371
- createVNode(unref(ElIcon), {
372
- style: normalizeStyle({ "margin-inline-start": `${depth * 12}px` })
373
- }, {
450
+ null,
451
+ renderList(unref(operatorFilterHandler)(
452
+ column,
453
+ { column, row, $index, cellIndex },
454
+ "default"
455
+ ), (citem, cindex) => {
456
+ return openBlock(), createBlock(unref(HyTooltip), {
457
+ key: cindex,
458
+ "is-always": "",
459
+ overLine: 1,
460
+ content: citem.label
461
+ }, {
462
+ default: withCtx(() => [
463
+ createElementVNode("div", {
464
+ class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border cursor-pointer", citem.className]),
465
+ onClick: ($event) => unref(operatorClickHandler)(
466
+ cindex,
467
+ column,
468
+ { column, row, $index, cellIndex },
469
+ "default"
470
+ )
471
+ }, [
472
+ createVNode(unref(HyIcon), {
473
+ "svg-name": citem.svgName,
474
+ "class-name": "!w-4 !h-4"
475
+ }, null, 8, ["svg-name"]),
476
+ citem.subLabel ? (openBlock(), createElementBlock(
477
+ "div",
478
+ {
479
+ key: 0,
480
+ class: "mt-1 whitespace-nowrap"
481
+ },
482
+ toDisplayString(citem.subLabel),
483
+ 1
484
+ /* TEXT */
485
+ )) : (openBlock(), createElementBlock("div", {
486
+ key: 1,
487
+ class: "mt-1 whitespace-nowrap"
488
+ }, "\xA0"))
489
+ ], 10, ["onClick"])
490
+ ]),
491
+ _: 2
492
+ /* DYNAMIC */
493
+ }, 1032, ["content"]);
494
+ }),
495
+ 128
496
+ /* KEYED_FRAGMENT */
497
+ )),
498
+ unref(operatorFilterHandler)(
499
+ column,
500
+ { column, row, $index, cellIndex },
501
+ "more"
502
+ )?.length ? (openBlock(), createBlock(unref(ElDropdown), {
503
+ key: 0,
504
+ ref_for: true,
505
+ ref: "operatorDropdownRef",
506
+ trigger: "click",
507
+ "popper-style": "min-width: 150px",
508
+ placement: "bottom",
509
+ onCommand: ($event) => unref(operatorClickHandler)(
510
+ $event,
511
+ column,
512
+ { column, row, $index, cellIndex },
513
+ "more"
514
+ )
515
+ }, {
516
+ dropdown: withCtx(() => [
517
+ createVNode(
518
+ unref(ElDropdownMenu),
519
+ null,
520
+ {
374
521
  default: withCtx(() => [
375
- createVNode(unref(ArrowRight))
522
+ (openBlock(true), createElementBlock(
523
+ Fragment,
524
+ null,
525
+ renderList(unref(operatorFilterHandler)(
526
+ column,
527
+ { column, row, $index, cellIndex },
528
+ "more"
529
+ ), (citem, cindex) => {
530
+ return openBlock(), createBlock(unref(ElDropdownItem), {
531
+ key: cindex,
532
+ command: cindex,
533
+ disabled: unref(operatorDisabledHandler)(citem, {
534
+ column,
535
+ row,
536
+ $index,
537
+ cellIndex
538
+ })
539
+ }, {
540
+ default: withCtx(() => [
541
+ createElementVNode("span", null, [
542
+ createElementVNode(
543
+ "span",
544
+ null,
545
+ toDisplayString(citem.label),
546
+ 1
547
+ /* TEXT */
548
+ ),
549
+ unref(operatorDisabledHandler)(citem, {
550
+ column,
551
+ row,
552
+ $index,
553
+ cellIndex
554
+ }) ? (openBlock(), createElementBlock(
555
+ "span",
556
+ {
557
+ key: 0,
558
+ class: "text-xs leading-1"
559
+ },
560
+ "\uFF08" + toDisplayString(unref(operatorDisableTextdHandler)(citem, {
561
+ column,
562
+ row,
563
+ $index,
564
+ cellIndex
565
+ })) + "\uFF09",
566
+ 1
567
+ /* TEXT */
568
+ )) : createCommentVNode("v-if", true)
569
+ ])
570
+ ]),
571
+ _: 2
572
+ /* DYNAMIC */
573
+ }, 1032, ["command", "disabled"]);
574
+ }),
575
+ 128
576
+ /* KEYED_FRAGMENT */
577
+ ))
376
578
  ]),
377
- _: 1
378
- /* STABLE */
379
- }, 8, ["style"])
380
- ], 10, ["onClick"])) : (openBlock(), createElementBlock(
381
- "div",
382
- {
383
- key: 1,
384
- class: "w-3 h-3",
385
- style: normalizeStyle({ "margin-inline-start": `${(depth + 1) * 12}px` })
579
+ _: 2
580
+ /* DYNAMIC */
386
581
  },
387
- null,
388
- 4
389
- /* STYLE */
390
- ))
391
- ],
392
- 64
393
- /* STABLE_FRAGMENT */
394
- )) : createCommentVNode("v-if", true),
395
- column.type === "selection" ? (openBlock(), createBlock(unref(ElCheckbox), {
396
- key: 1,
397
- "model-value": selectedMap.value.has(getRowKey(row)),
398
- indeterminate: indeterminateKeys.value.has(getRowKey(row)),
399
- disabled: !isSelectable(row),
400
- onClick: withModifiers(($event) => switchCheckHandler(row), ["stop"])
401
- }, null, 8, ["model-value", "indeterminate", "disabled", "onClick"])) : column?.slot && (column.type !== "expand" || !isExpandTable.value) ? renderSlot(_ctx.$slots, column?.slot, mergeProps({
402
- key: 2,
403
- ref_for: true
404
- }, { column, row, $index, cellIndex })) : column.type === "index" ? (openBlock(), createElementBlock(
405
- Fragment,
406
- { key: 3 },
407
- [
408
- createTextVNode(
409
- toDisplayString(columnIndexHandler({ column, row, $index, cellIndex })),
410
- 1
411
- /* TEXT */
582
+ 1024
583
+ /* DYNAMIC_SLOTS */
412
584
  )
413
- ],
414
- 64
415
- /* STABLE_FRAGMENT */
416
- )) : column.type === "operator" ? (openBlock(), createElementBlock("div", {
417
- key: 4,
418
- class: "w-full flex items-center justify-between text-main",
419
- onClick: withModifiers(() => {
420
- }, ["stop"]),
421
- onContextmenu: withModifiers(() => {
422
- }, ["stop"])
423
- }, [
424
- (openBlock(true), createElementBlock(
425
- Fragment,
426
- null,
427
- renderList(unref(operatorFilterHandler)(
428
- column,
429
- { column, row, $index, cellIndex },
430
- "default"
431
- ), (citem, cindex) => {
432
- return openBlock(), createBlock(unref(HyTooltip), {
433
- key: cindex,
585
+ ]),
586
+ default: withCtx(() => [
587
+ createElementVNode("span", null, [
588
+ createVNode(unref(HyTooltip), {
434
589
  "is-always": "",
435
590
  overLine: 1,
436
- content: citem.label
591
+ content: unref(t)("table.moreOperations")
437
592
  }, {
438
593
  default: withCtx(() => [
439
- createElementVNode("div", {
440
- class: normalizeClass(["w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border cursor-pointer", citem.className]),
441
- onClick: ($event) => unref(operatorClickHandler)(
442
- cindex,
443
- column,
444
- { column, row, $index, cellIndex },
445
- "default"
446
- )
447
- }, [
448
- createVNode(unref(HyIcon), {
449
- "svg-name": citem.svgName,
450
- "class-name": "!w-4 !h-4"
451
- }, null, 8, ["svg-name"]),
452
- citem.subLabel ? (openBlock(), createElementBlock(
594
+ createElementVNode("div", { class: "w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-main text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border cursor-pointer" }, [
595
+ createElementVNode("div", { class: "w-4 h-4" }, [
596
+ createVNode(unref(ElIcon), {
597
+ size: "16",
598
+ color: "rgba(var(--hy-main))"
599
+ }, {
600
+ default: withCtx(() => [
601
+ createVNode(unref(MoreFilled))
602
+ ]),
603
+ _: 1
604
+ /* STABLE */
605
+ })
606
+ ]),
607
+ createElementVNode(
453
608
  "div",
454
- {
455
- key: 0,
456
- class: "mt-1 whitespace-nowrap"
457
- },
458
- toDisplayString(citem.subLabel),
609
+ { class: "mt-1" },
610
+ toDisplayString(unref(t)("table.more")),
459
611
  1
460
612
  /* TEXT */
461
- )) : (openBlock(), createElementBlock("div", {
462
- key: 1,
463
- class: "mt-1 whitespace-nowrap"
464
- }, "\xA0"))
465
- ], 10, ["onClick"])
613
+ )
614
+ ])
466
615
  ]),
467
- _: 2
468
- /* DYNAMIC */
469
- }, 1032, ["content"]);
470
- }),
471
- 128
472
- /* KEYED_FRAGMENT */
473
- )),
474
- unref(operatorFilterHandler)(
475
- column,
476
- { column, row, $index, cellIndex },
477
- "more"
478
- )?.length ? (openBlock(), createBlock(unref(ElDropdown), {
479
- key: 0,
480
- ref_for: true,
481
- ref: "operatorDropdownRef",
482
- trigger: "click",
483
- "popper-style": "min-width: 150px",
484
- placement: "bottom",
485
- onCommand: ($event) => unref(operatorClickHandler)(
486
- $event,
616
+ _: 1
617
+ /* STABLE */
618
+ }, 8, ["content"])
619
+ ])
620
+ ]),
621
+ _: 2
622
+ /* DYNAMIC */
623
+ }, 1032, ["onCommand"])) : createCommentVNode("v-if", true)
624
+ ], 40, ["onClick", "onContextmenu"])) : column.type === "default" ? (openBlock(), createElementBlock(
625
+ Fragment,
626
+ { key: 5 },
627
+ [
628
+ !unref(isEmpty)(
629
+ unref(renderContentHandler)(column, {
487
630
  column,
488
- { column, row, $index, cellIndex },
489
- "more"
490
- )
491
- }, {
492
- dropdown: withCtx(() => [
493
- createVNode(
494
- unref(ElDropdownMenu),
495
- null,
496
- {
497
- default: withCtx(() => [
498
- (openBlock(true), createElementBlock(
499
- Fragment,
500
- null,
501
- renderList(unref(operatorFilterHandler)(
502
- column,
503
- { column, row, $index, cellIndex },
504
- "more"
505
- ), (citem, cindex) => {
506
- return openBlock(), createBlock(unref(ElDropdownItem), {
507
- key: cindex,
508
- command: cindex,
509
- disabled: unref(operatorDisabledHandler)(citem, {
510
- column,
511
- row,
512
- $index,
513
- cellIndex
514
- })
515
- }, {
516
- default: withCtx(() => [
517
- createElementVNode("span", null, [
518
- createElementVNode(
519
- "span",
520
- null,
521
- toDisplayString(citem.label),
522
- 1
523
- /* TEXT */
524
- ),
525
- unref(operatorDisabledHandler)(citem, {
526
- column,
527
- row,
528
- $index,
529
- cellIndex
530
- }) ? (openBlock(), createElementBlock(
531
- "span",
532
- {
533
- key: 0,
534
- class: "text-xs leading-1"
535
- },
536
- "\uFF08" + toDisplayString(unref(operatorDisableTextdHandler)(citem, {
537
- column,
538
- row,
539
- $index,
540
- cellIndex
541
- })) + "\uFF09",
542
- 1
543
- /* TEXT */
544
- )) : createCommentVNode("v-if", true)
545
- ])
546
- ]),
547
- _: 2
548
- /* DYNAMIC */
549
- }, 1032, ["command", "disabled"]);
550
- }),
551
- 128
552
- /* KEYED_FRAGMENT */
553
- ))
554
- ]),
555
- _: 2
556
- /* DYNAMIC */
557
- },
558
- 1024
559
- /* DYNAMIC_SLOTS */
560
- )
561
- ]),
562
- default: withCtx(() => [
563
- createElementVNode("span", null, [
564
- createVNode(unref(HyTooltip), {
565
- "is-always": "",
566
- overLine: 1,
567
- content: unref(t)("table.moreOperations")
568
- }, {
569
- default: withCtx(() => [
570
- createElementVNode("div", { class: "w-[40px] h-[48px] inline-flex flex-col items-center justify-center text-main text-xs hover:font-bold border border-transparent hover:border-theme hover:shadow-[0px_0px_5px_0px_rgba(var(--hy-theme),0.5)] rounded box-border cursor-pointer" }, [
571
- createElementVNode("div", { class: "w-4 h-4" }, [
572
- createVNode(unref(ElIcon), {
573
- size: "16",
574
- color: "rgba(var(--hy-main))"
575
- }, {
576
- default: withCtx(() => [
577
- createVNode(unref(MoreFilled))
578
- ]),
579
- _: 1
580
- /* STABLE */
581
- })
582
- ]),
583
- createElementVNode(
584
- "div",
585
- { class: "mt-1" },
586
- toDisplayString(unref(t)("table.more")),
587
- 1
588
- /* TEXT */
589
- )
590
- ])
591
- ]),
592
- _: 1
593
- /* STABLE */
594
- }, 8, ["content"])
595
- ])
596
- ]),
597
- _: 2
598
- /* DYNAMIC */
599
- }, 1032, ["onCommand"])) : createCommentVNode("v-if", true)
600
- ], 40, ["onClick", "onContextmenu"])) : column.type === "default" ? (openBlock(), createElementBlock(
601
- Fragment,
602
- { key: 5 },
603
- [
604
- !unref(isEmpty)(
605
- unref(renderContentHandler)(column, {
606
- column,
607
- row,
608
- $index,
609
- cellIndex
610
- })
611
- ) ? (openBlock(), createBlock(unref(HyTooltip), {
612
- key: 0,
613
- "is-always": false,
614
- "over-line": 2,
615
- content: unref(renderContentHandler)(column, { column, row, $index, cellIndex })
616
- }, null, 8, ["content"])) : (openBlock(), createElementBlock("span", {
617
- key: 1,
618
- class: "text-auxiliary"
619
- }, "- -"))
620
- ],
621
- 64
622
- /* STABLE_FRAGMENT */
623
- )) : createCommentVNode("v-if", true)
624
- ],
625
- 4
626
- /* STYLE */
627
- );
628
- }),
629
- 128
630
- /* KEYED_FRAGMENT */
631
- ))
632
- ], 10, ["rowkey"])
631
+ row,
632
+ $index,
633
+ cellIndex
634
+ })
635
+ ) ? (openBlock(), createBlock(unref(HyTooltip), {
636
+ key: 0,
637
+ "is-always": false,
638
+ "over-line": 2,
639
+ content: unref(renderContentHandler)(column, { column, row, $index, cellIndex })
640
+ }, null, 8, ["content"])) : (openBlock(), createElementBlock("span", {
641
+ key: 1,
642
+ class: "text-auxiliary"
643
+ }, "- -"))
644
+ ],
645
+ 64
646
+ /* STABLE_FRAGMENT */
647
+ )) : createCommentVNode("v-if", true)
648
+ ],
649
+ 4
650
+ /* STYLE */
651
+ );
652
+ }),
653
+ 128
654
+ /* KEYED_FRAGMENT */
655
+ ))
633
656
  ],
634
- 2112
635
- /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
636
- ))
657
+ 64
658
+ /* STABLE_FRAGMENT */
659
+ ))
637
660
  ]),
638
661
  empty: withCtx(() => [
639
662
  renderSlot(_ctx.$slots, "empty")