geekplus-digital-ui 0.1.39 → 0.1.41
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/README.md +10 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +6 -2
- package/components/search-form/index.d.ts +55 -0
- package/components/search-form/index.js +5 -0
- package/components/search-form/src/search-form.js +111 -0
- package/components/search-form/src/search-form.vue.d.ts +31 -0
- package/components/search-form/src/search-form.vue_vue_type_style_index_0_scoped_cea05b8f_lang.css +1 -0
- package/components/search-item/index.d.ts +51 -0
- package/components/search-item/index.js +5 -0
- package/components/search-item/src/search-item.js +45 -0
- package/components/search-item/src/search-item.vue.d.ts +25 -0
- package/components/search-item/src/search-item.vue_vue_type_style_index_0_scoped_27c41622_lang.css +1 -0
- package/index.js +6 -4
- package/locale/lang/en.d.ts +12 -4
- package/locale/lang/en.js +6 -0
- package/locale/lang/ja.d.ts +12 -4
- package/locale/lang/ja.js +6 -0
- package/locale/lang/ko.d.ts +12 -4
- package/locale/lang/ko.js +6 -0
- package/locale/lang/zh-cn.d.ts +12 -4
- package/locale/lang/zh-cn.js +6 -0
- package/locale/lang/zh-tw.d.ts +12 -4
- package/locale/lang/zh-tw.js +6 -0
- package/package.json +2 -2
- package/skills/use-geekplus-digital-ui/SKILL.md +104 -0
package/README.md
CHANGED
|
@@ -3,3 +3,13 @@
|
|
|
3
3
|
极智嘉数字化组件库,仅供内部使用。
|
|
4
4
|
|
|
5
5
|
文档地址:https://ui.geekplus.cc/static/ui/
|
|
6
|
+
|
|
7
|
+
## Claude Code 集成
|
|
8
|
+
|
|
9
|
+
组件库内置了 Claude Code Skill,可以在开发时自动提醒你使用已有组件,避免重复造轮子。
|
|
10
|
+
|
|
11
|
+
在你的项目根目录 `CLAUDE.md` 中添加以下内容即可启用:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
@node_modules/geekplus-digital-ui/skills/use-geekplus-digital-ui/SKILL.md
|
|
15
|
+
```
|
package/components/index.d.ts
CHANGED
package/components/index.js
CHANGED
|
@@ -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
|
|
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,
|
|
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,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
|
+
};
|
package/components/search-form/src/search-form.vue_vue_type_style_index_0_scoped_cea05b8f_lang.css
ADDED
|
@@ -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,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
|
+
};
|
package/components/search-item/src/search-item.vue_vue_type_style_index_0_scoped_27c41622_lang.css
ADDED
|
@@ -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
|
|
13
|
-
import { install as
|
|
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
|
|
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,
|
|
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 };
|
package/locale/lang/en.d.ts
CHANGED
|
@@ -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
|
|
31
|
-
export {
|
|
32
|
-
let
|
|
33
|
-
export {
|
|
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
package/locale/lang/ja.d.ts
CHANGED
|
@@ -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
|
|
31
|
-
export {
|
|
32
|
-
let
|
|
33
|
-
export {
|
|
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
package/locale/lang/ko.d.ts
CHANGED
|
@@ -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
|
|
31
|
-
export {
|
|
32
|
-
let
|
|
33
|
-
export {
|
|
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
package/locale/lang/zh-cn.d.ts
CHANGED
|
@@ -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
|
|
31
|
-
export {
|
|
32
|
-
let
|
|
33
|
-
export {
|
|
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/zh-cn.js
CHANGED
package/locale/lang/zh-tw.d.ts
CHANGED
|
@@ -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
|
|
31
|
-
export {
|
|
32
|
-
let
|
|
33
|
-
export {
|
|
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/zh-tw.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geekplus-digital-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"homepage": "https://ui.geekplus.cc/static/ui/",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@vueuse/core": "^14.2.1",
|
|
24
|
-
"@wangeditor-next/editor": "^5.6.
|
|
24
|
+
"@wangeditor-next/editor": "^5.6.55",
|
|
25
25
|
"@wangeditor-next/editor-for-vue": "^5.1.14",
|
|
26
26
|
"file-saver": "^2.0.5",
|
|
27
27
|
"lodash-es": "^4.17.23",
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Geekplus Digital UI 组件库
|
|
7
|
+
|
|
8
|
+
**核心原则:不要重复造轮子。** 当功能已被 `geekplus-digital-ui` 覆盖时,必须使用现有组件,而非自行实现。
|
|
9
|
+
|
|
10
|
+
文档站点:https://ui.geekplus.cc/static/ui/
|
|
11
|
+
|
|
12
|
+
## 安装与引入
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install geekplus-digital-ui
|
|
16
|
+
# 或
|
|
17
|
+
pnpm add geekplus-digital-ui
|
|
18
|
+
# 或
|
|
19
|
+
yarn add geekplus-digital-ui
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
import { createApp } from 'vue';
|
|
24
|
+
import ElementPlus from 'element-plus';
|
|
25
|
+
import GeekplusDigitalUI from 'geekplus-digital-ui';
|
|
26
|
+
import 'element-plus/dist/index.css';
|
|
27
|
+
import 'element-plus/theme-chalk/dark/css-vars.css';
|
|
28
|
+
|
|
29
|
+
const app = createApp(App);
|
|
30
|
+
app.use(ElementPlus);
|
|
31
|
+
app.use(GeekplusDigitalUI);
|
|
32
|
+
app.mount('#app');
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Peer dependencies: `vue@^3.5.0`、`element-plus@^2.13.0`
|
|
36
|
+
|
|
37
|
+
## 组件速查表
|
|
38
|
+
|
|
39
|
+
| 组件 | 标签 | 用途 |
|
|
40
|
+
|------|------|------|
|
|
41
|
+
| **Copy** | `<d-copy>` | 一键复制文本到剪贴板 |
|
|
42
|
+
| **Upload** | `<d-upload>` | 文件上传/预览/下载,支持卡片和列表模式 |
|
|
43
|
+
| **Editor** | `<d-editor>` | 富文本编辑器(基于 wangEditor-next) |
|
|
44
|
+
| **FoldText** | `<d-fold-text>` | 多行文本折叠/展开 |
|
|
45
|
+
| **IconTip** | `<d-icon-tip>` | 图标 + 悬浮提示 |
|
|
46
|
+
| **InlineEdit** | `<d-inline-edit>` | 展示态/编辑态切换 |
|
|
47
|
+
|
|
48
|
+
详细 Props/Events/Slots API 请查阅文档:https://ui.geekplus.cc/static/ui/
|
|
49
|
+
|
|
50
|
+
## 使用规则
|
|
51
|
+
|
|
52
|
+
1. **禁止自行实现以下功能**,必须使用对应组件:
|
|
53
|
+
- 复制到剪贴板 → `<d-copy>`
|
|
54
|
+
- 文件上传/预览/下载 → `<d-upload>`
|
|
55
|
+
- 富文本编辑 → `<d-editor>`
|
|
56
|
+
- 长文本折叠展开 → `<d-fold-text>`
|
|
57
|
+
- 图标悬浮提示 → `<d-icon-tip>`
|
|
58
|
+
- 行内编辑切换 → `<d-inline-edit>`
|
|
59
|
+
|
|
60
|
+
2. **全局配置优先**:通用参数(如 Upload 的 `domain`、`axios`、`url`)应通过全局配置注入,业务页面只关注数据绑定和交互逻辑:
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
app.use(GeekplusDigitalUI, {
|
|
64
|
+
config: {
|
|
65
|
+
components: {
|
|
66
|
+
upload: { domain: 'https://example.com', axios, url: '/upload' },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
3. **国际化**:组件库内置 5 种语言(zh-cn / zh-tw / en / ja / ko),通过 `locale` 选项配置,不要在业务代码中硬编码组件内部文案。
|
|
73
|
+
|
|
74
|
+
4. **样式一致性**:组件基于 Element Plus 构建,不要覆盖组件内部样式。如需定制,使用组件暴露的 Props 和 Slots。
|
|
75
|
+
|
|
76
|
+
## 常见场景映射
|
|
77
|
+
|
|
78
|
+
| 你想做的事 | 不要这样做 | 应该这样做 |
|
|
79
|
+
|-----------|-----------|-----------|
|
|
80
|
+
| 复制文本到剪贴板 | 自己写 `navigator.clipboard` 逻辑 | `<d-copy :text="content" />` |
|
|
81
|
+
| 上传并预览文件 | 自己封装 el-upload | `<d-upload v-model="files" />` |
|
|
82
|
+
| 富文本编辑器 | 自己集成 wangEditor/Quill/TinyMCE | `<d-editor v-model="html" border />` |
|
|
83
|
+
| 长文本展开收起 | 自己写 CSS line-clamp + 按钮 | `<d-fold-text :line-clamp="3">{{ text }}</d-fold-text>` |
|
|
84
|
+
| 字段旁加说明图标 | 自己写 el-tooltip + icon | `<d-icon-tip content="说明文字" />` |
|
|
85
|
+
| 单元格就地编辑 | 自己写 v-if 切换显示/输入 | `<d-inline-edit>展示内容<template #editor>编辑内容</template></d-inline-edit>` |
|
|
86
|
+
|
|
87
|
+
## Hooks
|
|
88
|
+
|
|
89
|
+
```js
|
|
90
|
+
import { useLocale, useActivated } from 'geekplus-digital-ui';
|
|
91
|
+
|
|
92
|
+
const { t, getLocale, setLocale } = useLocale(); // 国际化
|
|
93
|
+
const { activated } = useActivated(); // 组件激活状态检测
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## 在其他项目中启用此 Skill
|
|
97
|
+
|
|
98
|
+
在目标项目的 `CLAUDE.md` 中添加:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
@node_modules/geekplus-digital-ui/skills/use-geekplus-digital-ui/SKILL.md
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
或将此文件复制到目标项目的 `.claude/skills/` 目录中。
|