geekplus-digital-ui 0.1.41 → 0.2.0
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/components/icons/filter-list-light.vue.d.ts +2 -0
- package/components/index.d.ts +1 -0
- package/components/index.js +13 -11
- package/components/table/index.d.ts +120 -0
- package/components/table/src/table-filter.vue.d.ts +2 -0
- package/components/table/src/table-wrapper.vue.d.ts +7 -0
- package/components/table/src/table.vue.d.ts +54 -0
- package/hooks/index.js +2 -2
- package/index.js +16 -15
- package/locale/index.js +6 -6
- package/locale/lang/en.d.ts +9 -0
- package/locale/lang/ja.d.ts +9 -0
- package/locale/lang/ko.d.ts +9 -0
- package/locale/lang/zh-cn.d.ts +9 -0
- package/locale/lang/zh-tw.d.ts +9 -0
- package/package.json +36 -34
- package/{components → packages/components}/copy/src/copy.js +3 -3
- package/{components → packages/components}/editor/src/code-collapse.js +7 -7
- package/packages/components/editor/src/code-collapse.vue_vue_type_style_index_0_scoped_04a8d31f_lang.css +1 -0
- package/packages/components/editor/src/editor.vue_vue_type_style_index_0_scoped_125d5f42_lang.css +1 -0
- package/{components → packages/components}/editor/src/editor2.js +8 -8
- package/{components → packages/components}/fold-text/src/fold-text.js +8 -8
- package/packages/components/fold-text/src/fold-text.vue_vue_type_style_index_0_scoped_f460d6d5_lang.css +1 -0
- package/{components → packages/components}/icon/src/icon.js +1 -1
- package/{components → packages/components}/icon-tip/src/icon-tip.js +5 -5
- package/packages/components/icon-tip/src/icon-tip.vue_vue_type_style_index_0_scoped_fd7f9264_lang.css +1 -0
- package/{components → packages/components}/icons/angle-down-light.js +1 -1
- package/{components → packages/components}/icons/angle-up-light.js +1 -1
- package/{components → packages/components}/icons/circle-exclamation-solid.js +1 -1
- package/{components → packages/components}/icons/circle-play-light.js +1 -1
- package/{components → packages/components}/icons/circle-xmark-light.js +1 -1
- package/{components → packages/components}/icons/copy-light.js +1 -1
- package/{components → packages/components}/icons/download-light.js +1 -1
- package/{components → packages/components}/icons/eye-light.js +1 -1
- package/{components → packages/components}/icons/file-light.js +1 -1
- package/packages/components/icons/filter-list-light.js +16 -0
- package/{components → packages/components}/icons/image-light.js +1 -1
- package/{components → packages/components}/icons/plus-light.js +1 -1
- package/{components → packages/components}/icons/trash-light.js +1 -1
- package/{components → packages/components}/inline-edit/src/inline-edit.js +5 -5
- package/packages/components/inline-edit/src/inline-edit.vue_vue_type_style_index_0_scoped_b066ddcd_lang.css +1 -0
- package/{components → packages/components}/search-form/src/search-form.js +7 -7
- package/packages/components/search-form/src/search-form.vue_vue_type_style_index_0_scoped_ff9cbf76_lang.css +1 -0
- package/{components → packages/components}/search-item/src/search-item.js +5 -5
- package/packages/components/search-item/src/search-item.vue_vue_type_style_index_0_scoped_a37eaef0_lang.css +1 -0
- package/packages/components/table/index.js +5 -0
- package/packages/components/table/src/table-filter.js +131 -0
- package/packages/components/table/src/table-filter.vue_vue_type_style_index_0_scoped_70a03e33_lang.css +1 -0
- package/packages/components/table/src/table-wrapper.js +53 -0
- package/packages/components/table/src/table.js +166 -0
- package/packages/components/table/src/table.vue_vue_type_style_index_0_scoped_a6c85ac1_lang.css +1 -0
- package/{components → packages/components}/upload/src/upload.js +16 -16
- package/packages/components/upload/src/upload.vue_vue_type_style_index_0_scoped_aef1e5b2_lang.css +1 -0
- package/packages/components/upload/src/upload.vue_vue_type_style_index_1_lang.css +1 -0
- package/{hooks → packages/hooks}/use-locale/index.js +1 -1
- package/{install.js → packages/install.js} +3 -3
- package/{locale → packages/locale}/lang/en.js +8 -0
- package/{locale → packages/locale}/lang/ja.js +8 -0
- package/{locale → packages/locale}/lang/ko.js +8 -0
- package/{locale → packages/locale}/lang/zh-cn.js +8 -0
- package/{locale → packages/locale}/lang/zh-tw.js +8 -0
- package/skills/use-geekplus-digital-ui/SKILL.md +245 -104
- package/components/editor/src/code-collapse.vue_vue_type_style_index_0_scoped_44e188d6_lang.css +0 -1
- package/components/editor/src/editor.vue_vue_type_style_index_0_scoped_9103e51e_lang.css +0 -1
- package/components/fold-text/src/fold-text.vue_vue_type_style_index_0_scoped_cc699234_lang.css +0 -1
- package/components/icon-tip/src/icon-tip.vue_vue_type_style_index_0_scoped_fe982c8e_lang.css +0 -1
- package/components/inline-edit/src/inline-edit.vue_vue_type_style_index_0_scoped_fc1016d4_lang.css +0 -1
- package/components/search-form/src/search-form.vue_vue_type_style_index_0_scoped_cea05b8f_lang.css +0 -1
- package/components/search-item/src/search-item.vue_vue_type_style_index_0_scoped_27c41622_lang.css +0 -1
- package/components/upload/src/upload.vue_vue_type_style_index_0_scoped_c4e16833_lang.css +0 -1
- package/components/upload/src/upload.vue_vue_type_style_index_1_lang.css +0 -1
- /package/{components → packages/components}/copy/index.js +0 -0
- /package/{components → packages/components}/copy/src/copy.vue_vue_type_style_index_0_scoped_80dabae9_lang.css +0 -0
- /package/{components → packages/components}/editor/index.js +0 -0
- /package/{components → packages/components}/editor/src/editor.css +0 -0
- /package/{components → packages/components}/fold-text/index.js +0 -0
- /package/{components → packages/components}/icon/index.js +0 -0
- /package/{components → packages/components}/icon/src/icon.vue_vue_type_style_index_0_scoped_29c845ca_lang.css +0 -0
- /package/{components → packages/components}/icon-tip/index.js +0 -0
- /package/{components → packages/components}/inline-edit/index.js +0 -0
- /package/{components → packages/components}/search-form/index.js +0 -0
- /package/{components → packages/components}/search-item/index.js +0 -0
- /package/{components → packages/components}/upload/index.js +0 -0
- /package/{hooks → packages/hooks}/use-activated/index.js +0 -0
- /package/{locale → packages/locale}/i18n.js +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "../../icon/index.js";
|
|
3
3
|
import n from "../../icons/circle-exclamation-solid.js";
|
|
4
|
-
import './icon-tip.
|
|
5
|
-
import "
|
|
4
|
+
import './icon-tip.vue_vue_type_style_index_0_scoped_fd7f9264_lang.css';/* empty css */
|
|
5
|
+
import "../../../../components/index.js";
|
|
6
6
|
import { createBlock as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, mergeProps as c, normalizeClass as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
|
|
7
7
|
import { ElLink as h, ElTooltip as g } from "element-plus";
|
|
8
8
|
//#region packages/components/icon-tip/src/icon-tip.vue
|
|
9
|
-
var _ = { class: "
|
|
9
|
+
var _ = { class: "d-icon-tip__content" }, v = /* @__PURE__ */ e(/* @__PURE__ */ Object.assign({ name: "DIconTip" }, {
|
|
10
10
|
__name: "icon-tip",
|
|
11
11
|
props: {
|
|
12
12
|
content: { type: String },
|
|
@@ -47,6 +47,6 @@ var _ = { class: "tip-content" }, v = /* @__PURE__ */ e(/* @__PURE__ */ Object.a
|
|
|
47
47
|
_: 3
|
|
48
48
|
}, 8, ["placement"]));
|
|
49
49
|
}
|
|
50
|
-
}), [["__scopeId", "data-v-
|
|
50
|
+
}), [["__scopeId", "data-v-fd7f9264"]]);
|
|
51
51
|
//#endregion
|
|
52
52
|
export { v as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.d-icon-tip .d-icon-tip__content[data-v-fd7f9264]{white-space:pre-wrap}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/angle-down-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/angle-up-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/circle-exclamation-solid.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/circle-play-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/circle-xmark-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/copy-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/download-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/eye-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/file-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
|
+
//#region packages/components/icons/filter-list-light.vue
|
|
4
|
+
var i = {}, a = {
|
|
5
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6
|
+
viewBox: "0 0 576 512"
|
|
7
|
+
};
|
|
8
|
+
function o(e, i) {
|
|
9
|
+
return r(), t("svg", a, [...i[0] ||= [n("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
d: "M233.4 203.3L340.7 96 43.3 96 150.6 203.3c6 6 9.4 14.1 9.4 22.6l0 114.7 64 64 0-178.7c0-8.5 3.4-16.6 9.4-22.6zM377 105l-121 121 0 198.1c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-80-80c-4.5-4.5-7-10.6-7-17L128 225.9 7 105C.2 98.1-1.9 87.8 1.8 78.8S14.3 64 24 64l336 0c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2zm87-41l64 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zM336 240l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 176l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"
|
|
12
|
+
}, null, -1)]]);
|
|
13
|
+
}
|
|
14
|
+
var s = /* @__PURE__ */ e(i, [["render", o]]);
|
|
15
|
+
//#endregion
|
|
16
|
+
export { s as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/image-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/plus-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
1
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
3
|
//#region packages/components/icons/trash-light.vue
|
|
4
4
|
var i = {}, a = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import './inline-edit.
|
|
1
|
+
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import './inline-edit.vue_vue_type_style_index_0_scoped_b066ddcd_lang.css';/* empty css */
|
|
3
3
|
import { isFunction as t } from "lodash-es";
|
|
4
4
|
import { createElementBlock as n, nextTick as r, normalizeClass as i, openBlock as a, ref as o, renderSlot as s, useTemplateRef as c } from "vue";
|
|
5
5
|
import { onClickOutside as l } from "@vueuse/core";
|
|
@@ -64,14 +64,14 @@ var u = "input:not([disabled]), textarea:not([disabled]), [contenteditable=\"tru
|
|
|
64
64
|
key: 0,
|
|
65
65
|
ref_key: "editorRef",
|
|
66
66
|
ref: _,
|
|
67
|
-
class: "
|
|
67
|
+
class: "d-inline-edit__editor"
|
|
68
68
|
}, [s(e.$slots, "editor", {}, void 0, !0)], 512)) : (a(), n("div", {
|
|
69
69
|
key: 1,
|
|
70
|
-
class: i(["
|
|
70
|
+
class: i(["d-inline-edit__text", { "is-hoverable": !m.disabled }]),
|
|
71
71
|
onClick: T,
|
|
72
72
|
onDblclick: E
|
|
73
73
|
}, [s(e.$slots, "default", {}, void 0, !0)], 34))], 512));
|
|
74
74
|
}
|
|
75
|
-
}), [["__scopeId", "data-v-
|
|
75
|
+
}), [["__scopeId", "data-v-b066ddcd"]]);
|
|
76
76
|
//#endregion
|
|
77
77
|
export { d as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.d-inline-edit .is-hoverable[data-v-b066ddcd]{cursor:text;border-radius:4px}.d-inline-edit .is-hoverable[data-v-b066ddcd]:hover{box-shadow:0 0 0 1px var(--el-border-color) inset}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useLocale as e } from "../../../hooks/use-locale/index.js";
|
|
2
|
-
import "
|
|
3
|
-
import t from "
|
|
2
|
+
import "../../../../hooks/index.js";
|
|
3
|
+
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
import n from "../../icons/angle-down-light.js";
|
|
5
5
|
import r from "../../icons/angle-up-light.js";
|
|
6
6
|
import i from "../../icon/index.js";
|
|
7
|
-
import './search-form.
|
|
8
|
-
import "
|
|
7
|
+
import './search-form.vue_vue_type_style_index_0_scoped_ff9cbf76_lang.css';/* empty css */
|
|
8
|
+
import "../../../../components/index.js";
|
|
9
9
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, normalizeClass as p, normalizeStyle as m, openBlock as h, provide as g, ref as _, renderSlot as v, toDisplayString as y, unref as b, useTemplateRef as x, withCtx as S, withKeys as C } from "vue";
|
|
10
10
|
import { useResizeObserver as w } from "@vueuse/core";
|
|
11
11
|
import { ElButton as T, ElRow as E } from "element-plus";
|
|
@@ -58,12 +58,12 @@ var D = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DSearchForm" },
|
|
|
58
58
|
}, [u("div", {
|
|
59
59
|
ref_key: "rowRef",
|
|
60
60
|
ref: j,
|
|
61
|
-
class: "search-
|
|
61
|
+
class: "d-search-form__row"
|
|
62
62
|
}, [f(b(E), { gutter: 12 }, {
|
|
63
63
|
default: S(() => [v(e.$slots, "default", { isOpen: M.value }, void 0, !0)]),
|
|
64
64
|
_: 3
|
|
65
65
|
})], 512), u("div", {
|
|
66
|
-
class: "search-
|
|
66
|
+
class: "d-search-form__btns",
|
|
67
67
|
style: m(B.value)
|
|
68
68
|
}, [
|
|
69
69
|
f(b(T), {
|
|
@@ -106,6 +106,6 @@ var D = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DSearchForm" },
|
|
|
106
106
|
}))], 64)) : c("", !0)
|
|
107
107
|
], 4)], 38));
|
|
108
108
|
}
|
|
109
|
-
}), [["__scopeId", "data-v-
|
|
109
|
+
}), [["__scopeId", "data-v-ff9cbf76"]]);
|
|
110
110
|
//#endregion
|
|
111
111
|
export { D as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.d-search-form[data-v-ff9cbf76]{align-items:flex-start;gap:12px;display:flex;overflow:hidden}.d-search-form.is-open[data-v-ff9cbf76]{overflow:visible}.d-search-form .d-search-form__row[data-v-ff9cbf76]{flex:1}.d-search-form .d-search-form__row[data-v-ff9cbf76] .el-row{flex-wrap:wrap;gap:12px 0}.d-search-form .d-search-form__btns[data-v-ff9cbf76]{flex-shrink:0;align-items:center;gap:12px;display:flex;position:relative}.d-search-form .d-search-form__btns[data-v-ff9cbf76] .el-button{margin:0}.d-search-form .d-search-form__btns[data-v-ff9cbf76] .el-button .d-icon{margin-left:4px}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import './search-item.
|
|
1
|
+
import e from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import './search-item.vue_vue_type_style_index_0_scoped_a37eaef0_lang.css';/* empty css */
|
|
3
3
|
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, inject as o, onMounted as s, onUnmounted as c, openBlock as l, renderSlot as u, toDisplayString as d, toRef as f, unref as p, withCtx as m } from "vue";
|
|
4
4
|
import { ElCol as h } from "element-plus";
|
|
5
5
|
//#region packages/components/search-item/src/search-item.vue
|
|
6
6
|
var g = {
|
|
7
7
|
key: 0,
|
|
8
|
-
class: "
|
|
9
|
-
}, _ = { class: "
|
|
8
|
+
class: "d-search-item__label"
|
|
9
|
+
}, _ = { class: "d-search-item__content" }, v = /* @__PURE__ */ e(/* @__PURE__ */ Object.assign({ name: "DSearchItem" }, {
|
|
10
10
|
__name: "search-item",
|
|
11
11
|
props: {
|
|
12
12
|
label: {
|
|
@@ -40,6 +40,6 @@ var g = {
|
|
|
40
40
|
_: 3
|
|
41
41
|
}, 8, ["span"]));
|
|
42
42
|
}
|
|
43
|
-
}), [["__scopeId", "data-v-
|
|
43
|
+
}), [["__scopeId", "data-v-a37eaef0"]]);
|
|
44
44
|
//#endregion
|
|
45
45
|
export { v as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.d-search-item .d-search-item__label[data-v-a37eaef0]{text-overflow:ellipsis;white-space:nowrap;height:32px;line-height:32px;overflow:hidden}.d-search-item .d-search-item__content[data-v-a37eaef0] .el-select,.d-search-item .d-search-item__content[data-v-a37eaef0] .el-input,.d-search-item .d-search-item__content[data-v-a37eaef0] .el-date-editor{width:100%}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { useLocale as e } from "../../../hooks/use-locale/index.js";
|
|
2
|
+
import "../../../../hooks/index.js";
|
|
3
|
+
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
import n from "../../icon/index.js";
|
|
5
|
+
import { useSortable as r } from "../../../../node_modules/.pnpm/@vueuse_integrations@14.2.1_a615f74e286bcfd94138d5303218186e/node_modules/@vueuse/integrations/dist/useSortable-Cc5LKbDD.js";
|
|
6
|
+
import i from "../../icons/filter-list-light.js";
|
|
7
|
+
import './table-filter.vue_vue_type_style_index_0_scoped_70a03e33_lang.css';/* empty css */
|
|
8
|
+
import "../../../../components/index.js";
|
|
9
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, inject as p, openBlock as m, ref as h, renderList as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
10
|
+
import { ElButton as b, ElCheckbox as x, ElPopover as S } from "element-plus";
|
|
11
|
+
//#region packages/components/table/src/table-filter.vue
|
|
12
|
+
var C = { class: "d-table-filter__header" }, w = { class: "d-table-filter__body" }, T = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "d-table-filter__group-label"
|
|
15
|
+
}, E = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DTableFilter" }, {
|
|
16
|
+
__name: "table-filter",
|
|
17
|
+
setup(t) {
|
|
18
|
+
let { t: E } = e(), { columnList: D, checkedKeys: O, columnOrder: k, saveConfig: A } = p("dTableContext"), j = (e) => {
|
|
19
|
+
let t = k.value.map((t) => D.value.find((n) => n.prop === t && (n.fixed ?? !1) === e)).filter(Boolean), n = D.value.filter((t) => (t.fixed ?? !1) === e && !k.value.includes(t.prop));
|
|
20
|
+
return [...t, ...n];
|
|
21
|
+
}, M = o(() => ({
|
|
22
|
+
left: j("left"),
|
|
23
|
+
middle: j(!1),
|
|
24
|
+
right: j("right")
|
|
25
|
+
})), N = o(() => [
|
|
26
|
+
{
|
|
27
|
+
key: "left",
|
|
28
|
+
labelKey: "d.table.fixedLeft",
|
|
29
|
+
items: M.value.left,
|
|
30
|
+
hideWhenEmpty: !0,
|
|
31
|
+
showLabel: !0
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
key: "middle",
|
|
35
|
+
labelKey: "d.table.columns",
|
|
36
|
+
items: M.value.middle,
|
|
37
|
+
hideWhenEmpty: !1,
|
|
38
|
+
showLabel: M.value.left.length > 0 || M.value.right.length > 0
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "right",
|
|
42
|
+
labelKey: "d.table.fixedRight",
|
|
43
|
+
items: M.value.right,
|
|
44
|
+
hideWhenEmpty: !0,
|
|
45
|
+
showLabel: !0
|
|
46
|
+
}
|
|
47
|
+
]), P = {
|
|
48
|
+
left: h(null),
|
|
49
|
+
middle: h(null),
|
|
50
|
+
right: h(null)
|
|
51
|
+
}, F = (e, t) => {
|
|
52
|
+
P[t].value = e;
|
|
53
|
+
}, I = (e) => ({ oldIndex: t, newIndex: n }) => {
|
|
54
|
+
if (t === n) return;
|
|
55
|
+
let r = [...M.value[e].map((e) => e.prop)], [i] = r.splice(t, 1);
|
|
56
|
+
r.splice(n, 0, i);
|
|
57
|
+
let a = e === "left" ? r : M.value.left.map((e) => e.prop), o = e === "middle" ? r : M.value.middle.map((e) => e.prop), s = e === "right" ? r : M.value.right.map((e) => e.prop);
|
|
58
|
+
k.value = [
|
|
59
|
+
...a,
|
|
60
|
+
...o,
|
|
61
|
+
...s
|
|
62
|
+
], A();
|
|
63
|
+
}, L = (e) => ({
|
|
64
|
+
handle: ".d-table-filter__handle",
|
|
65
|
+
animation: 150,
|
|
66
|
+
onUpdate: () => {},
|
|
67
|
+
onEnd: I(e)
|
|
68
|
+
}), R = {
|
|
69
|
+
left: r(P.left, o(() => M.value.left), L("left")),
|
|
70
|
+
middle: r(P.middle, o(() => M.value.middle), L("middle")),
|
|
71
|
+
right: r(P.right, o(() => M.value.right), L("right"))
|
|
72
|
+
}, z = !1, B = () => {
|
|
73
|
+
z || (z = !0, Object.values(R).forEach((e) => e.start()));
|
|
74
|
+
}, V = (e, t) => {
|
|
75
|
+
if (t) O.value.includes(e) || (O.value = [...O.value, e], A());
|
|
76
|
+
else {
|
|
77
|
+
if (O.value.length <= 1) return;
|
|
78
|
+
O.value = O.value.filter((t) => t !== e), A();
|
|
79
|
+
}
|
|
80
|
+
}, H = () => {
|
|
81
|
+
let e = D.value.map((e) => e.prop);
|
|
82
|
+
O.value = e, k.value = e, A();
|
|
83
|
+
};
|
|
84
|
+
return (e, t) => (m(), s(v(S), {
|
|
85
|
+
placement: "bottom-end",
|
|
86
|
+
width: "auto",
|
|
87
|
+
trigger: "click",
|
|
88
|
+
onShow: B
|
|
89
|
+
}, {
|
|
90
|
+
reference: y(() => [f(v(b), {
|
|
91
|
+
link: "",
|
|
92
|
+
style: { "font-size": "16px" }
|
|
93
|
+
}, {
|
|
94
|
+
default: y(() => [f(v(n), null, {
|
|
95
|
+
default: y(() => [f(i)]),
|
|
96
|
+
_: 1
|
|
97
|
+
})]),
|
|
98
|
+
_: 1
|
|
99
|
+
})]),
|
|
100
|
+
default: y(() => [u("div", C, [f(v(b), {
|
|
101
|
+
link: "",
|
|
102
|
+
type: "primary",
|
|
103
|
+
onClick: H
|
|
104
|
+
}, {
|
|
105
|
+
default: y(() => [d(_(v(E)("d.table.reset")), 1)]),
|
|
106
|
+
_: 1
|
|
107
|
+
})]), u("div", w, [(m(!0), l(a, null, g(N.value, (e) => (m(), l(a, { key: e.key }, [!e.hideWhenEmpty || e.items.length ? (m(), l(a, { key: 0 }, [e.showLabel ? (m(), l("div", T, _(v(E)(e.labelKey)), 1)) : c("", !0), u("ul", {
|
|
108
|
+
ref_for: !0,
|
|
109
|
+
ref: (t) => F(t, e.key),
|
|
110
|
+
class: "d-table-filter__list"
|
|
111
|
+
}, [(m(!0), l(a, null, g(e.items, (e) => (m(), l("li", {
|
|
112
|
+
key: e.prop,
|
|
113
|
+
class: "d-table-filter__item"
|
|
114
|
+
}, [t[0] ||= u("span", { class: "d-table-filter__handle" }, "⠿", -1), f(v(x), {
|
|
115
|
+
"model-value": v(O).includes(e.prop),
|
|
116
|
+
disabled: v(O).length <= 1 && v(O).includes(e.prop),
|
|
117
|
+
onChange: (t) => V(e.prop, t)
|
|
118
|
+
}, {
|
|
119
|
+
default: y(() => [d(_(e.label), 1)]),
|
|
120
|
+
_: 2
|
|
121
|
+
}, 1032, [
|
|
122
|
+
"model-value",
|
|
123
|
+
"disabled",
|
|
124
|
+
"onChange"
|
|
125
|
+
])]))), 128))], 512)], 64)) : c("", !0)], 64))), 128))])]),
|
|
126
|
+
_: 1
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
}), [["__scopeId", "data-v-70a03e33"]]);
|
|
130
|
+
//#endregion
|
|
131
|
+
export { E as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.d-table-filter__body[data-v-70a03e33]{max-height:400px;overflow-y:auto}.d-table-filter__list[data-v-70a03e33]{margin:0;padding:0;list-style:none}.d-table-filter__item[data-v-70a03e33]{align-items:center;gap:6px;display:flex}.d-table-filter__item[data-v-70a03e33] .el-checkbox{height:24px}.d-table-filter__header[data-v-70a03e33]{justify-content:flex-end;margin-bottom:4px;display:flex}.d-table-filter__group-label[data-v-70a03e33]{color:var(--el-text-color-secondary);padding:4px 0 2px;font-size:12px}.d-table-filter__handle[data-v-70a03e33]{color:var(--el-text-color-placeholder);cursor:grab;flex-shrink:0;font-size:16px;line-height:1}.d-table-filter__handle[data-v-70a03e33]:active{cursor:grabbing}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Fragment as e, h as t, inject as n } from "vue";
|
|
2
|
+
//#region packages/components/table/src/table-wrapper.vue
|
|
3
|
+
var r = (e) => (e?.type?.name || e?.type?.__name) === "ElTableColumn", i = (t) => {
|
|
4
|
+
let n = [];
|
|
5
|
+
for (let r of t) if (r.type === e) {
|
|
6
|
+
let e = Array.isArray(r.children) ? r.children : [];
|
|
7
|
+
n.push(...i(e));
|
|
8
|
+
} else n.push(r);
|
|
9
|
+
return n;
|
|
10
|
+
}, a = (e) => {
|
|
11
|
+
let t = [], n = [];
|
|
12
|
+
for (let i of e) {
|
|
13
|
+
if (!r(i)) continue;
|
|
14
|
+
let { type: e, prop: a, label: o } = i.props || {};
|
|
15
|
+
e ? n.push(i) : a && o ? t.push(i) : n.push(i);
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
controllable: t,
|
|
19
|
+
always: n
|
|
20
|
+
};
|
|
21
|
+
}, o = (e, t, n) => n.length === 0 ? e : n.filter((e) => t.includes(e)).map((t) => e.find((e) => e.props?.prop === t)).filter(Boolean), s = {
|
|
22
|
+
name: "DTableWrapper",
|
|
23
|
+
setup(e, { slots: r }) {
|
|
24
|
+
let s = n("dTableContext");
|
|
25
|
+
return () => {
|
|
26
|
+
if (!s) return r.default?.() ?? [];
|
|
27
|
+
let e = r.default?.() ?? [], n = i(e), c = n.find((e) => (e?.type?.name || e?.type?.__name) === "ElTable");
|
|
28
|
+
if (!c) return e;
|
|
29
|
+
let l = c.children?.default, { controllable: u, always: d } = a(i(typeof l == "function" ? l() : [])), f = u.map((e) => ({
|
|
30
|
+
prop: e.props.prop,
|
|
31
|
+
label: e.props.label,
|
|
32
|
+
fixed: e.props.fixed === "right" ? "right" : e.props.fixed ? "left" : !1
|
|
33
|
+
}));
|
|
34
|
+
queueMicrotask(() => {
|
|
35
|
+
JSON.stringify(s.columnList.value) !== JSON.stringify(f) && (s.columnList.value = f);
|
|
36
|
+
});
|
|
37
|
+
let p = o(u, s.checkedKeys.value, s.columnOrder.value), m = d.filter((e) => e.props?.type), h = d.filter((e) => !e.props?.type), g = [
|
|
38
|
+
...m,
|
|
39
|
+
...p,
|
|
40
|
+
...h
|
|
41
|
+
], _ = [...s.checkedKeys.value, ...s.columnOrder.value].join(","), v = t(c.type, {
|
|
42
|
+
...c.props,
|
|
43
|
+
key: _
|
|
44
|
+
}, {
|
|
45
|
+
...c.children,
|
|
46
|
+
default: () => g
|
|
47
|
+
});
|
|
48
|
+
return n.map((e) => e === c ? v : e);
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
//#endregion
|
|
53
|
+
export { s as default };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { useLocale as e } from "../../../hooks/use-locale/index.js";
|
|
2
|
+
import "../../../../hooks/index.js";
|
|
3
|
+
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
import n from "./table-wrapper.js";
|
|
5
|
+
import r from "./table-filter.js";
|
|
6
|
+
import './table.vue_vue_type_style_index_0_scoped_a6c85ac1_lang.css';/* empty css */
|
|
7
|
+
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, mergeModels as u, onMounted as d, openBlock as f, provide as p, ref as m, renderSlot as h, toDisplayString as g, unref as _, useModel as v, useSlots as y, useTemplateRef as b, watch as x, withCtx as S } from "vue";
|
|
8
|
+
import { useResizeObserver as C } from "@vueuse/core";
|
|
9
|
+
import { ElPagination as w } from "element-plus";
|
|
10
|
+
//#region packages/components/table/src/table.vue
|
|
11
|
+
var T = { class: "d-table" }, E = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "d-table__toolbar"
|
|
14
|
+
}, D = { class: "d-table__toolbar-left" }, O = { class: "d-table__toolbar-right" }, k = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "d-table__pagination"
|
|
17
|
+
}, A = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "d-table__scroll-tip"
|
|
20
|
+
}, j = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DTable" }, {
|
|
21
|
+
__name: "table",
|
|
22
|
+
props: /* @__PURE__ */ u({
|
|
23
|
+
storageKey: { type: String },
|
|
24
|
+
filterable: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
total: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 0
|
|
31
|
+
},
|
|
32
|
+
pageSizes: {
|
|
33
|
+
type: Array,
|
|
34
|
+
default: () => [
|
|
35
|
+
10,
|
|
36
|
+
20,
|
|
37
|
+
50,
|
|
38
|
+
100
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
pageLayout: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "total, sizes, prev, pager, next"
|
|
44
|
+
},
|
|
45
|
+
showPage: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: !0
|
|
48
|
+
},
|
|
49
|
+
showTip: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !0
|
|
52
|
+
},
|
|
53
|
+
autoHeight: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !1
|
|
56
|
+
},
|
|
57
|
+
availableHeight: {
|
|
58
|
+
type: Number,
|
|
59
|
+
default: 0
|
|
60
|
+
},
|
|
61
|
+
heightContainer: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: ""
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
currentPage: {
|
|
67
|
+
type: Number,
|
|
68
|
+
default: 1
|
|
69
|
+
},
|
|
70
|
+
currentPageModifiers: {},
|
|
71
|
+
pageSize: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 20
|
|
74
|
+
},
|
|
75
|
+
pageSizeModifiers: {}
|
|
76
|
+
}),
|
|
77
|
+
emits: /* @__PURE__ */ u(["page-change"], ["update:currentPage", "update:pageSize"]),
|
|
78
|
+
setup(t, { expose: u, emit: j }) {
|
|
79
|
+
let { t: M } = e(), N = t, P = j, F = v(t, "currentPage"), I = v(t, "pageSize"), L = y(), R = i(() => !!L.toolbar), z = m([]), B = m([]), V = m([]), H = () => `d-table-${N.storageKey}`, U = () => {
|
|
80
|
+
if (N.storageKey) try {
|
|
81
|
+
let e = localStorage.getItem(H());
|
|
82
|
+
if (!e) return;
|
|
83
|
+
let { checkedKeys: t, columnOrder: n } = JSON.parse(e);
|
|
84
|
+
Array.isArray(t) && (B.value = t), Array.isArray(n) && (V.value = n);
|
|
85
|
+
} catch {}
|
|
86
|
+
}, W = () => {
|
|
87
|
+
if (N.storageKey) try {
|
|
88
|
+
localStorage.setItem(H(), JSON.stringify({
|
|
89
|
+
checkedKeys: B.value,
|
|
90
|
+
columnOrder: V.value
|
|
91
|
+
}));
|
|
92
|
+
} catch {}
|
|
93
|
+
};
|
|
94
|
+
U(), x(z, () => {
|
|
95
|
+
let e = z.value.map((e) => e.prop), t = e.filter((e) => !V.value.includes(e));
|
|
96
|
+
t.length && (V.value = [...V.value, ...t], B.value = [...B.value, ...t]), V.value = V.value.filter((t) => e.includes(t)), B.value = B.value.filter((t) => e.includes(t));
|
|
97
|
+
}, { deep: !0 });
|
|
98
|
+
let G = {
|
|
99
|
+
columnList: z,
|
|
100
|
+
checkedKeys: B,
|
|
101
|
+
columnOrder: V,
|
|
102
|
+
saveConfig: W,
|
|
103
|
+
get storageKey() {
|
|
104
|
+
return H();
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
p("dTableContext", G);
|
|
108
|
+
let K = b("tableAreaRef"), q = m(void 0), J = () => {
|
|
109
|
+
if (!N.autoHeight || !N.availableHeight || !K.value) {
|
|
110
|
+
q.value = void 0;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (!N.heightContainer) {
|
|
114
|
+
q.value = void 0;
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
let e = document.querySelector(N.heightContainer);
|
|
118
|
+
if (!e) return;
|
|
119
|
+
let { height: t } = e.getBoundingClientRect(), { height: n } = K.value.getBoundingClientRect(), r = N.availableHeight - (t - n);
|
|
120
|
+
q.value = r > 0 ? r : void 0;
|
|
121
|
+
};
|
|
122
|
+
return d(() => {
|
|
123
|
+
if (!K.value) return;
|
|
124
|
+
let e = K.value.parentElement, t = N.heightContainer ? document.querySelector(N.heightContainer) : null;
|
|
125
|
+
t && C(t, J), e && C(e, J), J();
|
|
126
|
+
}), x(() => [
|
|
127
|
+
N.autoHeight,
|
|
128
|
+
N.availableHeight,
|
|
129
|
+
N.heightContainer
|
|
130
|
+
], J), u({
|
|
131
|
+
tableContext: G,
|
|
132
|
+
saveConfig: W
|
|
133
|
+
}), (e, i) => (f(), s("div", T, [
|
|
134
|
+
R.value || t.filterable ? (f(), s("div", E, [c("div", D, [h(e.$slots, "toolbar", {}, void 0, !0)]), c("div", O, [t.filterable ? (f(), a(r, { key: 0 })) : o("", !0)])])) : o("", !0),
|
|
135
|
+
c("div", {
|
|
136
|
+
ref_key: "tableAreaRef",
|
|
137
|
+
ref: K,
|
|
138
|
+
class: "d-table__body"
|
|
139
|
+
}, [l(n, null, {
|
|
140
|
+
default: S(() => [h(e.$slots, "default", { tableHeight: q.value }, void 0, !0)]),
|
|
141
|
+
_: 3
|
|
142
|
+
})], 512),
|
|
143
|
+
t.showPage ? (f(), s("div", k, [h(e.$slots, "pagination", {}, () => [l(_(w), {
|
|
144
|
+
"current-page": F.value,
|
|
145
|
+
"onUpdate:currentPage": i[0] ||= (e) => F.value = e,
|
|
146
|
+
"page-size": I.value,
|
|
147
|
+
"onUpdate:pageSize": i[1] ||= (e) => I.value = e,
|
|
148
|
+
"page-sizes": t.pageSizes,
|
|
149
|
+
layout: t.pageLayout,
|
|
150
|
+
total: t.total,
|
|
151
|
+
onChange: i[2] ||= (e, t) => P("page-change", {
|
|
152
|
+
currentPage: e,
|
|
153
|
+
pageSize: t
|
|
154
|
+
})
|
|
155
|
+
}, null, 8, [
|
|
156
|
+
"current-page",
|
|
157
|
+
"page-size",
|
|
158
|
+
"page-sizes",
|
|
159
|
+
"layout",
|
|
160
|
+
"total"
|
|
161
|
+
])], !0), t.showTip ? (f(), s("span", A, g(_(M)("d.table.scrollTip")), 1)) : o("", !0)])) : o("", !0)
|
|
162
|
+
]));
|
|
163
|
+
}
|
|
164
|
+
}), [["__scopeId", "data-v-a6c85ac1"]]);
|
|
165
|
+
//#endregion
|
|
166
|
+
export { j as default };
|
package/packages/components/table/src/table.vue_vue_type_style_index_0_scoped_a6c85ac1_lang.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.d-table[data-v-a6c85ac1]{flex-direction:column;gap:12px;display:flex}.d-table__toolbar[data-v-a6c85ac1]{justify-content:space-between;align-items:center;gap:12px;display:flex}.d-table__toolbar-left[data-v-a6c85ac1]{flex:1;align-items:center;gap:12px;display:flex}.d-table__toolbar-left[data-v-a6c85ac1] .el-button{margin:0}.d-table__toolbar-right[data-v-a6c85ac1]{flex-shrink:0;align-items:center;gap:12px;display:flex}.d-table__pagination[data-v-a6c85ac1]{flex-shrink:0;justify-content:space-between;align-items:center;display:flex}.d-table__scroll-tip[data-v-a6c85ac1]{color:var(--el-text-color-secondary);font-size:12px}
|