hy-dispatch-ui-v3 0.2.32 → 0.2.34
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 +186 -454
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -5
- package/es/components/hyAudioPlayer/js/index.mjs +1 -1
- package/es/components/hyAudioPlayer/style/audioPlayer.scss +11 -12
- package/es/components/hyButton/button.vue.mjs +50 -35
- package/es/components/hyButton/style/button.scss +16 -3
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +2 -2
- package/es/components/hyConfirmDialog/confirmMethod.mjs +1 -1
- package/es/components/hyConfirmDialog/index.mjs +1 -1
- package/es/components/hyCutter/cutter.vue.mjs +1 -1
- package/es/components/hyDatePicker/datePicker.vue.mjs +1 -1
- package/es/components/hyDialog/dialog.vue.mjs +178 -137
- package/es/components/hyDialog/style/dialog.scss +13 -0
- package/es/components/hyForm/cpns/formItem.vue.mjs +3 -4
- package/es/components/hyForm/form.vue.mjs +2 -1
- package/es/components/hyForm/js/useAppForm.mjs +1 -1
- package/es/components/hyForm/style/form.scss +56 -54
- package/es/components/hyIcon/style/icon.scss +1 -1
- package/es/components/hyIconBox/style/iconBox.scss +19 -18
- package/es/components/hyInput/input.vue.mjs +4 -1
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +1 -1
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +1 -1
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +1 -1
- package/es/components/hySearch/cpns/searchItem.vue.mjs +3 -9
- package/es/components/hySearch/js/index.mjs +4 -4
- package/es/components/hySearch/style/search.scss +51 -50
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +39 -42
- package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +5 -8
- package/es/components/hyTable/cpns/headerItem.vue.mjs +1 -1
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +18 -11
- package/es/components/hyTable/js/index.mjs +12 -0
- package/es/components/hyTable/js/useAppTable.mjs +1 -1
- package/es/components/hyTable/style/table.scss +13 -0
- package/es/components/hyTable/table.vue.mjs +43 -23
- package/es/components/hyTableForm/batchTableForm.vue.mjs +478 -0
- package/es/components/hyTableForm/index.mjs +4 -1
- package/es/components/hyTableForm/js/index.mjs +123 -0
- package/es/components/hyTableForm/js/useAppTableForm.mjs +47 -0
- package/es/components/hyTableForm/style/batchTableForm.scss +127 -0
- package/es/components/hyTableForm/style/tableForm.scss +42 -0
- package/es/components/hyTableForm/tableForm.vue.mjs +452 -7
- package/es/components/hyTooltip/tooltip.vue.mjs +6 -6
- package/es/components/hyTree/style/index.css +1 -0
- package/es/components/hyTree/tree.vue.mjs +2 -0
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +2 -2
- package/es/components/hyVideoPlayer/cpns/mediaLoading.vue.mjs +1 -1
- package/es/components/hyVideoPlayer/js/index.mjs +1 -1
- package/es/components/hyVideoPlayer/style/mediaLoading.scss +5 -5
- package/es/components/hyVideoPlayer/style/videoPlayer.scss +7 -6
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +6 -6
- package/es/components/index.mjs +2 -1
- package/es/index.mjs +2 -1
- package/es/locale/en.mjs +1 -1
- package/es/locale/zh_CN.mjs +1 -1
- package/es/style/element/hy-element.scss +3 -2
- package/es/style/tailwind.scss +133 -1
- package/es/version.mjs +1 -1
- package/lib/components/hyAudioPlayer/audioPlayer.vue.js +4 -4
- package/lib/components/hyAudioPlayer/js/index.js +1 -1
- package/lib/components/hyAudioPlayer/style/audioPlayer.scss +11 -12
- package/lib/components/hyButton/button.vue.js +50 -35
- package/lib/components/hyButton/style/button.scss +16 -3
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +2 -2
- package/lib/components/hyConfirmDialog/confirmMethod.js +1 -1
- package/lib/components/hyConfirmDialog/index.js +1 -1
- package/lib/components/hyCutter/cutter.vue.js +1 -1
- package/lib/components/hyDatePicker/datePicker.vue.js +1 -1
- package/lib/components/hyDialog/dialog.vue.js +177 -136
- package/lib/components/hyDialog/style/dialog.scss +13 -0
- package/lib/components/hyForm/cpns/formItem.vue.js +3 -4
- package/lib/components/hyForm/form.vue.js +2 -1
- package/lib/components/hyForm/js/useAppForm.js +1 -1
- package/lib/components/hyForm/style/form.scss +56 -54
- package/lib/components/hyIcon/style/icon.scss +1 -1
- package/lib/components/hyIconBox/style/iconBox.scss +19 -18
- package/lib/components/hyInput/input.vue.js +4 -1
- package/lib/components/hyNoPermissions/noPermissions.vue.js +1 -1
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +1 -1
- package/lib/components/hyOrgCascader/orgCascader.vue.js +1 -1
- package/lib/components/hySearch/cpns/searchItem.vue.js +3 -9
- package/lib/components/hySearch/js/index.js +4 -4
- package/lib/components/hySearch/style/search.scss +51 -50
- package/lib/components/hyTable/cpns/columnSelect.vue.js +43 -46
- package/lib/components/hyTable/cpns/columnSelectItem.vue.js +4 -7
- package/lib/components/hyTable/cpns/headerItem.vue.js +1 -1
- package/lib/components/hyTable/cpns/virtualTable.vue.js +18 -11
- package/lib/components/hyTable/js/index.js +12 -0
- package/lib/components/hyTable/js/useAppTable.js +1 -1
- package/lib/components/hyTable/style/table.scss +13 -0
- package/lib/components/hyTable/table.vue.js +42 -22
- package/lib/components/hyTableForm/batchTableForm.vue.js +482 -0
- package/lib/components/hyTableForm/index.js +5 -0
- package/lib/components/hyTableForm/js/index.js +127 -0
- package/lib/components/hyTableForm/js/useAppTableForm.js +49 -0
- package/lib/components/hyTableForm/style/batchTableForm.scss +127 -0
- package/lib/components/hyTableForm/style/tableForm.scss +42 -0
- package/lib/components/hyTableForm/tableForm.vue.js +451 -6
- package/lib/components/hyTooltip/tooltip.vue.js +6 -6
- package/lib/components/hyTree/style/index.css +1 -0
- package/lib/components/hyTree/tree.vue.js +2 -0
- package/lib/components/hyUserAvatar/userAvatar.vue.js +2 -2
- package/lib/components/hyVideoPlayer/cpns/mediaLoading.vue.js +1 -1
- package/lib/components/hyVideoPlayer/js/index.js +1 -1
- package/lib/components/hyVideoPlayer/style/mediaLoading.scss +5 -5
- package/lib/components/hyVideoPlayer/style/videoPlayer.scss +7 -6
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +6 -6
- package/lib/components/index.js +33 -30
- package/lib/index.js +33 -30
- package/lib/locale/en.js +1 -1
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/element/hy-element.scss +3 -2
- package/lib/style/tailwind.scss +133 -1
- package/lib/version.js +1 -1
- package/package.json +5 -3
|
@@ -75,7 +75,7 @@ const _sfc_main = {
|
|
|
75
75
|
prop: columnProp.value
|
|
76
76
|
}, {
|
|
77
77
|
default: withCtx(() => [
|
|
78
|
-
createElementVNode("div", { class: "flex bg-background-2 rounded
|
|
78
|
+
createElementVNode("div", { class: "flex bg-background-2 rounded outline outline-1 outline-transparent outline-offset-0 hover:outline-theme box-border" }, [
|
|
79
79
|
createElementVNode(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
@@ -92,10 +92,7 @@ const _sfc_main = {
|
|
|
92
92
|
}])
|
|
93
93
|
},
|
|
94
94
|
[
|
|
95
|
-
__props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] ? renderSlot(_ctx.$slots, __props.column.labelSlot, {
|
|
96
|
-
key: 0,
|
|
97
|
-
column: __props.column
|
|
98
|
-
}) : (openBlock(), createElementBlock(
|
|
95
|
+
__props.column.labelSlot && _ctx.$slots[__props.column.labelSlot] ? renderSlot(_ctx.$slots, __props.column.labelSlot, { column: __props.column }, void 0, void 0, 0) : (openBlock(), createElementBlock(
|
|
99
96
|
"span",
|
|
100
97
|
{ key: 1 },
|
|
101
98
|
toDisplayString(__props.column.label),
|
|
@@ -115,10 +112,7 @@ const _sfc_main = {
|
|
|
115
112
|
},
|
|
116
113
|
[
|
|
117
114
|
createCommentVNode(" \u81EA\u5B9A\u4E49\u5177\u540D\u63D2\u69FD "),
|
|
118
|
-
__props.column.slot ? renderSlot(_ctx.$slots, __props.column.slot, {
|
|
119
|
-
key: 0,
|
|
120
|
-
column: __props.column
|
|
121
|
-
}) : __props.column.type === "input" ? (openBlock(), createElementBlock(
|
|
115
|
+
__props.column.slot ? renderSlot(_ctx.$slots, __props.column.slot, { column: __props.column }, void 0, void 0, 0) : __props.column.type === "input" ? (openBlock(), createElementBlock(
|
|
122
116
|
Fragment,
|
|
123
117
|
{ key: 1 },
|
|
124
118
|
[
|
|
@@ -55,13 +55,13 @@ function useShrink(props, formItemWrapper) {
|
|
|
55
55
|
function getContainerPickUpHeight() {
|
|
56
56
|
switch (props.size) {
|
|
57
57
|
case "large":
|
|
58
|
-
return
|
|
58
|
+
return 44;
|
|
59
59
|
case "small":
|
|
60
|
-
return
|
|
60
|
+
return 28;
|
|
61
61
|
case "":
|
|
62
62
|
case "default":
|
|
63
63
|
default:
|
|
64
|
-
return
|
|
64
|
+
return 36;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
function switchShrink() {
|
|
@@ -74,7 +74,7 @@ function useShrink(props, formItemWrapper) {
|
|
|
74
74
|
if (container.children.length) {
|
|
75
75
|
for (let i = 0; i < container.children.length; i++) {
|
|
76
76
|
const element = container.children[i];
|
|
77
|
-
if (i > 0 && element.offsetLeft
|
|
77
|
+
if (i > 0 && element.offsetLeft <= 1) {
|
|
78
78
|
showShrink.value = true;
|
|
79
79
|
break;
|
|
80
80
|
} else if (i === container.children.length - 1) {
|
|
@@ -11,59 +11,60 @@
|
|
|
11
11
|
padding-bottom: 0;
|
|
12
12
|
opacity: 0;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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-
|
|
44
|
-
|
|
45
|
-
|
|
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-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
31
|
+
.hy-search-container {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
gap: 16px;
|
|
35
|
+
position: relative;
|
|
36
|
+
padding: 1px;
|
|
37
|
+
.hy-el-form-item {
|
|
38
|
+
margin-bottom: 0;
|
|
39
|
+
&.hidden {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
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
|
+
}
|
|
56
|
+
}
|
|
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;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
.hy-search-custom-wrapper {
|
|
67
|
+
min-height: var(--hy-el-component-size);
|
|
64
68
|
}
|
|
65
|
-
}
|
|
66
|
-
.hy-search-custom-wrapper {
|
|
67
|
-
min-height: var(--hy-el-component-size);
|
|
68
69
|
}
|
|
69
70
|
}
|
|
@@ -5,6 +5,7 @@ import { CircleClose, Warning, Edit } from '@element-plus/icons-vue';
|
|
|
5
5
|
import { tableColumnHandler } from '../js/index.mjs';
|
|
6
6
|
import _sfc_main$1 from './columnSelectItem.vue.mjs';
|
|
7
7
|
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
8
|
+
import { HyTooltip } from '../../hyTooltip/index.mjs';
|
|
8
9
|
import { HyButton } from '../../hyButton/index.mjs';
|
|
9
10
|
import { isEmpty } from '../../../utils/is.mjs';
|
|
10
11
|
|
|
@@ -228,7 +229,7 @@ const _sfc_main = {
|
|
|
228
229
|
/* STABLE */
|
|
229
230
|
})
|
|
230
231
|
]),
|
|
231
|
-
createElementVNode("div", { class: "h-[364px] px-4 pt-[11px] pb-1 overflow-y-auto" }, [
|
|
232
|
+
createElementVNode("div", { class: "h-[364px] px-4 pt-[11px] pb-1 scroll-body overflow-y-auto" }, [
|
|
232
233
|
createVNode(unref(ElCheckboxGroup), {
|
|
233
234
|
modelValue: checkedList.value,
|
|
234
235
|
"onUpdate:modelValue": ($event) => checkedList.value = $event
|
|
@@ -299,48 +300,44 @@ const _sfc_main = {
|
|
|
299
300
|
/* STABLE */
|
|
300
301
|
}, 8, ["modelValue", "onUpdate:modelValue"])
|
|
301
302
|
]),
|
|
302
|
-
createElementVNode("div", { class: "flex items-center pt-[5px] pb-4 pl-[14px] pr-3" }, [
|
|
303
|
-
createElementVNode(
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
303
|
+
createElementVNode("div", { class: "flex items-center pt-[5px] pb-4 pl-[14px] pr-3 overflow-hidden" }, [
|
|
304
|
+
createElementVNode("div", { class: "flex items-center" }, [
|
|
305
|
+
createElementVNode(
|
|
306
|
+
"span",
|
|
307
|
+
null,
|
|
308
|
+
toDisplayString(unref(t)("table.selectedNumberItems", [checkedList.value?.length || 0])),
|
|
309
|
+
1
|
|
310
|
+
/* TEXT */
|
|
311
|
+
),
|
|
312
|
+
showClear.value ? (openBlock(), createElementBlock(
|
|
313
|
+
"span",
|
|
314
|
+
{
|
|
315
|
+
key: 0,
|
|
316
|
+
class: "clickBox text-danger-2 ml-3",
|
|
317
|
+
onClick: onClearHandler
|
|
318
|
+
},
|
|
319
|
+
toDisplayString(unref(t)("table.clear")),
|
|
320
|
+
1
|
|
321
|
+
/* TEXT */
|
|
322
|
+
)) : createCommentVNode("v-if", true)
|
|
323
|
+
]),
|
|
324
|
+
createElementVNode("div", { class: "w-0 flex-1 flex items-center justify-end ml-3" }, [
|
|
325
|
+
createVNode(unref(ElIcon), {
|
|
326
|
+
class: "mr-1.5",
|
|
327
|
+
color: "rgb(var(--hy-auxiliary))"
|
|
328
|
+
}, {
|
|
329
|
+
default: withCtx(() => [
|
|
330
|
+
createVNode(unref(Warning))
|
|
331
|
+
]),
|
|
332
|
+
_: 1
|
|
333
|
+
/* STABLE */
|
|
334
|
+
}),
|
|
335
|
+
checkedList.value?.length >= 8 ? (openBlock(), createBlock(unref(HyTooltip), {
|
|
323
336
|
key: 0,
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
color: "rgb(var(--hy-auxiliary))"
|
|
329
|
-
}, {
|
|
330
|
-
default: withCtx(() => [
|
|
331
|
-
createVNode(unref(Warning))
|
|
332
|
-
]),
|
|
333
|
-
_: 1
|
|
334
|
-
/* STABLE */
|
|
335
|
-
}),
|
|
336
|
-
createElementVNode(
|
|
337
|
-
"span",
|
|
338
|
-
null,
|
|
339
|
-
toDisplayString(unref(t)("table.tooManyFieldsWillAffectReadability")),
|
|
340
|
-
1
|
|
341
|
-
/* TEXT */
|
|
342
|
-
)
|
|
343
|
-
])) : createCommentVNode("v-if", true),
|
|
337
|
+
"is-always": false,
|
|
338
|
+
content: unref(t)("table.tooManyFieldsWillAffectReadability"),
|
|
339
|
+
class: "mr-2 text-auxiliary"
|
|
340
|
+
}, null, 8, ["content"])) : createCommentVNode("v-if", true),
|
|
344
341
|
createVNode(unref(HyButton), {
|
|
345
342
|
type: "primary",
|
|
346
343
|
size: "small",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { openBlock, createBlock, unref, withCtx, createElementVNode, toDisplayString, createElementBlock, createCommentVNode, Fragment, renderList, normalizeClass, createVNode, withModifiers } from 'vue';
|
|
2
2
|
import { ElPopover, ElIcon, ElCheckbox } from 'element-plus';
|
|
3
|
-
import { Lock
|
|
3
|
+
import { Lock } from '@element-plus/icons-vue';
|
|
4
4
|
import { renderHeaderHandler } from '../js/index.mjs';
|
|
5
5
|
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
6
6
|
import { HyTooltip } from '../../hyTooltip/index.mjs';
|
|
@@ -90,16 +90,13 @@ const _sfc_main = {
|
|
|
90
90
|
)),
|
|
91
91
|
__props.columnsLength > 1 ? (openBlock(), createElementBlock("div", {
|
|
92
92
|
key: 2,
|
|
93
|
-
class: "
|
|
93
|
+
class: "h-full flex items-center justify-center handle cursor-grab ml-3",
|
|
94
94
|
onClick: withModifiers(() => {
|
|
95
95
|
}, ["stop"])
|
|
96
96
|
}, [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
]),
|
|
101
|
-
_: 1
|
|
102
|
-
/* STABLE */
|
|
97
|
+
createElementVNode("div", {
|
|
98
|
+
class: "w-5 h-2.5",
|
|
99
|
+
style: { "background": "radial-gradient(\n circle,\n rgba(var(--hy-theme)) 1px,\n transparent 2px\n )\n 0px 0px / 5px 5px" }
|
|
103
100
|
})
|
|
104
101
|
], 8, ["onClick"])) : createCommentVNode("v-if", true)
|
|
105
102
|
])) : createCommentVNode("v-if", true)
|
|
@@ -90,7 +90,7 @@ const _sfc_main = {
|
|
|
90
90
|
}, 8, ["color", "onClick"])
|
|
91
91
|
]),
|
|
92
92
|
renderSlot(_ctx.$slots, "default")
|
|
93
|
-
], 8, ["onClick"])) : renderSlot(_ctx.$slots, "default", {
|
|
93
|
+
], 8, ["onClick"])) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1);
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
};
|
|
@@ -53,6 +53,12 @@ const _sfc_main = {
|
|
|
53
53
|
},
|
|
54
54
|
onRowContextmenu: {
|
|
55
55
|
type: Function
|
|
56
|
+
},
|
|
57
|
+
expandMode: {
|
|
58
|
+
// 展开模式,不支持树形展开
|
|
59
|
+
type: String,
|
|
60
|
+
default: "default"
|
|
61
|
+
// deafult-默认 accordion-手风琴
|
|
56
62
|
}
|
|
57
63
|
},
|
|
58
64
|
emits: ["search", "select", "select-all", "expand-change"],
|
|
@@ -258,7 +264,11 @@ const _sfc_main = {
|
|
|
258
264
|
const isExpanded = isBoolean(expanded) ? expanded : !isNumber(index);
|
|
259
265
|
if (isExpanded) {
|
|
260
266
|
if (!isNumber(index)) {
|
|
261
|
-
|
|
267
|
+
if (props.expandMode === "accordion" && isExpandTable.value) {
|
|
268
|
+
expandedKeys.value = [getRowKey(row)];
|
|
269
|
+
} else {
|
|
270
|
+
expandedKeys.value.push(getRowKey(row));
|
|
271
|
+
}
|
|
262
272
|
}
|
|
263
273
|
} else {
|
|
264
274
|
if (isNumber(index)) {
|
|
@@ -345,9 +355,8 @@ const _sfc_main = {
|
|
|
345
355
|
row: withCtx(({ columns, depth, rowData: row, rowIndex: $index }) => [
|
|
346
356
|
createCommentVNode(" \u5C55\u5F00\u5185\u5BB9 "),
|
|
347
357
|
depth > 0 && isExpandTable.value ? renderSlot(_ctx.$slots, expandColumn.value.slot, {
|
|
348
|
-
key: 0,
|
|
349
358
|
row: dataSourceMap.value.get(row.dataKey)
|
|
350
|
-
}) : (openBlock(), createElementBlock(
|
|
359
|
+
}, void 0, void 0, 0) : (openBlock(), createElementBlock(
|
|
351
360
|
Fragment,
|
|
352
361
|
{ key: 1 },
|
|
353
362
|
[
|
|
@@ -382,6 +391,7 @@ const _sfc_main = {
|
|
|
382
391
|
}), ["stop"])
|
|
383
392
|
}, [
|
|
384
393
|
createVNode(unref(ElIcon), {
|
|
394
|
+
class: "text-main",
|
|
385
395
|
style: normalizeStyle({ "margin-inline-start": `${depth * 12}px` })
|
|
386
396
|
}, {
|
|
387
397
|
default: withCtx(() => [
|
|
@@ -411,10 +421,7 @@ const _sfc_main = {
|
|
|
411
421
|
indeterminate: indeterminateKeys.value.has(getRowKey(row)),
|
|
412
422
|
disabled: !isSelectable(row),
|
|
413
423
|
onClick: withModifiers(($event) => switchCheckHandler(row), ["stop"])
|
|
414
|
-
}, null, 8, ["model-value", "indeterminate", "disabled", "onClick"])) : column?.slot && (column.type !== "expand" || !isExpandTable.value) ? renderSlot(_ctx.$slots, column?.slot, mergeProps({
|
|
415
|
-
key: 2,
|
|
416
|
-
ref_for: true
|
|
417
|
-
}, { column, row, $index, cellIndex })) : column.type === "index" ? (openBlock(), createElementBlock(
|
|
424
|
+
}, null, 8, ["model-value", "indeterminate", "disabled", "onClick"])) : column?.slot && (column.type !== "expand" || !isExpandTable.value) ? renderSlot(_ctx.$slots, column?.slot, mergeProps({ ref_for: true }, { column, row, $index, cellIndex }), void 0, void 0, 2) : column.type === "index" ? (openBlock(), createElementBlock(
|
|
418
425
|
Fragment,
|
|
419
426
|
{ key: 3 },
|
|
420
427
|
[
|
|
@@ -428,7 +435,7 @@ const _sfc_main = {
|
|
|
428
435
|
/* STABLE_FRAGMENT */
|
|
429
436
|
)) : column.type === "operator" ? (openBlock(), createElementBlock("div", {
|
|
430
437
|
key: 4,
|
|
431
|
-
class: "w-full flex items-center justify-
|
|
438
|
+
class: "w-full flex items-center justify-end gap-2 text-main",
|
|
432
439
|
onClick: withModifiers(() => {
|
|
433
440
|
}, ["stop"]),
|
|
434
441
|
onContextmenu: withModifiers(() => {
|
|
@@ -446,7 +453,7 @@ const _sfc_main = {
|
|
|
446
453
|
key: cindex,
|
|
447
454
|
"is-always": "",
|
|
448
455
|
overLine: 1,
|
|
449
|
-
content: citem.
|
|
456
|
+
content: citem.desc
|
|
450
457
|
}, {
|
|
451
458
|
default: withCtx(() => [
|
|
452
459
|
createElementVNode("div", {
|
|
@@ -462,13 +469,13 @@ const _sfc_main = {
|
|
|
462
469
|
"svg-name": citem.svgName,
|
|
463
470
|
"class-name": "!w-4 !h-4"
|
|
464
471
|
}, null, 8, ["svg-name"]),
|
|
465
|
-
citem.
|
|
472
|
+
citem.label ? (openBlock(), createElementBlock(
|
|
466
473
|
"div",
|
|
467
474
|
{
|
|
468
475
|
key: 0,
|
|
469
476
|
class: "mt-1 whitespace-nowrap"
|
|
470
477
|
},
|
|
471
|
-
toDisplayString(citem.
|
|
478
|
+
toDisplayString(citem.label),
|
|
472
479
|
1
|
|
473
480
|
/* TEXT */
|
|
474
481
|
)) : (openBlock(), createElementBlock("div", {
|
|
@@ -314,6 +314,17 @@ const useAppTableWrapper = (hy) => {
|
|
|
314
314
|
tableRef.value.toggleRowExpansion(row);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
+
function onTableRowExpandChangeHandler(row, expandedRows) {
|
|
318
|
+
if (isBoolean(expandedRows) || props.expandMode !== "accordion" || expandedRows.length <= 1) {
|
|
319
|
+
props.onExpandChange && props.onExpandChange(row, expandedRows);
|
|
320
|
+
return;
|
|
321
|
+
} else {
|
|
322
|
+
expandedRows.forEach((item) => {
|
|
323
|
+
if (getRowKey(row) === getRowKey(item)) return;
|
|
324
|
+
toggleRowExpansion(item);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
}
|
|
317
328
|
const isSearchFocus = ref(false);
|
|
318
329
|
function onSearchInputHandler() {
|
|
319
330
|
isSearchFocus.value = true;
|
|
@@ -353,6 +364,7 @@ const useAppTableWrapper = (hy) => {
|
|
|
353
364
|
toggleRowExpansion,
|
|
354
365
|
onTableSelectHandler,
|
|
355
366
|
onTableRowContextmenuHandler,
|
|
367
|
+
onTableRowExpandChangeHandler,
|
|
356
368
|
onTableRowClickHandler,
|
|
357
369
|
onTableColumnsSelectHandler,
|
|
358
370
|
// 搜索选中
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toRef } from 'vue';
|
|
2
|
-
import { useAppSearch } from '../../hySearch/js/useAppSearch.mjs';
|
|
3
2
|
import { isEmpty, isBoolean, isString, isObject } from '../../../utils/is.mjs';
|
|
3
|
+
import { useAppSearch } from '../../hySearch/js/useAppSearch.mjs';
|
|
4
4
|
import { useLocale } from '../../../hooks/useLocale.mjs';
|
|
5
5
|
|
|
6
6
|
function getColumnDefaultConfig(column) {
|
|
@@ -38,3 +38,16 @@
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
.hy-table-dropdown-menu.hy-el-dropdown-menu {
|
|
43
|
+
--hy-el-text-color-regular: rgba(var(--hy-main));
|
|
44
|
+
border: 1px solid rgba(var(--hy-main));
|
|
45
|
+
padding: 0px;
|
|
46
|
+
.hy-el-dropdown-menu__item {
|
|
47
|
+
padding: 9px 16px 10px;
|
|
48
|
+
border-bottom: 1px solid rgba(var(--hy-border));
|
|
49
|
+
&:last-child {
|
|
50
|
+
border-bottom: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, withCtx, toDisplayString, normalizeClass, withKeys, renderSlot, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment } from 'vue';
|
|
1
|
+
import { defineComponent, useTemplateRef, openBlock, createElementBlock, createCommentVNode, createElementVNode, createBlock, unref, createVNode, withCtx, toDisplayString, normalizeClass, withKeys, renderSlot, createSlots, renderList, normalizeProps, guardReactiveProps, mergeProps, Fragment, withModifiers } from 'vue';
|
|
2
2
|
import { ElIcon, ElInput, ElTable, ElTableColumn, ElDropdown, ElDropdownMenu, ElDropdownItem, ElAutoResizer, ElPagination } from 'element-plus';
|
|
3
3
|
import { Filter, Search, MoreFilled } from '@element-plus/icons-vue';
|
|
4
4
|
import { operatorFilterHandler, operatorClickHandler, operatorDisabledHandler, operatorDisableTextdHandler, renderContentHandler, renderHeaderHandler, useAppTableWrapper } from './js/index.mjs';
|
|
@@ -6,13 +6,13 @@ import { useAppTableSearch } from './js/search.mjs';
|
|
|
6
6
|
import _sfc_main$2 from './cpns/headerItem.vue.mjs';
|
|
7
7
|
import _sfc_main$1 from './cpns/columnSelect.vue.mjs';
|
|
8
8
|
import _sfc_main$3 from './cpns/virtualTable.vue.mjs';
|
|
9
|
-
import { useMixins } from '../../hooks/useMixins.mjs';
|
|
10
|
-
import { HySearch } from '../hySearch/index.mjs';
|
|
11
|
-
import { parseRem } from '../../utils/adaptive.mjs';
|
|
12
9
|
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
10
|
+
import { useMixins } from '../../hooks/useMixins.mjs';
|
|
13
11
|
import { HyTooltip } from '../hyTooltip/index.mjs';
|
|
14
12
|
import { HyButton } from '../hyButton/index.mjs';
|
|
15
13
|
import { HyIcon } from '../hyIcon/index.mjs';
|
|
14
|
+
import { HySearch } from '../hySearch/index.mjs';
|
|
15
|
+
import { parseRem } from '../../utils/adaptive.mjs';
|
|
16
16
|
import { isEmpty } from '../../utils/is.mjs';
|
|
17
17
|
|
|
18
18
|
import "./style/table.scss";
|
|
@@ -173,6 +173,16 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
173
173
|
type: Boolean,
|
|
174
174
|
required: false,
|
|
175
175
|
default: true
|
|
176
|
+
},
|
|
177
|
+
expandMode: {
|
|
178
|
+
// 展开模式,不支持树形展开
|
|
179
|
+
type: String,
|
|
180
|
+
default: "default"
|
|
181
|
+
// deafult-默认 accordion-手风琴
|
|
182
|
+
},
|
|
183
|
+
onExpandChange: {
|
|
184
|
+
// 展开回调
|
|
185
|
+
type: Function
|
|
176
186
|
}
|
|
177
187
|
},
|
|
178
188
|
emits: [
|
|
@@ -210,6 +220,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
210
220
|
toggleRowExpansion,
|
|
211
221
|
onTableRowClickHandler,
|
|
212
222
|
onTableRowContextmenuHandler,
|
|
223
|
+
onTableRowExpandChangeHandler,
|
|
213
224
|
onTableSelectHandler,
|
|
214
225
|
isSearchFocus,
|
|
215
226
|
onSearchInputHandler,
|
|
@@ -318,8 +329,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
318
329
|
"onUpdate:modelValue": ($event) => __props.filterModel.query = $event,
|
|
319
330
|
class: "hy-table-search",
|
|
320
331
|
placeholder: unref(t)("table.searchFor", [__props.controllerText || ""]),
|
|
332
|
+
clearable: "",
|
|
321
333
|
onFocus: unref(onSearchInputHandler),
|
|
322
334
|
onBlur: unref(onSearchBlurHandler),
|
|
335
|
+
onClear: unref(onSearchQueryHandler),
|
|
323
336
|
onKeydown: withKeys(unref(onSearchQueryHandler), ["enter"])
|
|
324
337
|
}, {
|
|
325
338
|
append: withCtx(() => [
|
|
@@ -338,7 +351,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
338
351
|
]),
|
|
339
352
|
_: 1
|
|
340
353
|
/* STABLE */
|
|
341
|
-
}, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onFocus", "onBlur", "onKeydown"])
|
|
354
|
+
}, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "onFocus", "onBlur", "onClear", "onKeydown"])
|
|
342
355
|
],
|
|
343
356
|
2
|
|
344
357
|
/* CLASS */
|
|
@@ -413,7 +426,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
413
426
|
onSelect: unref(onTableSelectHandler),
|
|
414
427
|
onSelectAll: unref(onTableSelectHandler),
|
|
415
428
|
onRowClick: unref(onTableRowClickHandler),
|
|
416
|
-
onRowContextmenu: unref(onTableRowContextmenuHandler)
|
|
429
|
+
onRowContextmenu: unref(onTableRowContextmenuHandler),
|
|
430
|
+
onExpandChange: unref(onTableRowExpandChangeHandler)
|
|
417
431
|
}), {
|
|
418
432
|
empty: withCtx(() => [
|
|
419
433
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
@@ -466,12 +480,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
466
480
|
}, 1032, ["column", "filter-model", "onSearch"])
|
|
467
481
|
]),
|
|
468
482
|
default: withCtx((scope) => [
|
|
469
|
-
column?.slot ? renderSlot(_ctx.$slots, column?.slot, mergeProps({
|
|
470
|
-
key: 0,
|
|
471
|
-
ref_for: true
|
|
472
|
-
}, scope)) : column.type === "operator" ? (openBlock(), createElementBlock("div", {
|
|
483
|
+
column?.slot ? renderSlot(_ctx.$slots, column?.slot, mergeProps({ ref_for: true }, scope), void 0, void 0, 0) : column.type === "operator" ? (openBlock(), createElementBlock("div", {
|
|
473
484
|
key: 1,
|
|
474
|
-
class: "flex items-center justify-end text-main"
|
|
485
|
+
class: "flex items-center justify-end gap-2 text-main"
|
|
475
486
|
}, [
|
|
476
487
|
(openBlock(true), createElementBlock(
|
|
477
488
|
Fragment,
|
|
@@ -485,31 +496,33 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
485
496
|
key: cindex,
|
|
486
497
|
"is-always": "",
|
|
487
498
|
overLine: 1,
|
|
488
|
-
content: citem.
|
|
499
|
+
content: citem.desc
|
|
489
500
|
}, {
|
|
490
501
|
default: withCtx(() => [
|
|
491
502
|
createElementVNode("div", {
|
|
492
|
-
class: normalizeClass(["
|
|
493
|
-
onClick: ($event) => unref(operatorClickHandler)(cindex, column, scope, "default")
|
|
503
|
+
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]),
|
|
504
|
+
onClick: withModifiers(($event) => unref(operatorClickHandler)(cindex, column, scope, "default"), ["stop"]),
|
|
505
|
+
onContextmenu: withModifiers(() => {
|
|
506
|
+
}, ["stop"])
|
|
494
507
|
}, [
|
|
495
508
|
createVNode(unref(HyIcon), {
|
|
496
509
|
"svg-name": citem.svgName,
|
|
497
510
|
"class-name": "!w-4 !h-4"
|
|
498
511
|
}, null, 8, ["svg-name"]),
|
|
499
|
-
citem.
|
|
512
|
+
citem.label ? (openBlock(), createElementBlock(
|
|
500
513
|
"div",
|
|
501
514
|
{
|
|
502
515
|
key: 0,
|
|
503
516
|
class: "mt-1 whitespace-nowrap w-full text-center over_one_line"
|
|
504
517
|
},
|
|
505
|
-
toDisplayString(citem.
|
|
518
|
+
toDisplayString(citem.label),
|
|
506
519
|
1
|
|
507
520
|
/* TEXT */
|
|
508
521
|
)) : (openBlock(), createElementBlock("div", {
|
|
509
522
|
key: 1,
|
|
510
523
|
class: "mt-1 whitespace-nowrap"
|
|
511
524
|
}, "\xA0"))
|
|
512
|
-
],
|
|
525
|
+
], 42, ["onClick", "onContextmenu"])
|
|
513
526
|
]),
|
|
514
527
|
_: 2
|
|
515
528
|
/* DYNAMIC */
|
|
@@ -584,7 +597,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
584
597
|
)
|
|
585
598
|
]),
|
|
586
599
|
default: withCtx(() => [
|
|
587
|
-
createElementVNode("
|
|
600
|
+
createElementVNode("div", {
|
|
601
|
+
onClick: withModifiers(() => {
|
|
602
|
+
}, ["stop"]),
|
|
603
|
+
onContextmenu: withModifiers(() => {
|
|
604
|
+
}, ["stop"])
|
|
605
|
+
}, [
|
|
588
606
|
createVNode(unref(HyTooltip), {
|
|
589
607
|
"is-always": "",
|
|
590
608
|
overLine: 1,
|
|
@@ -614,7 +632,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
614
632
|
_: 1
|
|
615
633
|
/* STABLE */
|
|
616
634
|
}, 8, ["content"])
|
|
617
|
-
])
|
|
635
|
+
], 40, ["onClick", "onContextmenu"])
|
|
618
636
|
]),
|
|
619
637
|
_: 2
|
|
620
638
|
/* DYNAMIC */
|
|
@@ -654,7 +672,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
654
672
|
]),
|
|
655
673
|
_: 3
|
|
656
674
|
/* FORWARDED */
|
|
657
|
-
}, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu"])) : createCommentVNode("v-if", true),
|
|
675
|
+
}, 16, ["row-key", "data", "show-header", "row-class-name", "class", "style", "onSelect", "onSelectAll", "onRowClick", "onRowContextmenu", "onExpandChange"])) : createCommentVNode("v-if", true),
|
|
658
676
|
__props.type === "virtual" ? (openBlock(), createBlock(unref(ElAutoResizer), { key: 1 }, {
|
|
659
677
|
default: withCtx(({ height, width }) => [
|
|
660
678
|
createVNode(_sfc_main$3, mergeProps({
|
|
@@ -674,11 +692,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
674
692
|
},
|
|
675
693
|
"row-key": __props.rowKey,
|
|
676
694
|
"filter-model": __props.filterModel,
|
|
695
|
+
expandMode: __props.expandMode,
|
|
677
696
|
onSearch: ($event) => unref(getData)(1),
|
|
678
697
|
onSelect: unref(onTableSelectHandler),
|
|
679
698
|
onSelectAll: unref(onTableSelectHandler),
|
|
680
699
|
onRowClick: unref(onTableRowClickHandler),
|
|
681
|
-
onRowContextmenu: unref(onTableRowContextmenuHandler)
|
|
700
|
+
onRowContextmenu: unref(onTableRowContextmenuHandler),
|
|
701
|
+
onExpandChange: __props.onExpandChange
|
|
682
702
|
}), createSlots({
|
|
683
703
|
empty: withCtx(() => [
|
|
684
704
|
createElementVNode("div", { class: "w-full h-full flex items-center justify-center border-b border-border" }, [
|
|
@@ -704,7 +724,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
704
724
|
])
|
|
705
725
|
};
|
|
706
726
|
})
|
|
707
|
-
]), 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"])
|
|
708
728
|
]),
|
|
709
729
|
_: 3
|
|
710
730
|
/* FORWARDED */
|
|
@@ -759,7 +779,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
759
779
|
)
|
|
760
780
|
}, {
|
|
761
781
|
dropdown: withCtx(() => [
|
|
762
|
-
createVNode(unref(ElDropdownMenu),
|
|
782
|
+
createVNode(unref(ElDropdownMenu), { class: "hy-table-dropdown-menu" }, {
|
|
763
783
|
default: withCtx(() => [
|
|
764
784
|
(openBlock(true), createElementBlock(
|
|
765
785
|
Fragment,
|