geekin-devtoys 0.3.1 → 0.3.2
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/lib/GCard/index.js +1 -0
- package/lib/GCard/index.mjs +227 -0
- package/lib/GCard/style.css +1 -0
- package/lib/GCard.d.ts +1 -0
- package/lib/GFuzzyText/index.js +1 -0
- package/lib/GFuzzyText/index.mjs +171 -0
- package/lib/GFuzzyText.d.ts +1 -0
- package/lib/GInputTreeTag/index.js +1 -1
- package/lib/GInputTreeTag/index.mjs +129 -116
- package/lib/GInputTreeTag/style.css +1 -1
- package/lib/components/GCard/index.d.ts +46 -0
- package/lib/components/GFuzzyText/index.d.ts +61 -0
- package/lib/components/GInputTreeTag/index.d.ts +16 -4
- package/lib/components/GTable/index.d.ts +3 -126
- package/lib/index/index.js +1 -1
- package/lib/index/index.mjs +20 -14
- package/lib/index.d.ts +3 -1
- package/package.json +17 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElInput as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as he, computed as d, ref as i, watch as we, nextTick as D, onMounted as ye, onBeforeUnmount as ke, createElementBlock as F, openBlock as v, normalizeClass as C, createElementVNode as B, createBlock as Z, createCommentVNode as G, normalizeStyle as T, createVNode as W, unref as R, withKeys as Ee, Teleport as Ve, withDirectives as Fe, withModifiers as Be, withCtx as J, renderSlot as x, createTextVNode as P, toDisplayString as Q, vShow as xe, Fragment as Ie, renderList as Me } from "vue";
|
|
2
|
+
import { ElInput as Se, ElTree as _e, ElTag as Le, ElMessage as X } from "element-plus";
|
|
3
|
+
import { _ as Ce } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const Te = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "g-input-tree-tag__tags"
|
|
7
|
-
},
|
|
7
|
+
}, Re = /* @__PURE__ */ he({
|
|
8
8
|
__name: "index",
|
|
9
9
|
props: {
|
|
10
10
|
modelValue: { default: () => [] },
|
|
11
11
|
data: { default: () => [] },
|
|
12
12
|
props: { default: () => ({}) },
|
|
13
|
+
echoProps: {},
|
|
13
14
|
nodeKey: { default: "id" },
|
|
14
15
|
placeholder: { default: "请输入关键字搜索" },
|
|
15
16
|
width: { default: 320 },
|
|
@@ -31,47 +32,47 @@ const Se = {
|
|
|
31
32
|
notFoundMessage: { default: "未找到匹配项" }
|
|
32
33
|
},
|
|
33
34
|
emits: ["update:modelValue", "change", "add", "remove", "node-click", "duplicate", "not-found"],
|
|
34
|
-
setup(
|
|
35
|
-
const l =
|
|
35
|
+
setup(I, { expose: Y, emit: ee }) {
|
|
36
|
+
const l = I, n = ee, te = d(() => ({
|
|
36
37
|
label: l.props.label || "label",
|
|
37
38
|
children: l.props.children || "children",
|
|
38
39
|
disabled: l.props.disabled
|
|
39
|
-
})), ae =
|
|
40
|
+
})), ae = d(() => l.props.value || l.nodeKey || "id"), le = d(() => l.props.label || "label"), oe = d(() => l.props.children || "children"), M = d(() => l.props.isLeaf), ne = d(() => l.echoProps?.value || "value"), re = d(() => l.echoProps?.label || "label"), m = (e) => e ? e[ae.value] : void 0, c = (e) => e ? e[le.value] : "", z = (e) => e ? e[oe.value] : void 0, ue = (e) => e?.[ne.value] ?? e?.value, de = (e) => e?.[re.value] ?? e?.label, p = (e) => {
|
|
40
41
|
if (!e) return !1;
|
|
41
42
|
if (typeof l.selectable == "function") return l.selectable(e);
|
|
42
|
-
if (
|
|
43
|
-
const t =
|
|
43
|
+
if (M.value && e[M.value] !== void 0) return !!e[M.value];
|
|
44
|
+
const t = z(e);
|
|
44
45
|
return !t || !t.length;
|
|
45
|
-
},
|
|
46
|
+
}, S = d(() => {
|
|
46
47
|
const e = /* @__PURE__ */ new Map(), t = (a = []) => {
|
|
47
|
-
a.forEach((
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
48
|
+
a.forEach((o) => {
|
|
49
|
+
p(o) && e.set(m(o), o);
|
|
50
|
+
const s = z(o);
|
|
51
|
+
s?.length && t(s);
|
|
51
52
|
});
|
|
52
53
|
};
|
|
53
54
|
return t(l.data || []), e;
|
|
54
|
-
}),
|
|
55
|
-
const a = l.valueFormat === "object" ? t
|
|
55
|
+
}), r = d(() => (l.modelValue || []).map((t) => {
|
|
56
|
+
const a = l.valueFormat === "object" ? ue(t) : t, o = S.value.get(a), s = l.valueFormat === "object" ? de(t) : void 0;
|
|
56
57
|
return {
|
|
57
58
|
value: a,
|
|
58
|
-
label:
|
|
59
|
-
raw:
|
|
59
|
+
label: o ? c(o) : s ?? String(a ?? ""),
|
|
60
|
+
raw: o ?? (l.valueFormat === "object" ? t : void 0)
|
|
60
61
|
};
|
|
61
|
-
})), w = (e) =>
|
|
62
|
+
})), w = (e) => r.value.some((t) => t.value === e), y = i(""), u = i(!1), $ = i(null), H = i(null), N = i(null), g = i(null), O = i({}), K = i("bottom"), se = d(
|
|
62
63
|
() => typeof l.width == "number" ? `${l.width}px` : l.width
|
|
63
|
-
),
|
|
64
|
-
l.disabled || (
|
|
64
|
+
), _ = () => {
|
|
65
|
+
l.disabled || (u.value = !0);
|
|
65
66
|
}, k = () => {
|
|
66
|
-
if (!
|
|
67
|
-
const e =
|
|
67
|
+
if (!u.value) return;
|
|
68
|
+
const e = N.value, t = g.value;
|
|
68
69
|
if (!e || !t) return;
|
|
69
|
-
const a = e.getBoundingClientRect(),
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
70
|
+
const a = e.getBoundingClientRect(), o = t.offsetHeight || l.popperMaxHeight, V = window.innerHeight - a.bottom - l.popperOffset, ge = a.top, q = V >= o || V >= ge ? "bottom" : "top";
|
|
71
|
+
K.value = q;
|
|
72
|
+
const be = q === "bottom" ? a.bottom + l.popperOffset : a.top - o;
|
|
73
|
+
O.value = {
|
|
73
74
|
position: "fixed",
|
|
74
|
-
top: `${
|
|
75
|
+
top: `${be}px`,
|
|
75
76
|
left: `${a.left}px`,
|
|
76
77
|
width: `${a.width}px`,
|
|
77
78
|
zIndex: String(l.popperZIndex)
|
|
@@ -79,160 +80,172 @@ const Se = {
|
|
|
79
80
|
};
|
|
80
81
|
let f = null;
|
|
81
82
|
const b = () => {
|
|
82
|
-
|
|
83
|
+
u.value && (f && cancelAnimationFrame(f), f = requestAnimationFrame(() => {
|
|
83
84
|
f = null, k();
|
|
84
85
|
}));
|
|
85
86
|
};
|
|
86
87
|
let h = null;
|
|
87
|
-
const
|
|
88
|
+
const ie = () => {
|
|
88
89
|
typeof ResizeObserver > "u" || !g.value || (h?.disconnect(), h = new ResizeObserver(() => b()), h.observe(g.value));
|
|
89
|
-
},
|
|
90
|
+
}, j = () => {
|
|
90
91
|
h?.disconnect(), h = null;
|
|
91
92
|
};
|
|
92
|
-
|
|
93
|
+
we(u, async (e) => {
|
|
93
94
|
if (!e) {
|
|
94
|
-
|
|
95
|
+
j();
|
|
95
96
|
return;
|
|
96
97
|
}
|
|
97
|
-
await D(), k(), requestAnimationFrame(k),
|
|
98
|
+
await D(), k(), requestAnimationFrame(k), ie();
|
|
98
99
|
});
|
|
99
|
-
const
|
|
100
|
-
if (!
|
|
100
|
+
const U = (e) => {
|
|
101
|
+
if (!u.value) return;
|
|
101
102
|
const t = e.target;
|
|
102
|
-
|
|
103
|
+
H.value?.contains(t) || g.value?.contains(t) || (u.value = !1);
|
|
103
104
|
};
|
|
104
|
-
|
|
105
|
-
document.addEventListener("mousedown",
|
|
106
|
-
}),
|
|
107
|
-
document.removeEventListener("mousedown",
|
|
105
|
+
ye(() => {
|
|
106
|
+
document.addEventListener("mousedown", U, !0), window.addEventListener("scroll", b, !0), window.addEventListener("resize", b);
|
|
107
|
+
}), ke(() => {
|
|
108
|
+
document.removeEventListener("mousedown", U, !0), window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b), f && cancelAnimationFrame(f), j();
|
|
108
109
|
});
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
if (
|
|
110
|
+
const ce = (e) => {
|
|
111
|
+
u.value = !0, $.value?.filter(e), D(k);
|
|
112
|
+
}, pe = (e, t) => e ? typeof l.filterMethod == "function" ? l.filterMethod(e, t) : String(c(t) ?? "").toLowerCase().includes(String(e).toLowerCase()) : !0, fe = (e, t) => {
|
|
113
|
+
if (n("node-click", e), !p(e)) {
|
|
113
114
|
t && (t.expanded = !t.expanded);
|
|
114
115
|
return;
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
-
},
|
|
117
|
+
L(e), u.value = !1;
|
|
118
|
+
}, ve = (e) => l.valueFormat === "object" ? { value: e.value, label: e.label, raw: e.raw } : e.value, L = (e) => {
|
|
118
119
|
const t = m(e);
|
|
119
120
|
if (t == null || t === "") return;
|
|
120
121
|
if (w(t)) {
|
|
121
|
-
const
|
|
122
|
-
|
|
122
|
+
const s = { value: t, label: c(e), raw: e };
|
|
123
|
+
n("duplicate", s), l.duplicateMessage && X.warning(l.duplicateMessage);
|
|
123
124
|
return;
|
|
124
125
|
}
|
|
125
|
-
const a = { value: t, label:
|
|
126
|
-
|
|
127
|
-
},
|
|
126
|
+
const a = { value: t, label: c(e), raw: e }, o = [...l.modelValue || [], ve(a)];
|
|
127
|
+
n("update:modelValue", o), n("add", a), n("change", o, [...r.value, a]), l.clearInputAfterSelect && (y.value = "");
|
|
128
|
+
}, me = () => {
|
|
128
129
|
if (!l.enterToAdd) return;
|
|
129
130
|
const e = (y.value || "").trim();
|
|
130
131
|
if (!e) return;
|
|
131
132
|
let t = null;
|
|
132
|
-
for (const a of
|
|
133
|
-
if (
|
|
133
|
+
for (const a of S.value.values())
|
|
134
|
+
if (c(a) === e) {
|
|
134
135
|
t = a;
|
|
135
136
|
break;
|
|
136
137
|
}
|
|
137
138
|
if (!t) {
|
|
138
|
-
|
|
139
|
+
n("not-found", e), l.notFoundMessage && X.warning(l.notFoundMessage);
|
|
139
140
|
return;
|
|
140
141
|
}
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
o(
|
|
142
|
+
L(t);
|
|
143
|
+
}, E = (e) => {
|
|
144
|
+
if (e < 0 || e >= r.value.length) return;
|
|
145
|
+
const t = r.value[e], a = [...l.modelValue || []];
|
|
146
|
+
a.splice(e, 1), n("update:modelValue", a), t && n("remove", t, e);
|
|
147
|
+
const o = r.value.filter((s, V) => V !== e);
|
|
148
|
+
n("change", a, o);
|
|
147
149
|
};
|
|
148
|
-
return
|
|
150
|
+
return Y({
|
|
149
151
|
/** 主动打开下拉面板 */
|
|
150
|
-
open:
|
|
152
|
+
open: _,
|
|
151
153
|
/** 主动关闭下拉面板 */
|
|
152
|
-
close: () =>
|
|
154
|
+
close: () => u.value = !1,
|
|
153
155
|
/** 清空已选 */
|
|
154
156
|
clear: () => {
|
|
155
|
-
|
|
157
|
+
n("update:modelValue", []), n("change", [], []);
|
|
156
158
|
},
|
|
157
159
|
/** 根据 value 直接添加 */
|
|
158
160
|
addByValue: (e) => {
|
|
159
|
-
const t =
|
|
160
|
-
t &&
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
const t = S.value.get(e);
|
|
162
|
+
t && L(t);
|
|
163
|
+
},
|
|
164
|
+
/** 根据索引移除,触发与关闭 tag 一致的事件 */
|
|
165
|
+
removeByIndex: (e) => {
|
|
166
|
+
E(e);
|
|
167
|
+
},
|
|
168
|
+
/** 根据 value 移除,触发与关闭 tag 一致的事件 */
|
|
169
|
+
removeByValue: (e) => {
|
|
170
|
+
const t = r.value.findIndex((a) => a.value === e);
|
|
171
|
+
t > -1 && E(t);
|
|
172
|
+
},
|
|
173
|
+
/** 获取当前归一化后的已选项 */
|
|
174
|
+
getSelectedItems: () => r.value
|
|
175
|
+
}), (e, t) => (v(), F("div", {
|
|
176
|
+
class: C(["g-input-tree-tag", { "is-disabled": e.disabled }])
|
|
164
177
|
}, [
|
|
165
|
-
|
|
178
|
+
B("div", {
|
|
166
179
|
class: "g-input-tree-tag__wrap",
|
|
167
180
|
ref_key: "wrapRef",
|
|
168
|
-
ref:
|
|
181
|
+
ref: H
|
|
169
182
|
}, [
|
|
170
|
-
|
|
183
|
+
B("div", {
|
|
171
184
|
class: "g-input-tree-tag__input-box",
|
|
172
185
|
ref_key: "inputBoxRef",
|
|
173
|
-
ref:
|
|
174
|
-
style:
|
|
186
|
+
ref: N,
|
|
187
|
+
style: T({ width: se.value })
|
|
175
188
|
}, [
|
|
176
|
-
W(
|
|
189
|
+
W(R(Se), {
|
|
177
190
|
modelValue: y.value,
|
|
178
191
|
"onUpdate:modelValue": t[0] || (t[0] = (a) => y.value = a),
|
|
179
192
|
placeholder: e.placeholder,
|
|
180
193
|
clearable: e.clearable,
|
|
181
194
|
disabled: e.disabled,
|
|
182
195
|
class: "g-input-tree-tag__input",
|
|
183
|
-
onFocus:
|
|
184
|
-
onClick:
|
|
185
|
-
onInput:
|
|
186
|
-
onKeyup:
|
|
196
|
+
onFocus: _,
|
|
197
|
+
onClick: _,
|
|
198
|
+
onInput: ce,
|
|
199
|
+
onKeyup: Ee(me, ["enter"])
|
|
187
200
|
}, null, 8, ["modelValue", "placeholder", "clearable", "disabled"])
|
|
188
201
|
], 4),
|
|
189
|
-
(v(), Z(
|
|
190
|
-
|
|
202
|
+
(v(), Z(Ve, { to: "body" }, [
|
|
203
|
+
Fe(B("div", {
|
|
191
204
|
ref_key: "popperRef",
|
|
192
205
|
ref: g,
|
|
193
|
-
class:
|
|
194
|
-
style:
|
|
195
|
-
onMousedown: t[1] || (t[1] =
|
|
206
|
+
class: C(["g-input-tree-tag__popover", `is-${K.value}`]),
|
|
207
|
+
style: T(O.value),
|
|
208
|
+
onMousedown: t[1] || (t[1] = Be(() => {
|
|
196
209
|
}, ["prevent"]))
|
|
197
210
|
}, [
|
|
198
|
-
|
|
211
|
+
B("div", {
|
|
199
212
|
class: "g-input-tree-tag__tree-wrap",
|
|
200
|
-
style:
|
|
213
|
+
style: T({ maxHeight: e.popperMaxHeight + "px" })
|
|
201
214
|
}, [
|
|
202
|
-
W(
|
|
215
|
+
W(R(_e), {
|
|
203
216
|
ref_key: "treeRef",
|
|
204
|
-
ref:
|
|
217
|
+
ref: $,
|
|
205
218
|
data: e.data,
|
|
206
219
|
props: te.value,
|
|
207
220
|
"node-key": e.nodeKey,
|
|
208
|
-
"filter-node-method":
|
|
221
|
+
"filter-node-method": pe,
|
|
209
222
|
"expand-on-click-node": !1,
|
|
210
223
|
"default-expand-all": e.defaultExpandAll,
|
|
211
|
-
onNodeClick:
|
|
224
|
+
onNodeClick: fe
|
|
212
225
|
}, {
|
|
213
226
|
default: J((a) => [
|
|
214
|
-
|
|
227
|
+
x(e.$slots, "tree-node", {
|
|
215
228
|
data: a?.data,
|
|
216
229
|
node: a?.node,
|
|
217
|
-
selectable:
|
|
230
|
+
selectable: p(a?.data),
|
|
218
231
|
selected: w(m(a?.data))
|
|
219
232
|
}, () => [
|
|
220
|
-
a?.data ? (v(),
|
|
233
|
+
a?.data ? (v(), F("span", {
|
|
221
234
|
key: 0,
|
|
222
|
-
class:
|
|
235
|
+
class: C([
|
|
223
236
|
"g-input-tree-tag__node",
|
|
224
237
|
{
|
|
225
|
-
"is-selectable":
|
|
226
|
-
"is-selected":
|
|
238
|
+
"is-selectable": p(a.data),
|
|
239
|
+
"is-selected": p(a.data) && w(m(a.data))
|
|
227
240
|
}
|
|
228
241
|
])
|
|
229
242
|
}, [
|
|
230
|
-
|
|
243
|
+
x(e.$slots, "leaf-icon", {
|
|
231
244
|
data: a.data,
|
|
232
|
-
selectable:
|
|
245
|
+
selectable: p(a.data),
|
|
233
246
|
selected: w(m(a.data))
|
|
234
247
|
}, void 0, !0),
|
|
235
|
-
|
|
248
|
+
P(" " + Q(c(a.data)), 1)
|
|
236
249
|
], 2)) : G("", !0)
|
|
237
250
|
], !0)
|
|
238
251
|
]),
|
|
@@ -240,28 +253,28 @@ const Se = {
|
|
|
240
253
|
}, 8, ["data", "props", "node-key", "default-expand-all"])
|
|
241
254
|
], 4)
|
|
242
255
|
], 38), [
|
|
243
|
-
[
|
|
256
|
+
[xe, u.value]
|
|
244
257
|
])
|
|
245
258
|
])),
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
items:
|
|
249
|
-
remove:
|
|
259
|
+
r.value.length ? (v(), F("div", Te, [
|
|
260
|
+
x(e.$slots, "tags", {
|
|
261
|
+
items: r.value,
|
|
262
|
+
remove: E
|
|
250
263
|
}, () => [
|
|
251
|
-
(v(!0),
|
|
264
|
+
(v(!0), F(Ie, null, Me(r.value, (a, o) => (v(), Z(R(Le), {
|
|
252
265
|
key: a.value,
|
|
253
266
|
class: "g-input-tree-tag__tag",
|
|
254
267
|
type: e.tagType,
|
|
255
268
|
effect: e.tagEffect,
|
|
256
269
|
closable: e.closable && !e.disabled,
|
|
257
|
-
onClose: (
|
|
270
|
+
onClose: (s) => E(o)
|
|
258
271
|
}, {
|
|
259
272
|
default: J(() => [
|
|
260
|
-
|
|
273
|
+
x(e.$slots, "tag", {
|
|
261
274
|
item: a,
|
|
262
|
-
index:
|
|
275
|
+
index: o
|
|
263
276
|
}, () => [
|
|
264
|
-
Q(
|
|
277
|
+
P(Q(a.label), 1)
|
|
265
278
|
], !0)
|
|
266
279
|
]),
|
|
267
280
|
_: 2
|
|
@@ -271,11 +284,11 @@ const Se = {
|
|
|
271
284
|
], 512)
|
|
272
285
|
], 2));
|
|
273
286
|
}
|
|
274
|
-
}),
|
|
275
|
-
|
|
276
|
-
|
|
287
|
+
}), A = /* @__PURE__ */ Ce(Re, [["__scopeId", "data-v-1fe6c294"]]);
|
|
288
|
+
A.install = (I) => {
|
|
289
|
+
I.component(A.name, A);
|
|
277
290
|
};
|
|
278
291
|
export {
|
|
279
|
-
|
|
280
|
-
|
|
292
|
+
A as GInputTreeTag,
|
|
293
|
+
A as default
|
|
281
294
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.g-input-tree-tag[data-v-
|
|
1
|
+
@charset "UTF-8";.g-input-tree-tag[data-v-1fe6c294]{width:100%}.g-input-tree-tag__wrap[data-v-1fe6c294]{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.g-input-tree-tag__tags[data-v-1fe6c294]{display:flex;flex-wrap:wrap;gap:8px;width:100%}.g-input-tree-tag__tag[data-v-1fe6c294]{margin:0}.g-input-tree-tag.is-disabled[data-v-1fe6c294]{cursor:not-allowed}.g-input-tree-tag__popover{box-sizing:border-box;background:var(--el-bg-color-overlay, #fff);border:1px solid var(--el-border-color-light);border-radius:4px;box-shadow:var(--el-box-shadow-light);padding:8px 0}.g-input-tree-tag__popover .g-input-tree-tag__tree-wrap{overflow:auto}.g-input-tree-tag__popover .g-input-tree-tag__node{display:inline-flex;align-items:center;gap:4px;font-size:13px}.g-input-tree-tag__popover .g-input-tree-tag__node.is-selectable{cursor:pointer;color:var(--el-text-color-primary)}.g-input-tree-tag__popover .g-input-tree-tag__node.is-selected{color:var(--el-color-primary)}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
interface BorderGlowProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
edgeSensitivity?: number;
|
|
4
|
+
glowColor?: string;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
borderRadius?: number;
|
|
7
|
+
glowRadius?: number;
|
|
8
|
+
glowIntensity?: number;
|
|
9
|
+
coneSpread?: number;
|
|
10
|
+
animated?: boolean;
|
|
11
|
+
colors?: string[];
|
|
12
|
+
fillOpacity?: number;
|
|
13
|
+
}
|
|
14
|
+
declare function __VLS_template(): {
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
slots: {
|
|
17
|
+
default?(_: {}): any;
|
|
18
|
+
};
|
|
19
|
+
refs: {
|
|
20
|
+
cardRef: HTMLDivElement;
|
|
21
|
+
};
|
|
22
|
+
rootEl: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<BorderGlowProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BorderGlowProps> & Readonly<{}>, {
|
|
26
|
+
className: string;
|
|
27
|
+
edgeSensitivity: number;
|
|
28
|
+
glowColor: string;
|
|
29
|
+
backgroundColor: string;
|
|
30
|
+
borderRadius: number;
|
|
31
|
+
glowRadius: number;
|
|
32
|
+
glowIntensity: number;
|
|
33
|
+
coneSpread: number;
|
|
34
|
+
animated: boolean;
|
|
35
|
+
colors: string[];
|
|
36
|
+
fillOpacity: number;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
38
|
+
cardRef: HTMLDivElement;
|
|
39
|
+
}, HTMLDivElement>;
|
|
40
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
interface FuzzyTextProps {
|
|
2
|
+
/** 字号;number 按 px 处理,string 支持任意 CSS 字号(如 clamp / vw / rem) */
|
|
3
|
+
fontSize?: number | string;
|
|
4
|
+
/** 字重 */
|
|
5
|
+
fontWeight?: string | number;
|
|
6
|
+
/** 字体;'inherit' 时取宿主 canvas 的 computed font-family */
|
|
7
|
+
fontFamily?: string;
|
|
8
|
+
/** 文字颜色,未配置 gradient 时生效 */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** 是否启用鼠标 / 触摸悬停切换到 hoverIntensity */
|
|
11
|
+
enableHover?: boolean;
|
|
12
|
+
/** 静止状态下的模糊强度(0~1),作为随机偏移系数 */
|
|
13
|
+
baseIntensity?: number;
|
|
14
|
+
/** 悬停状态下的模糊强度 */
|
|
15
|
+
hoverIntensity?: number;
|
|
16
|
+
/** 每行随机偏移的最大像素值,最终偏移量 ≈ intensity × fuzzRange */
|
|
17
|
+
fuzzRange?: number;
|
|
18
|
+
/** 动画帧率上限,用于在 requestAnimationFrame 中做节流 */
|
|
19
|
+
fps?: number;
|
|
20
|
+
/** 抖动方向;vertical / both 时纵向幅度为横向的 0.5 倍 */
|
|
21
|
+
direction?: 'horizontal' | 'vertical' | 'both';
|
|
22
|
+
/** 强度切换的过渡时长(ms),0 表示无过渡瞬切 */
|
|
23
|
+
transitionDuration?: number;
|
|
24
|
+
/** 点击时触发 150ms 的最大强度(intensity=1) */
|
|
25
|
+
clickEffect?: boolean;
|
|
26
|
+
/** 开启周期性 "故障" 闪烁 */
|
|
27
|
+
glitchMode?: boolean;
|
|
28
|
+
/** glitch 触发间隔(ms) */
|
|
29
|
+
glitchInterval?: number;
|
|
30
|
+
/** 单次 glitch 持续时间(ms) */
|
|
31
|
+
glitchDuration?: number;
|
|
32
|
+
/** 横向线性渐变色数组,长度 ≥ 2 时覆盖 color */
|
|
33
|
+
gradient?: string[] | null;
|
|
34
|
+
/** 字符间距(px),非 0 时切换为逐字符绘制路径 */
|
|
35
|
+
letterSpacing?: number;
|
|
36
|
+
/** 透传到 canvas 的自定义类名 */
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
declare const _default: import('vue').DefineComponent<FuzzyTextProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FuzzyTextProps> & Readonly<{}>, {
|
|
40
|
+
className: string;
|
|
41
|
+
color: string;
|
|
42
|
+
gradient: string[] | null;
|
|
43
|
+
fontSize: number | string;
|
|
44
|
+
fontWeight: string | number;
|
|
45
|
+
fontFamily: string;
|
|
46
|
+
enableHover: boolean;
|
|
47
|
+
baseIntensity: number;
|
|
48
|
+
hoverIntensity: number;
|
|
49
|
+
fuzzRange: number;
|
|
50
|
+
fps: number;
|
|
51
|
+
direction: "horizontal" | "vertical" | "both";
|
|
52
|
+
transitionDuration: number;
|
|
53
|
+
clickEffect: boolean;
|
|
54
|
+
glitchMode: boolean;
|
|
55
|
+
glitchInterval: number;
|
|
56
|
+
glitchDuration: number;
|
|
57
|
+
letterSpacing: number;
|
|
58
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
59
|
+
canvasRef: HTMLCanvasElement;
|
|
60
|
+
}, HTMLCanvasElement>;
|
|
61
|
+
export default _default;
|
|
@@ -5,6 +5,10 @@ interface TreeFieldProps {
|
|
|
5
5
|
isLeaf?: string;
|
|
6
6
|
disabled?: string;
|
|
7
7
|
}
|
|
8
|
+
interface EchoFieldProps {
|
|
9
|
+
value?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
8
12
|
interface SelectedItem {
|
|
9
13
|
value: any;
|
|
10
14
|
label: string;
|
|
@@ -17,6 +21,8 @@ interface Props {
|
|
|
17
21
|
data?: any[];
|
|
18
22
|
/** 字段映射,对应 el-tree 的 props,外加 value/isLeaf 用于本组件 */
|
|
19
23
|
props?: TreeFieldProps;
|
|
24
|
+
/** 回显对象字段映射,用于 valueFormat='object' 时从接口数据中读取值和标签 */
|
|
25
|
+
echoProps?: EchoFieldProps;
|
|
20
26
|
/** el-tree 的 node-key */
|
|
21
27
|
nodeKey?: string;
|
|
22
28
|
/** 输入框占位文案 */
|
|
@@ -464,7 +470,7 @@ declare function __VLS_template(): {
|
|
|
464
470
|
readonly previousSibling: any | null;
|
|
465
471
|
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep?: boolean) => boolean;
|
|
466
472
|
remove: () => void;
|
|
467
|
-
insertChild: (child
|
|
473
|
+
insertChild: (child? /** 浮层 z-index */: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, index? /** 浮层与输入框的纵向间隙 */: number, batch?: boolean) => void;
|
|
468
474
|
insertBefore: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
469
475
|
insertAfter: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
470
476
|
removeChild: (child: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
@@ -977,7 +983,7 @@ declare function __VLS_template(): {
|
|
|
977
983
|
readonly previousSibling: any | null;
|
|
978
984
|
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep?: boolean) => boolean;
|
|
979
985
|
remove: () => void;
|
|
980
|
-
insertChild: (child
|
|
986
|
+
insertChild: (child? /** 浮层 z-index */: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, index? /** 浮层与输入框的纵向间隙 */: number, batch?: boolean) => void;
|
|
981
987
|
insertBefore: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
982
988
|
insertAfter: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
983
989
|
removeChild: (child: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
@@ -1102,6 +1108,12 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
1102
1108
|
clear: () => void;
|
|
1103
1109
|
/** 根据 value 直接添加 */
|
|
1104
1110
|
addByValue: (value: any) => void;
|
|
1111
|
+
/** 根据索引移除,触发与关闭 tag 一致的事件 */
|
|
1112
|
+
removeByIndex: (index: number) => void;
|
|
1113
|
+
/** 根据 value 移除,触发与关闭 tag 一致的事件 */
|
|
1114
|
+
removeByValue: (value: any) => void;
|
|
1115
|
+
/** 获取当前归一化后的已选项 */
|
|
1116
|
+
getSelectedItems: () => SelectedItem[];
|
|
1105
1117
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
1106
1118
|
"update:modelValue": (value: any[]) => any;
|
|
1107
1119
|
add: (item: SelectedItem) => any;
|
|
@@ -1524,7 +1536,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
1524
1536
|
readonly previousSibling: any | null;
|
|
1525
1537
|
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep?: boolean) => boolean;
|
|
1526
1538
|
remove: () => void;
|
|
1527
|
-
insertChild: (child
|
|
1539
|
+
insertChild: (child? /** 浮层 z-index */: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, index? /** 浮层与输入框的纵向间隙 */: number, batch?: boolean) => void;
|
|
1528
1540
|
insertBefore: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
1529
1541
|
insertAfter: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
1530
1542
|
removeChild: (child: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
@@ -2037,7 +2049,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
2037
2049
|
readonly previousSibling: any | null;
|
|
2038
2050
|
contains: (target: import('element-plus/es/components/tree/src/model/node.mjs').default, deep?: boolean) => boolean;
|
|
2039
2051
|
remove: () => void;
|
|
2040
|
-
insertChild: (child
|
|
2052
|
+
insertChild: (child? /** 浮层 z-index */: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, index? /** 浮层与输入框的纵向间隙 */: number, batch?: boolean) => void;
|
|
2041
2053
|
insertBefore: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
2042
2054
|
insertAfter: (child: import('element-plus').FakeNode | import('element-plus/es/components/tree/src/model/node.mjs').default, ref: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|
|
2043
2055
|
removeChild: (child: import('element-plus/es/components/tree/src/model/node.mjs').default) => void;
|