hy-dispatch-ui-v3 0.2.32 → 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 (62) hide show
  1. package/dist/tailwind.css +168 -448
  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 +1 -1
  5. package/es/components/hyButton/style/button.scss +16 -3
  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/style/form.scss +56 -54
  9. package/es/components/hyIcon/style/icon.scss +1 -1
  10. package/es/components/hyIconBox/style/iconBox.scss +19 -18
  11. package/es/components/hyInput/input.vue.mjs +4 -1
  12. package/es/components/hySearch/style/search.scss +50 -50
  13. package/es/components/hyTable/cpns/virtualTable.vue.mjs +12 -1
  14. package/es/components/hyTable/js/index.mjs +12 -0
  15. package/es/components/hyTable/table.vue.mjs +21 -5
  16. package/es/components/hyTableForm/batchTableForm.vue.mjs +478 -0
  17. package/es/components/hyTableForm/index.mjs +4 -1
  18. package/es/components/hyTableForm/js/index.mjs +123 -0
  19. package/es/components/hyTableForm/js/useAppTableForm.mjs +47 -0
  20. package/es/components/hyTableForm/style/batchTableForm.scss +127 -0
  21. package/es/components/hyTableForm/style/tableForm.scss +42 -0
  22. package/es/components/hyTableForm/tableForm.vue.mjs +452 -7
  23. package/es/components/hyTooltip/tooltip.vue.mjs +2 -2
  24. package/es/components/hyVideoPlayer/cpns/mediaLoading.vue.mjs +1 -1
  25. package/es/components/hyVideoPlayer/style/mediaLoading.scss +5 -5
  26. package/es/components/hyVideoPlayer/style/videoPlayer.scss +7 -6
  27. package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +6 -6
  28. package/es/components/index.mjs +2 -1
  29. package/es/index.mjs +2 -1
  30. package/es/style/tailwind.scss +133 -1
  31. package/es/version.mjs +1 -1
  32. package/lib/components/hyAudioPlayer/audioPlayer.vue.js +4 -4
  33. package/lib/components/hyAudioPlayer/style/audioPlayer.scss +11 -12
  34. package/lib/components/hyButton/button.vue.js +1 -1
  35. package/lib/components/hyButton/style/button.scss +16 -3
  36. package/lib/components/hyConfirmDialog/confirmDialog.vue.js +1 -1
  37. package/lib/components/hyForm/form.vue.js +2 -1
  38. package/lib/components/hyForm/style/form.scss +56 -54
  39. package/lib/components/hyIcon/style/icon.scss +1 -1
  40. package/lib/components/hyIconBox/style/iconBox.scss +19 -18
  41. package/lib/components/hyInput/input.vue.js +4 -1
  42. package/lib/components/hySearch/style/search.scss +50 -50
  43. package/lib/components/hyTable/cpns/virtualTable.vue.js +12 -1
  44. package/lib/components/hyTable/js/index.js +12 -0
  45. package/lib/components/hyTable/table.vue.js +21 -5
  46. package/lib/components/hyTableForm/batchTableForm.vue.js +482 -0
  47. package/lib/components/hyTableForm/index.js +5 -0
  48. package/lib/components/hyTableForm/js/index.js +127 -0
  49. package/lib/components/hyTableForm/js/useAppTableForm.js +49 -0
  50. package/lib/components/hyTableForm/style/batchTableForm.scss +127 -0
  51. package/lib/components/hyTableForm/style/tableForm.scss +42 -0
  52. package/lib/components/hyTableForm/tableForm.vue.js +451 -6
  53. package/lib/components/hyTooltip/tooltip.vue.js +2 -2
  54. package/lib/components/hyVideoPlayer/cpns/mediaLoading.vue.js +1 -1
  55. package/lib/components/hyVideoPlayer/style/mediaLoading.scss +5 -5
  56. package/lib/components/hyVideoPlayer/style/videoPlayer.scss +7 -6
  57. package/lib/components/hyVideoPlayer/videoPlayer.vue.js +6 -6
  58. package/lib/components/index.js +33 -30
  59. package/lib/index.js +33 -30
  60. package/lib/style/tailwind.scss +133 -1
  61. package/lib/version.js +1 -1
  62. package/package.json +5 -3
@@ -11,59 +11,59 @@
11
11
  padding-bottom: 0;
12
12
  opacity: 0;
13
13
  }
14
- }
15
- .hy-search-header {
16
- height: 16px;
17
- display: flex;
18
- align-items: center;
19
- font-size: 12px;
20
- color: rgb(var(--hy-main));
21
- margin-bottom: 16px;
22
- transition: all 0.3s linear;
23
- &.hy-search-header-hidden {
24
- height: 0;
25
- margin-bottom: 0px;
26
- }
27
- }
28
- .hy-search-form {
29
- overflow: hidden;
30
- transition: all 0.3s;
31
- }
32
- .hy-search-container {
33
- display: flex;
34
- flex-wrap: wrap;
35
- gap: 16px;
36
- position: relative;
37
- .hy-el-form-item {
38
- margin-bottom: 0;
39
- &.hidden {
40
- display: none;
14
+ .hy-search-header {
15
+ height: 16px;
16
+ display: flex;
17
+ align-items: center;
18
+ font-size: 12px;
19
+ color: rgb(var(--hy-main));
20
+ margin-bottom: 16px;
21
+ transition: all 0.3s linear;
22
+ &.hy-search-header-hidden {
23
+ height: 0;
24
+ margin-bottom: 0px;
41
25
  }
42
26
  }
43
- .hy-el-input,
44
- .hy-el-date-editor {
45
- --el-input-bg-color: transparent;
46
- --el-input-border: none;
47
- --el-border-color: transparent;
48
- --el-input-border-color: transparent;
49
- --el-input-text-color: rgb(var(--hy-main));
50
- --el-input-border-radius: 0px 4px 4px 0px;
51
- --el-input-hover-border-color: rgb(var(--hy-theme));
52
- .hy-el-input__wrapper,
53
- &.hy-el-input__wrapper {
54
- box-shadow: none !important;
55
- }
27
+ .hy-search-form {
28
+ overflow: hidden;
29
+ transition: all 0.3s;
56
30
  }
57
- .hy-el-select {
58
- --el-border-color: transparent;
59
- --el-fill-color-blank: transparent;
60
- --el-border-radius-base: 0px 4px 4px 0px;
61
- --el-border-color-hover: rgb(var(--hy-theme));
62
- .hy-el-select__wrapper {
63
- box-shadow: none !important;
31
+ .hy-search-container {
32
+ display: flex;
33
+ flex-wrap: wrap;
34
+ gap: 16px;
35
+ position: relative;
36
+ .hy-el-form-item {
37
+ margin-bottom: 0;
38
+ &.hidden {
39
+ display: none;
40
+ }
41
+ }
42
+ .hy-el-input,
43
+ .hy-el-date-editor {
44
+ --el-input-bg-color: transparent;
45
+ --el-input-border: none;
46
+ --el-border-color: transparent;
47
+ --el-input-border-color: transparent;
48
+ --el-input-text-color: rgb(var(--hy-main));
49
+ --el-input-border-radius: 0px 4px 4px 0px;
50
+ --el-input-hover-border-color: rgb(var(--hy-theme));
51
+ .hy-el-input__wrapper,
52
+ &.hy-el-input__wrapper {
53
+ box-shadow: none !important;
54
+ }
55
+ }
56
+ .hy-el-select {
57
+ --el-border-color: transparent;
58
+ --el-fill-color-blank: transparent;
59
+ --el-border-radius-base: 0px 4px 4px 0px;
60
+ --el-border-color-hover: rgb(var(--hy-theme));
61
+ .hy-el-select__wrapper {
62
+ box-shadow: none !important;
63
+ }
64
+ }
65
+ .hy-search-custom-wrapper {
66
+ min-height: var(--hy-el-component-size);
64
67
  }
65
- }
66
- .hy-search-custom-wrapper {
67
- min-height: var(--hy-el-component-size);
68
68
  }
69
69
  }
@@ -57,6 +57,12 @@ const _sfc_main = {
57
57
  },
58
58
  onRowContextmenu: {
59
59
  type: Function
60
+ },
61
+ expandMode: {
62
+ // 展开模式,不支持树形展开
63
+ type: String,
64
+ default: "default"
65
+ // deafult-默认 accordion-手风琴
60
66
  }
61
67
  },
62
68
  emits: ["search", "select", "select-all", "expand-change"],
@@ -262,7 +268,11 @@ const _sfc_main = {
262
268
  const isExpanded = is.isBoolean(expanded) ? expanded : !is.isNumber(index);
263
269
  if (isExpanded) {
264
270
  if (!is.isNumber(index)) {
265
- expandedKeys.value.push(getRowKey(row));
271
+ if (props.expandMode === "accordion" && isExpandTable.value) {
272
+ expandedKeys.value = [getRowKey(row)];
273
+ } else {
274
+ expandedKeys.value.push(getRowKey(row));
275
+ }
266
276
  }
267
277
  } else {
268
278
  if (is.isNumber(index)) {
@@ -386,6 +396,7 @@ const _sfc_main = {
386
396
  }), ["stop"])
387
397
  }, [
388
398
  vue.createVNode(vue.unref(elementPlus.ElIcon), {
399
+ class: "text-main",
389
400
  style: vue.normalizeStyle({ "margin-inline-start": `${depth * 12}px` })
390
401
  }, {
391
402
  default: vue.withCtx(() => [
@@ -316,6 +316,17 @@ const useAppTableWrapper = (hy) => {
316
316
  tableRef.value.toggleRowExpansion(row);
317
317
  }
318
318
  }
319
+ function onTableRowExpandChangeHandler(row, expandedRows) {
320
+ if (is.isBoolean(expandedRows) || props.expandMode !== "accordion" || expandedRows.length <= 1) {
321
+ props.onExpandChange(row, expandedRows);
322
+ return;
323
+ } else {
324
+ expandedRows.forEach((item) => {
325
+ if (getRowKey(row) === getRowKey(item)) return;
326
+ toggleRowExpansion(item);
327
+ });
328
+ }
329
+ }
319
330
  const isSearchFocus = vue.ref(false);
320
331
  function onSearchInputHandler() {
321
332
  isSearchFocus.value = true;
@@ -355,6 +366,7 @@ const useAppTableWrapper = (hy) => {
355
366
  toggleRowExpansion,
356
367
  onTableSelectHandler,
357
368
  onTableRowContextmenuHandler,
369
+ onTableRowExpandChangeHandler,
358
370
  onTableRowClickHandler,
359
371
  onTableColumnsSelectHandler,
360
372
  // 搜索选中
@@ -177,6 +177,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
177
177
  type: Boolean,
178
178
  required: false,
179
179
  default: true
180
+ },
181
+ expandMode: {
182
+ // 展开模式,不支持树形展开
183
+ type: String,
184
+ default: "default"
185
+ // deafult-默认 accordion-手风琴
186
+ },
187
+ onExpandChange: {
188
+ // 展开回调
189
+ type: Function
180
190
  }
181
191
  },
182
192
  emits: [
@@ -214,6 +224,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
214
224
  toggleRowExpansion,
215
225
  onTableRowClickHandler,
216
226
  onTableRowContextmenuHandler,
227
+ onTableRowExpandChangeHandler,
217
228
  onTableSelectHandler,
218
229
  isSearchFocus,
219
230
  onSearchInputHandler,
@@ -322,8 +333,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
322
333
  "onUpdate:modelValue": ($event) => __props.filterModel.query = $event,
323
334
  class: "hy-table-search",
324
335
  placeholder: vue.unref(t)("table.searchFor", [__props.controllerText || ""]),
336
+ clearable: "",
325
337
  onFocus: vue.unref(onSearchInputHandler),
326
338
  onBlur: vue.unref(onSearchBlurHandler),
339
+ onClear: vue.unref(onSearchQueryHandler),
327
340
  onKeydown: vue.withKeys(vue.unref(onSearchQueryHandler), ["enter"])
328
341
  }, {
329
342
  append: vue.withCtx(() => [
@@ -342,7 +355,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
342
355
  ]),
343
356
  _: 1
344
357
  /* STABLE */
345
- }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onFocus", "onBlur", "onKeydown"])
358
+ }, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onFocus", "onBlur", "onClear", "onKeydown"])
346
359
  ],
347
360
  2
348
361
  /* CLASS */
@@ -417,7 +430,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
417
430
  onSelect: vue.unref(onTableSelectHandler),
418
431
  onSelectAll: vue.unref(onTableSelectHandler),
419
432
  onRowClick: vue.unref(onTableRowClickHandler),
420
- onRowContextmenu: vue.unref(onTableRowContextmenuHandler)
433
+ onRowContextmenu: vue.unref(onTableRowContextmenuHandler),
434
+ onExpandChange: vue.unref(onTableRowExpandChangeHandler)
421
435
  }), {
422
436
  empty: vue.withCtx(() => [
423
437
  vue.renderSlot(_ctx.$slots, "empty", {}, () => [
@@ -658,7 +672,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
658
672
  ]),
659
673
  _: 3
660
674
  /* FORWARDED */
661
- }, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu"])) : vue.createCommentVNode("v-if", true),
675
+ }, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu", "onExpandChange"])) : vue.createCommentVNode("v-if", true),
662
676
  __props.type === "virtual" ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElAutoResizer), { key: 1 }, {
663
677
  default: vue.withCtx(({ height, width }) => [
664
678
  vue.createVNode(virtualTable.default, vue.mergeProps({
@@ -678,11 +692,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
678
692
  },
679
693
  "row-key": __props.rowKey,
680
694
  "filter-model": __props.filterModel,
695
+ expandMode: __props.expandMode,
681
696
  onSearch: ($event) => vue.unref(getData)(1),
682
697
  onSelect: vue.unref(onTableSelectHandler),
683
698
  onSelectAll: vue.unref(onTableSelectHandler),
684
699
  onRowClick: vue.unref(onTableRowClickHandler),
685
- onRowContextmenu: vue.unref(onTableRowContextmenuHandler)
700
+ onRowContextmenu: vue.unref(onTableRowContextmenuHandler),
701
+ onExpandChange: __props.onExpandChange
686
702
  }), vue.createSlots({
687
703
  empty: vue.withCtx(() => [
688
704
  vue.createElementVNode("div", { class: "w-full h-full flex items-center justify-center border-b border-border" }, [
@@ -708,7 +724,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
708
724
  ])
709
725
  };
710
726
  })
711
- ]), 1040, ["width", "height", "data", "columns", "columns-editable", "show-header", "row-class-name", "show-all-select", "style", "row-key", "filter-model", "onSearch", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu"])
727
+ ]), 1040, ["width", "height", "data", "columns", "columns-editable", "show-header", "row-class-name", "show-all-select", "style", "row-key", "filter-model", "expandMode", "onSearch", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu", "onExpandChange"])
712
728
  ]),
713
729
  _: 3
714
730
  /* FORWARDED */