hy-dispatch-ui-v3 0.2.36 → 0.2.38
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 +45 -12
- package/es/components/hyButton/button.vue.mjs +23 -57
- package/es/components/hyButton/style/button.scss +1 -1
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +2 -1
- package/es/components/hyForm/cpns/formItem.vue.mjs +37 -16
- package/es/components/hyForm/js/index.mjs +3 -2
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +23 -16
- package/es/components/hyTableActionButton/index.mjs +6 -0
- package/es/components/hyTableActionButton/style/tableActionButton.scss +9 -0
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +316 -0
- package/es/components/index.mjs +1 -0
- package/es/index.mjs +1 -0
- package/es/version.mjs +1 -1
- package/lib/components/hyButton/button.vue.js +21 -55
- package/lib/components/hyButton/style/button.scss +1 -1
- package/lib/components/hyForm/cpns/arrayItem.vue.js +2 -1
- package/lib/components/hyForm/cpns/formItem.vue.js +36 -15
- package/lib/components/hyForm/js/index.js +3 -2
- package/lib/components/hyTable/cpns/columnSelect.vue.js +23 -16
- package/lib/components/hyTableActionButton/index.js +11 -0
- package/lib/components/hyTableActionButton/style/tableActionButton.scss +9 -0
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +320 -0
- package/lib/components/index.js +8 -6
- package/lib/index.js +8 -6
- package/lib/version.js +1 -1
- package/package.json +7 -3
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,
|
|
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
|
|
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
|
-
"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
}])
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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]" })
|
|
@@ -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(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
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",
|