hy-dispatch-ui-v3 0.2.36 → 0.2.37

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/tailwind.css CHANGED
@@ -284,6 +284,10 @@
284
284
  margin-top: -0.125rem;
285
285
  }
286
286
 
287
+ .mb-1 {
288
+ margin-bottom: 0.25rem;
289
+ }
290
+
287
291
  .mb-1\.5 {
288
292
  margin-bottom: 0.375rem;
289
293
  }
@@ -336,6 +340,14 @@
336
340
  margin-left: 4px;
337
341
  }
338
342
 
343
+ .ml-\[6px\] {
344
+ margin-left: 6px;
345
+ }
346
+
347
+ .ml-\[7px\] {
348
+ margin-left: 7px;
349
+ }
350
+
339
351
  .ml-auto {
340
352
  margin-left: auto;
341
353
  }
@@ -556,6 +568,10 @@
556
568
  height: 100%;
557
569
  }
558
570
 
571
+ .max-h-\[500px\] {
572
+ max-height: 500px;
573
+ }
574
+
559
575
  .max-h-full {
560
576
  max-height: 100%;
561
577
  }
@@ -564,10 +580,22 @@
564
580
  min-height: 1.5rem;
565
581
  }
566
582
 
583
+ .min-h-\[24px\] {
584
+ min-height: 24px;
585
+ }
586
+
587
+ .min-h-\[32px\] {
588
+ min-height: 32px;
589
+ }
590
+
567
591
  .min-h-\[36px\] {
568
592
  min-height: 36px;
569
593
  }
570
594
 
595
+ .min-h-\[40px\] {
596
+ min-height: 40px;
597
+ }
598
+
571
599
  .\!w-3 {
572
600
  width: 0.75rem !important;
573
601
  }
@@ -648,6 +676,10 @@
648
676
  width: 16px;
649
677
  }
650
678
 
679
+ .w-\[1px\] {
680
+ width: 1px;
681
+ }
682
+
651
683
  .w-\[22px\] {
652
684
  width: 22px;
653
685
  }
@@ -684,10 +716,6 @@
684
716
  width: 100%;
685
717
  }
686
718
 
687
- .w-px {
688
- width: 1px;
689
- }
690
-
691
719
  .\!min-w-\[120px\] {
692
720
  min-width: 120px !important;
693
721
  }
@@ -696,6 +724,10 @@
696
724
  min-width: 100%;
697
725
  }
698
726
 
727
+ .max-w-\[200px\] {
728
+ max-width: 200px;
729
+ }
730
+
699
731
  .max-w-\[300px\] {
700
732
  max-width: 300px;
701
733
  }
@@ -840,6 +872,10 @@
840
872
  overflow: hidden;
841
873
  }
842
874
 
875
+ .overflow-x-auto {
876
+ overflow-x: auto;
877
+ }
878
+
843
879
  .overflow-y-auto {
844
880
  overflow-y: auto;
845
881
  }
@@ -1007,10 +1043,6 @@
1007
1043
  background-color: rgb(var(--hy-success), var(--tw-bg-opacity, 1));
1008
1044
  }
1009
1045
 
1010
- .bg-success\/50 {
1011
- background-color: rgb(var(--hy-success), 0.5);
1012
- }
1013
-
1014
1046
  .bg-theme {
1015
1047
  --tw-bg-opacity: 1;
1016
1048
  background-color: rgb(var(--hy-theme), var(--tw-bg-opacity, 1));
@@ -1157,10 +1189,6 @@
1157
1189
  padding-left: 52px;
1158
1190
  }
1159
1191
 
1160
- .pr-1\.5 {
1161
- padding-right: 0.375rem;
1162
- }
1163
-
1164
1192
  .pr-2 {
1165
1193
  padding-right: 0.5rem;
1166
1194
  }
@@ -1428,6 +1456,11 @@ menu {
1428
1456
  color: rgb(var(--hy-main), var(--tw-text-opacity, 1));
1429
1457
  }
1430
1458
 
1459
+ .hover\:text-theme:hover {
1460
+ --tw-text-opacity: 1;
1461
+ color: rgb(var(--hy-theme), var(--tw-text-opacity, 1));
1462
+ }
1463
+
1431
1464
  .hover\:shadow-\[0px_0px_5px_0px_rgba\(var\(--hy-theme\)\2c 0\.5\)\]:hover {
1432
1465
  --tw-shadow: 0px 0px 5px 0px rgba(var(--hy-theme),0.5);
1433
1466
  --tw-shadow-colored: 0px 0px 5px 0px var(--tw-shadow-color);
@@ -1,6 +1,6 @@
1
- import { openBlock, createElementBlock, mergeProps, renderSlot, normalizeClass, createCommentVNode, createElementVNode, createVNode, unref, withCtx, createBlock, Fragment, defineComponent } from 'vue';
1
+ import { openBlock, createElementBlock, mergeProps, renderSlot, normalizeClass, createCommentVNode, createElementVNode, createVNode, unref, withCtx, createBlock, defineComponent } from 'vue';
2
2
  import { ElIcon } from 'element-plus';
3
- import { Loading, ArrowDown } from '@element-plus/icons-vue';
3
+ import { Loading } from '@element-plus/icons-vue';
4
4
  import { HyTooltip } from '../hyTooltip/index.mjs';
5
5
  import { HyIcon } from '../hyIcon/index.mjs';
6
6
 
@@ -36,11 +36,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
36
36
  svgName: {
37
37
  type: String
38
38
  },
39
- expand: {
40
- // 展开,仅普通按钮支持
41
- type: Boolean,
42
- default: false
43
- },
44
39
  link: {
45
40
  // 链接按钮
46
41
  type: Boolean,
@@ -124,60 +119,31 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
124
119
  }, {
125
120
  default: withCtx(() => [
126
121
  renderSlot(_ctx.$slots, "content", {}, () => [
127
- createElementVNode(
128
- "div",
129
- {
130
- class: normalizeClass(["flex items-center text-main", {
131
- "px-3": !__props.expand,
132
- "pl-3 pr-1.5": __props.expand
133
- }])
134
- },
135
- [
136
- !__props.loading ? renderSlot(_ctx.$slots, "svg", {}, () => [
137
- __props.svgName ? (openBlock(), createBlock(unref(HyIcon), {
138
- key: 0,
139
- "svg-name": __props.svgName,
140
- "class-name": "!w-3 !h-3 text-main mr-2"
141
- }, null, 8, ["svg-name"])) : createCommentVNode("v-if", true)
142
- ], void 0, 0) : (openBlock(), createBlock(unref(ElIcon), {
143
- key: 1,
144
- color: "rgb(var(--hy-main))",
145
- class: "is-loading mr-2"
146
- }, {
147
- default: withCtx(() => [
148
- createVNode(unref(Loading))
149
- ]),
150
- _: 1
151
- /* STABLE */
152
- })),
153
- renderSlot(_ctx.$slots, "default")
154
- ],
155
- 2
156
- /* CLASS */
157
- )
122
+ createElementVNode("div", { class: "flex items-center text-main px-3" }, [
123
+ !__props.loading ? renderSlot(_ctx.$slots, "svg", {}, () => [
124
+ __props.svgName ? (openBlock(), createBlock(unref(HyIcon), {
125
+ key: 0,
126
+ "svg-name": __props.svgName,
127
+ "class-name": "!w-3 !h-3 text-main mr-2"
128
+ }, null, 8, ["svg-name"])) : createCommentVNode("v-if", true)
129
+ ], void 0, 0) : (openBlock(), createBlock(unref(ElIcon), {
130
+ key: 1,
131
+ color: "rgb(var(--hy-main))",
132
+ class: "is-loading mr-2"
133
+ }, {
134
+ default: withCtx(() => [
135
+ createVNode(unref(Loading))
136
+ ]),
137
+ _: 1
138
+ /* STABLE */
139
+ })),
140
+ renderSlot(_ctx.$slots, "default")
141
+ ])
158
142
  ])
159
143
  ]),
160
144
  _: 3
161
145
  /* FORWARDED */
162
- }, 8, ["disabled", "content"]),
163
- __props.expand ? (openBlock(), createElementBlock(
164
- Fragment,
165
- { key: 0 },
166
- [
167
- createElementVNode("div", { class: "w-px h-full bg-success/50" }),
168
- createElementVNode("div", { class: "w-[30px] flex items-center justify-center" }, [
169
- createVNode(unref(ElIcon), { color: "rgb(var(--hy-main))" }, {
170
- default: withCtx(() => [
171
- createVNode(unref(ArrowDown))
172
- ]),
173
- _: 1
174
- /* STABLE */
175
- })
176
- ])
177
- ],
178
- 64
179
- /* STABLE_FRAGMENT */
180
- )) : createCommentVNode("v-if", true)
146
+ }, 8, ["disabled", "content"])
181
147
  ]),
182
148
  createCommentVNode(" \u6E10\u53D8\u906E\u7F69 e "),
183
149
  createElementVNode("div", { class: "hy-button__mask w-full h-full absolute blur-[1px]" })
@@ -30,7 +30,7 @@
30
30
  }
31
31
 
32
32
  & + & {
33
- margin-left: 16px;
33
+ margin-left: 12px;
34
34
  }
35
35
 
36
36
  &.hy-button_default {
@@ -248,7 +248,8 @@ const _sfc_main = {
248
248
  "parent-prop": __props.column.field,
249
249
  index,
250
250
  loading: __props.loading,
251
- readonly: __props.readonly
251
+ readonly: __props.readonly,
252
+ level: 3
252
253
  }, createSlots({
253
254
  _: 2
254
255
  /* DYNAMIC */
@@ -1,4 +1,4 @@
1
- import { computed, unref, openBlock, createBlock, normalizeStyle, withCtx, createCommentVNode, createElementVNode, renderSlot, toDisplayString, createElementBlock, createVNode, Fragment, mergeProps } from 'vue';
1
+ import { computed, unref, openBlock, createBlock, normalizeStyle, withCtx, createCommentVNode, createElementVNode, renderSlot, toDisplayString, createElementBlock, createVNode, normalizeClass, Fragment, mergeProps } from 'vue';
2
2
  import { ElFormItem, ElIcon, ElSelect, ElRadioGroup, ElCheckboxGroup, ElSwitch, ElInputNumber } from 'element-plus';
3
3
  import { QuestionFilled } from '@element-plus/icons-vue';
4
4
  import { columnShowHandler, columnItemStyle, isRequired, renderText, isDisabled, optionsHandler } from '../js/index.mjs';
@@ -39,6 +39,10 @@ const _sfc_main = {
39
39
  readonly: {
40
40
  type: Boolean,
41
41
  default: false
42
+ },
43
+ level: {
44
+ type: Number,
45
+ default: 2
42
46
  }
43
47
  },
44
48
  setup(__props) {
@@ -138,21 +142,38 @@ const _sfc_main = {
138
142
  ])) : createCommentVNode("v-if", true)
139
143
  ]),
140
144
  createCommentVNode(" \u5185\u5BB9\u4EC5\u67E5\u770B "),
141
- __props.column.readonly || __props.readonly || !__props.column.type && !__props.column.slot ? (openBlock(), createElementBlock("div", {
142
- key: 0,
143
- class: "w-full text-main h-[32px]"
144
- }, [
145
- unref(renderText)(props, __props.column) ? (openBlock(), createElementBlock(
146
- "span",
147
- { key: 0 },
148
- toDisplayString(unref(renderText)(props, __props.column)),
149
- 1
150
- /* TEXT */
151
- )) : (openBlock(), createElementBlock("span", {
152
- key: 1,
153
- class: "text-auxiliary"
154
- }, "- -"))
155
- ])) : (openBlock(), createElementBlock(
145
+ __props.column.readonly || __props.readonly || !__props.column.type && !__props.column.slot ? (openBlock(), createElementBlock(
146
+ "div",
147
+ {
148
+ key: 0,
149
+ class: normalizeClass(["w-full flex items-center text-main px-2", {
150
+ "min-h-[40px]": _ctx.size === "large",
151
+ "min-h-[32px]": _ctx.size === "default",
152
+ "min-h-[24px]": _ctx.size === "small",
153
+ "bg-background": __props.level === 1,
154
+ "bg-background-2": __props.level === 2,
155
+ "bg-background-3": __props.level === 3,
156
+ "bg-background-4": __props.level === 4
157
+ }])
158
+ },
159
+ [
160
+ unref(renderText)(props, __props.column) ? (openBlock(), createElementBlock(
161
+ "span",
162
+ {
163
+ key: 0,
164
+ class: "break-all"
165
+ },
166
+ toDisplayString(unref(renderText)(props, __props.column)),
167
+ 1
168
+ /* TEXT */
169
+ )) : (openBlock(), createElementBlock("span", {
170
+ key: 1,
171
+ class: "text-auxiliary"
172
+ }, "- -"))
173
+ ],
174
+ 2
175
+ /* CLASS */
176
+ )) : (openBlock(), createElementBlock(
156
177
  Fragment,
157
178
  { key: 1 },
158
179
  [
@@ -52,7 +52,7 @@ function isDisabled(props, column) {
52
52
  }
53
53
  function renderText(props, column = {}) {
54
54
  const { type, field, customRender } = column;
55
- const { props: fieldNames, options = [] } = column.attrs || {};
55
+ const { props: fieldNames } = column.attrs || {};
56
56
  if (customRender && typeof customRender === "function") {
57
57
  return customRender({
58
58
  column,
@@ -69,7 +69,8 @@ function renderText(props, column = {}) {
69
69
  return [props.model[lon], props.model[lat]].filter(Boolean).join("\uFF0C");
70
70
  }
71
71
  if (/^(select|radio|checkbox)$/.test(type)) {
72
- const target = options.find(
72
+ const optionList = optionsHandler(props, column);
73
+ const target = optionList.find(
73
74
  (item) => item[fieldNames.value] === props.model?.[field]
74
75
  );
75
76
  return target?.[fieldNames.label] || props.model?.[field] || "";
@@ -306,22 +306,29 @@ const _sfc_main = {
306
306
  )) : createCommentVNode("v-if", true)
307
307
  ]),
308
308
  createElementVNode("div", { class: "w-0 flex-1 flex items-center justify-end ml-3" }, [
309
- createVNode(unref(ElIcon), {
310
- class: "mr-1.5",
311
- color: "rgb(var(--hy-auxiliary))"
312
- }, {
313
- default: withCtx(() => [
314
- createVNode(unref(Warning))
315
- ]),
316
- _: 1
317
- /* STABLE */
318
- }),
319
- checkedList.value?.length >= 8 ? (openBlock(), createBlock(unref(HyTooltip), {
320
- key: 0,
321
- "is-always": false,
322
- content: unref(t)("table.tooManyFieldsWillAffectReadability"),
323
- class: "mr-2 text-auxiliary"
324
- }, null, 8, ["content"])) : createCommentVNode("v-if", true),
309
+ checkedList.value?.length >= 8 ? (openBlock(), createElementBlock(
310
+ Fragment,
311
+ { key: 0 },
312
+ [
313
+ createVNode(unref(ElIcon), {
314
+ class: "mr-1.5",
315
+ color: "rgb(var(--hy-auxiliary))"
316
+ }, {
317
+ default: withCtx(() => [
318
+ createVNode(unref(Warning))
319
+ ]),
320
+ _: 1
321
+ /* STABLE */
322
+ }),
323
+ createVNode(unref(HyTooltip), {
324
+ "is-always": false,
325
+ content: unref(t)("table.tooManyFieldsWillAffectReadability"),
326
+ class: "mr-2 text-auxiliary"
327
+ }, null, 8, ["content"])
328
+ ],
329
+ 64
330
+ /* STABLE_FRAGMENT */
331
+ )) : createCommentVNode("v-if", true),
325
332
  createVNode(unref(HyButton), {
326
333
  type: "primary",
327
334
  size: "small",
@@ -0,0 +1,6 @@
1
+ import _sfc_main from './tableActionButton.vue.mjs';
2
+ import { withInstall } from '../../utils/handler.mjs';
3
+
4
+ const HyTableActionButton = withInstall(_sfc_main);
5
+
6
+ export { HyTableActionButton, HyTableActionButton as default };
@@ -0,0 +1,5 @@
1
+ .hy-action-button + .hy-action-button,
2
+ .hy-action-button + .hy-button,
3
+ .hy-button + .hy-action-button {
4
+ margin-left: 12px;
5
+ }