geekplus-digital-ui 0.1.40 → 0.1.42

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.
@@ -5,3 +5,5 @@ export * from './icon';
5
5
  export * from './icon-tip';
6
6
  export * from './inline-edit';
7
7
  export * from './upload';
8
+ export * from './search-form';
9
+ export * from './search-item';
@@ -6,15 +6,19 @@ import i from "./icon/index.js";
6
6
  import a from "./icon-tip/index.js";
7
7
  import o from "./inline-edit/index.js";
8
8
  import s from "./upload/index.js";
9
+ import c from "./search-form/index.js";
10
+ import l from "./search-item/index.js";
9
11
  //#region packages/components/index.js
10
- var c = /* @__PURE__ */ e({
12
+ var u = /* @__PURE__ */ e({
11
13
  DCopy: () => t,
12
14
  DEditor: () => n,
13
15
  DFoldText: () => r,
14
16
  DIcon: () => i,
15
17
  DIconTip: () => a,
16
18
  DInlineEdit: () => o,
19
+ DSearchForm: () => c,
20
+ DSearchItem: () => l,
17
21
  DUpload: () => s
18
22
  });
19
23
  //#endregion
20
- export { t as DCopy, n as DEditor, r as DFoldText, i as DIcon, a as DIconTip, o as DInlineEdit, s as DUpload, c as components_exports };
24
+ export { t as DCopy, n as DEditor, r as DFoldText, i as DIcon, a as DIconTip, o as DInlineEdit, c as DSearchForm, l as DSearchItem, s as DUpload, u as components_exports };
@@ -0,0 +1,55 @@
1
+ export const DSearchForm: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
3
+ getTrackText: () => string;
4
+ $emit: (event: "reset" | "search", ...args: any[]) => void;
5
+ loading: boolean;
6
+ enterClick: boolean;
7
+ noLabel: boolean;
8
+ $props: {
9
+ readonly loading?: boolean | undefined;
10
+ readonly enterClick?: boolean | undefined;
11
+ readonly noLabel?: boolean | undefined;
12
+ };
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
14
+ rowRef: HTMLDivElement;
15
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
16
+ P: {};
17
+ B: {};
18
+ D: {};
19
+ C: {};
20
+ M: {};
21
+ Defaults: {};
22
+ }, Readonly<{}> & Readonly<{}>, {
23
+ getTrackText: () => string;
24
+ $emit: (event: "reset" | "search", ...args: any[]) => void;
25
+ loading: boolean;
26
+ enterClick: boolean;
27
+ noLabel: boolean;
28
+ $props: {
29
+ readonly loading?: boolean | undefined;
30
+ readonly enterClick?: boolean | undefined;
31
+ readonly noLabel?: boolean | undefined;
32
+ };
33
+ }, {}, {}, {}, {}>;
34
+ __isFragment?: never;
35
+ __isTeleport?: never;
36
+ __isSuspense?: never;
37
+ } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
38
+ getTrackText: () => string;
39
+ $emit: (event: "reset" | "search", ...args: any[]) => void;
40
+ loading: boolean;
41
+ enterClick: boolean;
42
+ noLabel: boolean;
43
+ $props: {
44
+ readonly loading?: boolean | undefined;
45
+ readonly enterClick?: boolean | undefined;
46
+ readonly noLabel?: boolean | undefined;
47
+ };
48
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
49
+ $slots: {
50
+ default?(_: {
51
+ isOpen: boolean;
52
+ }): any;
53
+ };
54
+ });
55
+ export default DSearchForm;
@@ -0,0 +1,5 @@
1
+ import e from "./src/search-form.js";
2
+ //#region packages/components/search-form/index.js
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,111 @@
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 "../../icons/angle-down-light.js";
5
+ import r from "../../icons/angle-up-light.js";
6
+ import i from "../../icon/index.js";
7
+ import './search-form.vue_vue_type_style_index_0_scoped_cea05b8f_lang.css';/* empty css */
8
+ import "../../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, 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
+ import { useResizeObserver as w } from "@vueuse/core";
11
+ import { ElButton as T, ElRow as E } from "element-plus";
12
+ var D = /* @__PURE__ */ t(/* @__PURE__ */ Object.assign({ name: "DSearchForm" }, {
13
+ __name: "search-form",
14
+ props: {
15
+ loading: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ enterClick: {
20
+ type: Boolean,
21
+ default: !0
22
+ },
23
+ noLabel: {
24
+ type: Boolean,
25
+ default: !1
26
+ }
27
+ },
28
+ emits: ["reset", "search"],
29
+ setup(t, { expose: D, emit: O }) {
30
+ let k = t, A = O, j = x("rowRef"), M = _(!1), N = _(0), { t: P } = e();
31
+ g("searchFormNoLabel", o(() => k.noLabel));
32
+ let F = _([]);
33
+ g("registerTrackItem", (e, t) => {
34
+ let n = {
35
+ label: e,
36
+ value: t
37
+ };
38
+ return F.value.push(n), () => {
39
+ let e = F.value.indexOf(n);
40
+ e !== -1 && F.value.splice(e, 1);
41
+ };
42
+ });
43
+ let I = () => F.value.filter((e) => e.label && e.value != null && e.value !== "").map((e) => `${e.label}=${e.value}`).join(","), L = o(() => k.noLabel ? 32 : 64), R = o(() => N.value > L.value + 2), z = o(() => M.value ? {} : { height: `${L.value}px` }), B = o(() => ({ top: `${k.noLabel ? 0 : 32}px` })), V = () => {
44
+ M.value = !M.value;
45
+ }, H = () => {
46
+ k.loading || A("reset");
47
+ }, U = () => {
48
+ k.loading || A("search");
49
+ }, W = () => {
50
+ k.enterClick && U();
51
+ };
52
+ return w(j, (e) => {
53
+ N.value = e[0].contentRect.height;
54
+ }), D({ getTrackText: I }), (e, o) => (h(), l("div", {
55
+ class: p(["d-search-form", { "is-open": M.value }]),
56
+ style: m(z.value),
57
+ onKeyup: C(W, ["enter"])
58
+ }, [u("div", {
59
+ ref_key: "rowRef",
60
+ ref: j,
61
+ class: "search-row"
62
+ }, [f(b(E), { gutter: 12 }, {
63
+ default: S(() => [v(e.$slots, "default", { isOpen: M.value }, void 0, !0)]),
64
+ _: 3
65
+ })], 512), u("div", {
66
+ class: "search-btns",
67
+ style: m(B.value)
68
+ }, [
69
+ f(b(T), {
70
+ loading: t.loading,
71
+ onClick: H
72
+ }, {
73
+ default: S(() => [d(y(b(P)("d.searchForm.reset")), 1)]),
74
+ _: 1
75
+ }, 8, ["loading"]),
76
+ f(b(T), {
77
+ type: "primary",
78
+ loading: t.loading,
79
+ onClick: U
80
+ }, {
81
+ default: S(() => [d(y(b(P)("d.searchForm.search")), 1)]),
82
+ _: 1
83
+ }, 8, ["loading"]),
84
+ R.value ? (h(), l(a, { key: 0 }, [M.value ? (h(), s(b(T), {
85
+ key: 0,
86
+ link: "",
87
+ type: "primary",
88
+ onClick: V
89
+ }, {
90
+ default: S(() => [d(y(b(P)("d.searchForm.collapse")) + " ", 1), f(b(i), null, {
91
+ default: S(() => [f(r)]),
92
+ _: 1
93
+ })]),
94
+ _: 1
95
+ })) : (h(), s(b(T), {
96
+ key: 1,
97
+ link: "",
98
+ type: "primary",
99
+ onClick: V
100
+ }, {
101
+ default: S(() => [d(y(b(P)("d.searchForm.expand")) + " ", 1), f(b(i), null, {
102
+ default: S(() => [f(n)]),
103
+ _: 1
104
+ })]),
105
+ _: 1
106
+ }))], 64)) : c("", !0)
107
+ ], 4)], 38));
108
+ }
109
+ }), [["__scopeId", "data-v-cea05b8f"]]);
110
+ //#endregion
111
+ export { D as default };
@@ -0,0 +1,31 @@
1
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
+ export default _default;
3
+ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import('vue').DefineComponent<{}, {
7
+ getTrackText: () => string;
8
+ $emit: (event: "reset" | "search", ...args: any[]) => void;
9
+ loading: boolean;
10
+ enterClick: boolean;
11
+ noLabel: boolean;
12
+ $props: {
13
+ readonly loading?: boolean | undefined;
14
+ readonly enterClick?: boolean | undefined;
15
+ readonly noLabel?: boolean | undefined;
16
+ };
17
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
18
+ rowRef: HTMLDivElement;
19
+ }, HTMLDivElement>;
20
+ type __VLS_TemplateResult = {
21
+ attrs: Partial<{}>;
22
+ slots: {
23
+ default?(_: {
24
+ isOpen: boolean;
25
+ }): any;
26
+ };
27
+ refs: {
28
+ rowRef: HTMLDivElement;
29
+ };
30
+ rootEl: HTMLDivElement;
31
+ };
@@ -0,0 +1 @@
1
+ .d-search-form[data-v-cea05b8f]{align-items:flex-start;gap:12px;display:flex;overflow:hidden}.d-search-form.is-open[data-v-cea05b8f]{overflow:visible}.d-search-form .search-row[data-v-cea05b8f]{flex:1}.d-search-form .search-row[data-v-cea05b8f] .el-row{flex-wrap:wrap;gap:12px 0}.d-search-form .search-btns[data-v-cea05b8f]{flex-shrink:0;align-items:center;gap:12px;display:flex;position:relative}.d-search-form .search-btns[data-v-cea05b8f] .el-button{margin:0}.d-search-form .search-btns[data-v-cea05b8f] .el-button .d-icon{margin-left:4px}
@@ -0,0 +1,51 @@
1
+ export const DSearchItem: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
3
+ label: string;
4
+ span: number;
5
+ trackLabel: string;
6
+ trackValue: null;
7
+ $props: {
8
+ readonly label?: string | undefined;
9
+ readonly span?: number | undefined;
10
+ readonly trackLabel?: string | undefined;
11
+ readonly trackValue?: null | undefined;
12
+ };
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
14
+ P: {};
15
+ B: {};
16
+ D: {};
17
+ C: {};
18
+ M: {};
19
+ Defaults: {};
20
+ }, Readonly<{}> & Readonly<{}>, {
21
+ label: string;
22
+ span: number;
23
+ trackLabel: string;
24
+ trackValue: null;
25
+ $props: {
26
+ readonly label?: string | undefined;
27
+ readonly span?: number | undefined;
28
+ readonly trackLabel?: string | undefined;
29
+ readonly trackValue?: null | undefined;
30
+ };
31
+ }, {}, {}, {}, {}>;
32
+ __isFragment?: never;
33
+ __isTeleport?: never;
34
+ __isSuspense?: never;
35
+ } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
36
+ label: string;
37
+ span: number;
38
+ trackLabel: string;
39
+ trackValue: null;
40
+ $props: {
41
+ readonly label?: string | undefined;
42
+ readonly span?: number | undefined;
43
+ readonly trackLabel?: string | undefined;
44
+ readonly trackValue?: null | undefined;
45
+ };
46
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
47
+ $slots: {
48
+ default?(_: {}): any;
49
+ };
50
+ });
51
+ export default DSearchItem;
@@ -0,0 +1,5 @@
1
+ import e from "./src/search-item.js";
2
+ //#region packages/components/search-item/index.js
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,45 @@
1
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
2
+ import './search-item.vue_vue_type_style_index_0_scoped_27c41622_lang.css';/* empty css */
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
+ import { ElCol as h } from "element-plus";
5
+ //#region packages/components/search-item/src/search-item.vue
6
+ var g = {
7
+ key: 0,
8
+ class: "item-label"
9
+ }, _ = { class: "item-content" }, v = /* @__PURE__ */ e(/* @__PURE__ */ Object.assign({ name: "DSearchItem" }, {
10
+ __name: "search-item",
11
+ props: {
12
+ label: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ span: {
17
+ type: Number,
18
+ default: 6
19
+ },
20
+ trackLabel: {
21
+ type: String,
22
+ default: ""
23
+ },
24
+ trackValue: { default: null }
25
+ },
26
+ setup(e) {
27
+ let v = e, y = t(() => {
28
+ let e = Math.trunc(v.span);
29
+ return Math.min(24, Math.max(1, Number.isNaN(e) ? 6 : e));
30
+ }), b = o("searchFormNoLabel", t(() => !1)), x = o("registerTrackItem", null), S = null;
31
+ return s(() => {
32
+ x && (S = x(f(v, "trackLabel"), f(v, "trackValue")));
33
+ }), c(() => {
34
+ S?.();
35
+ }), (t, o) => (l(), n(p(h), {
36
+ span: y.value,
37
+ class: "d-search-item"
38
+ }, {
39
+ default: m(() => [e.label && !p(b) ? (l(), i("div", g, d(e.label), 1)) : r("", !0), a("div", _, [u(t.$slots, "default", {}, void 0, !0)])]),
40
+ _: 3
41
+ }, 8, ["span"]));
42
+ }
43
+ }), [["__scopeId", "data-v-27c41622"]]);
44
+ //#endregion
45
+ export { v as default };
@@ -0,0 +1,25 @@
1
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
+ export default _default;
3
+ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import('vue').DefineComponent<{}, {
7
+ label: string;
8
+ span: number;
9
+ trackLabel: string;
10
+ trackValue: null;
11
+ $props: {
12
+ readonly label?: string | undefined;
13
+ readonly span?: number | undefined;
14
+ readonly trackLabel?: string | undefined;
15
+ readonly trackValue?: null | undefined;
16
+ };
17
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
18
+ type __VLS_TemplateResult = {
19
+ attrs: Partial<{}>;
20
+ slots: {
21
+ default?(_: {}): any;
22
+ };
23
+ refs: {};
24
+ rootEl: any;
25
+ };
@@ -0,0 +1 @@
1
+ .d-search-item .item-label[data-v-27c41622]{text-overflow:ellipsis;white-space:nowrap;height:32px;line-height:32px;overflow:hidden}.d-search-item .item-content[data-v-27c41622] .el-select,.d-search-item .item-content[data-v-27c41622] .el-input,.d-search-item .item-content[data-v-27c41622] .el-date-editor{width:100%}
package/index.js CHANGED
@@ -8,10 +8,12 @@ import a from "./components/icon/index.js";
8
8
  import o from "./components/icon-tip/index.js";
9
9
  import s from "./components/inline-edit/index.js";
10
10
  import c from "./components/upload/index.js";
11
+ import l from "./components/search-form/index.js";
12
+ import u from "./components/search-item/index.js";
11
13
  import "./components/index.js";
12
- import { setComponentRegistry as l, setGlobalConfig as u } from "./config/index.js";
13
- import { install as d } from "./install.js";
14
+ import { setComponentRegistry as d, setGlobalConfig as f } from "./config/index.js";
15
+ import { install as p } from "./install.js";
14
16
  //#region packages/index.js
15
- var f = { install: d };
17
+ var m = { install: p };
16
18
  //#endregion
17
- export { n as DCopy, r as DEditor, i as DFoldText, a as DIcon, o as DIconTip, s as DInlineEdit, c as DUpload, f as default, d as install, l as setComponentRegistry, u as setGlobalConfig, t as useActivated, e as useLocale };
19
+ export { n as DCopy, r as DEditor, i as DFoldText, a as DIcon, o as DIconTip, s as DInlineEdit, l as DSearchForm, u as DSearchItem, c as DUpload, m as default, p as install, d as setComponentRegistry, f as setGlobalConfig, t as useActivated, e as useLocale };
@@ -15,6 +15,14 @@ declare namespace _default {
15
15
  let collapse_1: string;
16
16
  export { collapse_1 as collapse };
17
17
  }
18
+ namespace searchForm {
19
+ export let search: string;
20
+ export let reset: string;
21
+ let expand_2: string;
22
+ export { expand_2 as expand };
23
+ let collapse_2: string;
24
+ export { collapse_2 as collapse };
25
+ }
18
26
  namespace upload {
19
27
  export let lessThan: string;
20
28
  export let format: string;
@@ -27,10 +35,10 @@ declare namespace _default {
27
35
  export let comma: string;
28
36
  export let preview: string;
29
37
  export let close: string;
30
- let expand_2: string;
31
- export { expand_2 as expand };
32
- let collapse_2: string;
33
- export { collapse_2 as collapse };
38
+ let expand_3: string;
39
+ export { expand_3 as expand };
40
+ let collapse_3: string;
41
+ export { collapse_3 as collapse };
34
42
  let upload_1: string;
35
43
  export { upload_1 as upload };
36
44
  export let downloadAll: string;
package/locale/lang/en.js CHANGED
@@ -12,6 +12,12 @@ var e = {
12
12
  expand: "Expand",
13
13
  collapse: "Collapse"
14
14
  },
15
+ searchForm: {
16
+ search: "Search",
17
+ reset: "Reset",
18
+ expand: "Expand",
19
+ collapse: "Collapse"
20
+ },
15
21
  upload: {
16
22
  lessThan: "Less than {size}MB",
17
23
  format: "Format {format}",
@@ -15,6 +15,14 @@ declare namespace _default {
15
15
  let collapse_1: string;
16
16
  export { collapse_1 as collapse };
17
17
  }
18
+ namespace searchForm {
19
+ export let search: string;
20
+ export let reset: string;
21
+ let expand_2: string;
22
+ export { expand_2 as expand };
23
+ let collapse_2: string;
24
+ export { collapse_2 as collapse };
25
+ }
18
26
  namespace upload {
19
27
  export let lessThan: string;
20
28
  export let format: string;
@@ -27,10 +35,10 @@ declare namespace _default {
27
35
  export let comma: string;
28
36
  export let preview: string;
29
37
  export let close: string;
30
- let expand_2: string;
31
- export { expand_2 as expand };
32
- let collapse_2: string;
33
- export { collapse_2 as collapse };
38
+ let expand_3: string;
39
+ export { expand_3 as expand };
40
+ let collapse_3: string;
41
+ export { collapse_3 as collapse };
34
42
  let upload_1: string;
35
43
  export { upload_1 as upload };
36
44
  export let downloadAll: string;
package/locale/lang/ja.js CHANGED
@@ -12,6 +12,12 @@ var e = {
12
12
  expand: "展開",
13
13
  collapse: "折りたたむ"
14
14
  },
15
+ searchForm: {
16
+ search: "検索",
17
+ reset: "リセット",
18
+ expand: "展開",
19
+ collapse: "折りたたむ"
20
+ },
15
21
  upload: {
16
22
  lessThan: "{size}MB 未満",
17
23
  format: "形式 {format}",
@@ -15,6 +15,14 @@ declare namespace _default {
15
15
  let collapse_1: string;
16
16
  export { collapse_1 as collapse };
17
17
  }
18
+ namespace searchForm {
19
+ export let search: string;
20
+ export let reset: string;
21
+ let expand_2: string;
22
+ export { expand_2 as expand };
23
+ let collapse_2: string;
24
+ export { collapse_2 as collapse };
25
+ }
18
26
  namespace upload {
19
27
  export let lessThan: string;
20
28
  export let format: string;
@@ -27,10 +35,10 @@ declare namespace _default {
27
35
  export let comma: string;
28
36
  export let preview: string;
29
37
  export let close: string;
30
- let expand_2: string;
31
- export { expand_2 as expand };
32
- let collapse_2: string;
33
- export { collapse_2 as collapse };
38
+ let expand_3: string;
39
+ export { expand_3 as expand };
40
+ let collapse_3: string;
41
+ export { collapse_3 as collapse };
34
42
  let upload_1: string;
35
43
  export { upload_1 as upload };
36
44
  export let downloadAll: string;
package/locale/lang/ko.js CHANGED
@@ -12,6 +12,12 @@ var e = {
12
12
  expand: "펼치기",
13
13
  collapse: "접기"
14
14
  },
15
+ searchForm: {
16
+ search: "조회",
17
+ reset: "초기화",
18
+ expand: "펼치기",
19
+ collapse: "접기"
20
+ },
15
21
  upload: {
16
22
  lessThan: "{size}MB 이하",
17
23
  format: "형식 {format}",
@@ -15,6 +15,14 @@ declare namespace _default {
15
15
  let collapse_1: string;
16
16
  export { collapse_1 as collapse };
17
17
  }
18
+ namespace searchForm {
19
+ export let search: string;
20
+ export let reset: string;
21
+ let expand_2: string;
22
+ export { expand_2 as expand };
23
+ let collapse_2: string;
24
+ export { collapse_2 as collapse };
25
+ }
18
26
  namespace upload {
19
27
  export let lessThan: string;
20
28
  export let format: string;
@@ -27,10 +35,10 @@ declare namespace _default {
27
35
  export let comma: string;
28
36
  export let preview: string;
29
37
  export let close: string;
30
- let expand_2: string;
31
- export { expand_2 as expand };
32
- let collapse_2: string;
33
- export { collapse_2 as collapse };
38
+ let expand_3: string;
39
+ export { expand_3 as expand };
40
+ let collapse_3: string;
41
+ export { collapse_3 as collapse };
34
42
  let upload_1: string;
35
43
  export { upload_1 as upload };
36
44
  export let downloadAll: string;
@@ -12,6 +12,12 @@ var e = {
12
12
  expand: "展开",
13
13
  collapse: "收起"
14
14
  },
15
+ searchForm: {
16
+ search: "查询",
17
+ reset: "重置",
18
+ expand: "展开",
19
+ collapse: "收起"
20
+ },
15
21
  upload: {
16
22
  lessThan: "小于 {size}MB",
17
23
  format: "格式 {format}",
@@ -15,6 +15,14 @@ declare namespace _default {
15
15
  let collapse_1: string;
16
16
  export { collapse_1 as collapse };
17
17
  }
18
+ namespace searchForm {
19
+ export let search: string;
20
+ export let reset: string;
21
+ let expand_2: string;
22
+ export { expand_2 as expand };
23
+ let collapse_2: string;
24
+ export { collapse_2 as collapse };
25
+ }
18
26
  namespace upload {
19
27
  export let lessThan: string;
20
28
  export let format: string;
@@ -27,10 +35,10 @@ declare namespace _default {
27
35
  export let comma: string;
28
36
  export let preview: string;
29
37
  export let close: string;
30
- let expand_2: string;
31
- export { expand_2 as expand };
32
- let collapse_2: string;
33
- export { collapse_2 as collapse };
38
+ let expand_3: string;
39
+ export { expand_3 as expand };
40
+ let collapse_3: string;
41
+ export { collapse_3 as collapse };
34
42
  let upload_1: string;
35
43
  export { upload_1 as upload };
36
44
  export let downloadAll: string;
@@ -12,6 +12,12 @@ var e = {
12
12
  expand: "展開",
13
13
  collapse: "收起"
14
14
  },
15
+ searchForm: {
16
+ search: "查詢",
17
+ reset: "重置",
18
+ expand: "展開",
19
+ collapse: "收起"
20
+ },
15
21
  upload: {
16
22
  lessThan: "小於 {size}MB",
17
23
  format: "格式 {format}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geekplus-digital-ui",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "homepage": "https://ui.geekplus.cc/static/ui/",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: use-geekplus-digital-ui
3
- description: Use when developing Vue 3 features involving clipboard copy, file upload/preview/download, rich text editor, text collapse/expand, icon with tooltip, or inline editing. Triggers on keywords like 复制、上传、富文本、折叠文本、行内编辑、图标提示、copy, upload, editor, fold text, inline edit, icon tip.
3
+ description: Use when developing Vue 3 features involving clipboard copy, file upload/preview/download, rich text editor, text collapse/expand, icon with tooltip, inline editing, or search form filters. Triggers on keywords like 复制、上传、富文本、折叠文本、行内编辑、图标提示、搜索表单、搜索筛选、copy, upload, editor, fold text, inline edit, icon tip, search form.
4
4
  ---
5
5
 
6
6
  # Geekplus Digital UI 组件库
@@ -44,6 +44,8 @@ Peer dependencies: `vue@^3.5.0`、`element-plus@^2.13.0`
44
44
  | **FoldText** | `<d-fold-text>` | 多行文本折叠/展开 |
45
45
  | **IconTip** | `<d-icon-tip>` | 图标 + 悬浮提示 |
46
46
  | **InlineEdit** | `<d-inline-edit>` | 展示态/编辑态切换 |
47
+ | **SearchForm** | `<d-search-form>` | 可折叠搜索筛选区域 |
48
+ | **SearchItem** | `<d-search-item>` | 搜索表单的单个搜索项,配合 SearchForm 使用 |
47
49
 
48
50
  详细 Props/Events/Slots API 请查阅文档:https://ui.geekplus.cc/static/ui/
49
51
 
@@ -56,6 +58,7 @@ Peer dependencies: `vue@^3.5.0`、`element-plus@^2.13.0`
56
58
  - 长文本折叠展开 → `<d-fold-text>`
57
59
  - 图标悬浮提示 → `<d-icon-tip>`
58
60
  - 行内编辑切换 → `<d-inline-edit>`
61
+ - 搜索筛选表单 → `<d-search-form>` + `<d-search-item>`
59
62
 
60
63
  2. **全局配置优先**:通用参数(如 Upload 的 `domain`、`axios`、`url`)应通过全局配置注入,业务页面只关注数据绑定和交互逻辑:
61
64
 
@@ -83,6 +86,28 @@ app.use(GeekplusDigitalUI, {
83
86
  | 长文本展开收起 | 自己写 CSS line-clamp + 按钮 | `<d-fold-text :line-clamp="3">{{ text }}</d-fold-text>` |
84
87
  | 字段旁加说明图标 | 自己写 el-tooltip + icon | `<d-icon-tip content="说明文字" />` |
85
88
  | 单元格就地编辑 | 自己写 v-if 切换显示/输入 | `<d-inline-edit>展示内容<template #editor>编辑内容</template></d-inline-edit>` |
89
+ | 列表页搜索筛选区 | 自己用 el-form + el-row/col 手写 | `<d-search-form>` + `<d-search-item>` 组合 |
90
+
91
+ ## SearchForm 用法
92
+
93
+ ```vue
94
+ <template>
95
+ <d-search-form :loading="loading" @search="handleSearch" @reset="handleReset">
96
+ <d-search-item label="关键词" :span="6" track-label="keyword" :track-value="form.keyword">
97
+ <el-input v-model="form.keyword" clearable />
98
+ </d-search-item>
99
+ <d-search-item label="状态" :span="6">
100
+ <el-select v-model="form.status" clearable>
101
+ <el-option label="启用" value="1" />
102
+ </el-select>
103
+ </d-search-item>
104
+ </d-search-form>
105
+ </template>
106
+ ```
107
+
108
+ - 超过单行时自动出现展开/收起按钮
109
+ - `track-label` + `track-value` 启用埋点,通过 `formRef.getTrackText()` 获取 `keyword=hello,status=1` 格式字符串(空值自动过滤)
110
+ - `no-label` 无标签紧凑模式;`enter-click` 回车触发查询
86
111
 
87
112
  ## Hooks
88
113