color-star-custom-components 0.0.12 → 0.0.14
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/es/IconRenderer.mjs +1 -1
- package/es/IconSelect.mjs +1 -1
- package/es/SearchBar.mjs +23 -23
- package/es/TreeSelect.mjs +1 -1
- package/es/TreeShowSelect.mjs +12 -12
- package/es/assets/SearchBar.css +1 -1
- package/es/assets/TreeShowSelect.css +1 -1
- package/es/assets/layout2.css +1 -1
- package/es/chunks/config.vx0Pd_KA.js +24 -0
- package/es/chunks/global.BAPub_Ki.js +1955 -0
- package/es/chunks/layout.doc0wm3z.js +411 -0
- package/es/index.mjs +1 -1
- package/lib/IconRenderer.js +1 -1
- package/lib/IconSelect.js +1 -1
- package/lib/SearchBar.js +1 -1
- package/lib/TreeSelect.js +1 -1
- package/lib/TreeShowSelect.js +1 -1
- package/lib/assets/SearchBar.css +1 -1
- package/lib/assets/TreeShowSelect.css +1 -1
- package/lib/assets/layout2.css +1 -1
- package/lib/chunks/config.BQdizeHz.js +1 -0
- package/lib/chunks/global.DzBTkIU5.js +1 -0
- package/lib/chunks/layout.00bu3jNF.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { useAttrs as ae, ref as L, computed as S, watch as q, nextTick as B, onMounted as ie, createElementBlock as M, openBlock as x, createCommentVNode as re, createElementVNode as T, createVNode as v, unref as f, withCtx as N, normalizeClass as de, mergeProps as ce, renderSlot as O, toDisplayString as K, withModifiers as ue, createBlock as he, h as R } from "vue";
|
|
2
|
+
import { ElInput as fe, ElIcon as H, ElAutoResizer as pe, ElTreeV2 as me } from "element-plus";
|
|
3
|
+
import { IconSearch as ve, IconDelete as ye, IconRighttop as ge } from "color-message-lingyun-vue";
|
|
4
|
+
import { IconEmpty as ke } from "../IconEmpty.mjs";
|
|
5
|
+
import { _ as Se } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
+
import '../assets/layout2.css';function Ne(a) {
|
|
7
|
+
return {
|
|
8
|
+
name: "element-tree-line",
|
|
9
|
+
props: {
|
|
10
|
+
node: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: !0
|
|
13
|
+
},
|
|
14
|
+
data: {
|
|
15
|
+
type: Object
|
|
16
|
+
},
|
|
17
|
+
treeData: {
|
|
18
|
+
type: Array
|
|
19
|
+
},
|
|
20
|
+
indent: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default() {
|
|
23
|
+
return 16;
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
showLabelLine: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
render(r) {
|
|
32
|
+
const d = a || r, s = this.getScopedSlot("default"), t = this.getScopedSlot("node-label"), c = this.getScopedSlot("after-node-label"), p = s ? this.getScopedSlotValue(s, {
|
|
33
|
+
node: this.node,
|
|
34
|
+
data: this.data
|
|
35
|
+
}) : [
|
|
36
|
+
t ? this.getScopedSlotValue(t, {
|
|
37
|
+
node: this.node,
|
|
38
|
+
data: this.data
|
|
39
|
+
}) : d(
|
|
40
|
+
"span",
|
|
41
|
+
{ class: "element-tree-node-label" },
|
|
42
|
+
this.node.label
|
|
43
|
+
),
|
|
44
|
+
this.showLabelLine ? d("span", {
|
|
45
|
+
class: "element-tree-node-label-line"
|
|
46
|
+
}) : null,
|
|
47
|
+
this.getScopedSlotValue(c, {
|
|
48
|
+
node: this.node,
|
|
49
|
+
data: this.data
|
|
50
|
+
})
|
|
51
|
+
], y = [];
|
|
52
|
+
let u = this.node;
|
|
53
|
+
for (; u; ) {
|
|
54
|
+
let n = u.parent;
|
|
55
|
+
if (u.level === 1 && !u.parent) {
|
|
56
|
+
if (!this.treeData || !Array.isArray(this.treeData))
|
|
57
|
+
throw Error(
|
|
58
|
+
"if you using el-tree-v2 (Virtualized Tree) of element-plus,element-tree-line required data."
|
|
59
|
+
);
|
|
60
|
+
n = {
|
|
61
|
+
children: Array.isArray(this.treeData) ? this.treeData.map((m) => ({ ...m, key: m.id })) : [],
|
|
62
|
+
level: 0,
|
|
63
|
+
key: "node-0",
|
|
64
|
+
parent: null
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (n) {
|
|
68
|
+
const m = (n.children || n.childNodes).findIndex(
|
|
69
|
+
(b) => (b.key || b.id) === (u.key || u.id)
|
|
70
|
+
);
|
|
71
|
+
y.unshift(
|
|
72
|
+
m === (n.children || n.childNodes).length - 1
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
u = n;
|
|
76
|
+
}
|
|
77
|
+
const V = [];
|
|
78
|
+
for (let n = 0; n < this.node.level; n++)
|
|
79
|
+
y[n] && this.node.level - 1 !== n || V.push(
|
|
80
|
+
d("span", {
|
|
81
|
+
class: {
|
|
82
|
+
"element-tree-node-line-ver": !0,
|
|
83
|
+
"last-node-isLeaf-line": y[n] && this.node.level - 1 === n
|
|
84
|
+
},
|
|
85
|
+
style: { left: this.indent * n + "px" }
|
|
86
|
+
})
|
|
87
|
+
);
|
|
88
|
+
return d(
|
|
89
|
+
"span",
|
|
90
|
+
{
|
|
91
|
+
class: "element-tree-node-label-wrapper"
|
|
92
|
+
},
|
|
93
|
+
[p].concat(V).concat([
|
|
94
|
+
d("span", {
|
|
95
|
+
class: "element-tree-node-line-hor",
|
|
96
|
+
style: {
|
|
97
|
+
width: (this.node.isLeaf ? 24 : 8) + "px",
|
|
98
|
+
left: (this.node.level - 1) * this.indent + "px"
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
])
|
|
102
|
+
);
|
|
103
|
+
},
|
|
104
|
+
methods: {
|
|
105
|
+
getScopedSlot(r) {
|
|
106
|
+
if (!r)
|
|
107
|
+
return null;
|
|
108
|
+
const d = r.split("||");
|
|
109
|
+
let s = null;
|
|
110
|
+
for (let t = 0; t < d.length; t++) {
|
|
111
|
+
const c = d[t], p = (this.$slots || {})[c];
|
|
112
|
+
if (p) {
|
|
113
|
+
s = p;
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
if (s = (this.$scopedSlots || {})[c], s)
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
return s;
|
|
120
|
+
},
|
|
121
|
+
getScopedSlotValue(r, d, s = null) {
|
|
122
|
+
return typeof r == "function" ? r(d) || s : r || s;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function Q(a) {
|
|
128
|
+
const r = Ne(a);
|
|
129
|
+
return a && (r.methods.getScopedSlot = function(s) {
|
|
130
|
+
if (!s)
|
|
131
|
+
return null;
|
|
132
|
+
const t = s.split("||");
|
|
133
|
+
let c = null;
|
|
134
|
+
for (let p = 0; p < t.length; p++) {
|
|
135
|
+
const y = t[p], u = (this.$slots || {})[y];
|
|
136
|
+
if (u) {
|
|
137
|
+
c = u;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return c;
|
|
142
|
+
}), r;
|
|
143
|
+
}
|
|
144
|
+
Q();
|
|
145
|
+
const be = { class: "w-full h-full flex flex-col overflow-hidden" }, Ce = {
|
|
146
|
+
key: 0,
|
|
147
|
+
class: "mg-b-16"
|
|
148
|
+
}, Le = {
|
|
149
|
+
key: 0,
|
|
150
|
+
class: "list-item flex justify-between pd-l-6 pd-r-6 radius-8 items-center w-full"
|
|
151
|
+
}, xe = ["onClick"], Ve = { key: 1 }, we = /* @__PURE__ */ Object.assign({
|
|
152
|
+
name: "TreeSelect"
|
|
153
|
+
}, {
|
|
154
|
+
__name: "layout",
|
|
155
|
+
props: {
|
|
156
|
+
// 初始值
|
|
157
|
+
modelValue: {
|
|
158
|
+
type: Object,
|
|
159
|
+
default: () => []
|
|
160
|
+
},
|
|
161
|
+
// 树形节点对象结构
|
|
162
|
+
treeProps: {
|
|
163
|
+
type: Object,
|
|
164
|
+
default: () => ({
|
|
165
|
+
value: "id",
|
|
166
|
+
label: "label",
|
|
167
|
+
children: "children"
|
|
168
|
+
})
|
|
169
|
+
},
|
|
170
|
+
// 接口配置
|
|
171
|
+
apiConfig: {
|
|
172
|
+
type: Function
|
|
173
|
+
},
|
|
174
|
+
// 请求参数
|
|
175
|
+
reqParams: {
|
|
176
|
+
type: Object,
|
|
177
|
+
default: () => ({})
|
|
178
|
+
},
|
|
179
|
+
// 是否在组件挂载时自动加载数据
|
|
180
|
+
autoLoad: {
|
|
181
|
+
type: Boolean,
|
|
182
|
+
default: !0
|
|
183
|
+
},
|
|
184
|
+
// 是否多选
|
|
185
|
+
isMultiple: {
|
|
186
|
+
type: Boolean,
|
|
187
|
+
default: !0
|
|
188
|
+
},
|
|
189
|
+
// 是否有过滤
|
|
190
|
+
hasFilter: {
|
|
191
|
+
type: Boolean,
|
|
192
|
+
default: !1
|
|
193
|
+
},
|
|
194
|
+
// 是否是列表模式
|
|
195
|
+
isListMode: {
|
|
196
|
+
type: Boolean,
|
|
197
|
+
default: !1
|
|
198
|
+
},
|
|
199
|
+
treeList: {
|
|
200
|
+
type: Array,
|
|
201
|
+
default: () => []
|
|
202
|
+
},
|
|
203
|
+
// 是否有线条样式
|
|
204
|
+
hasTreeLine: {
|
|
205
|
+
type: Boolean,
|
|
206
|
+
default: !0
|
|
207
|
+
},
|
|
208
|
+
// 选中的节点是否包含父节点
|
|
209
|
+
includeParentSelected: {
|
|
210
|
+
type: Boolean,
|
|
211
|
+
default: !1
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
emits: ["handleCheck", "handleDeleteNode", "initFinish"],
|
|
215
|
+
setup(a, { expose: r, emit: d }) {
|
|
216
|
+
const s = Q(R), t = a, c = d, p = ae(), y = () => R(ge, {
|
|
217
|
+
style: { color: "var(--text-color-2)", fontSize: "16px" }
|
|
218
|
+
}), u = t.isMultiple ? 20 : 10, V = t.isMultiple ? 15 : 11, n = L([]), m = L(null), b = L(null), D = S(() => t.treeProps.value), P = S(() => t.treeProps.label), g = S(() => t.treeProps.children), _ = L(!1), U = S(() => !t.isMultiple && _.value), G = S(() => typeof t.apiConfig == "function"), J = () => {
|
|
219
|
+
let e = m.value?.getCheckedNodes(), l = e.map((h) => h[D.value]), o = [];
|
|
220
|
+
return e.length && !t.includeParentSelected && (e = e.filter((h) => !h[g.value]), l = e.map((h) => h[D.value])), t.includeParentSelected && (o = W(n.value, l)), {
|
|
221
|
+
selectedNodeValues: l,
|
|
222
|
+
// 选中节点的值的集合
|
|
223
|
+
selectedNodes: e,
|
|
224
|
+
// 选中节点的集合
|
|
225
|
+
selectedParentNodes: o
|
|
226
|
+
// 选中节点的所有父节点
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
function W(e, l) {
|
|
230
|
+
const o = /* @__PURE__ */ new Map();
|
|
231
|
+
function h(i, k = []) {
|
|
232
|
+
for (const C of i) {
|
|
233
|
+
const se = [...k, C];
|
|
234
|
+
C.children && C.children.length > 0 ? h(C.children, se) : l.includes(C.id) && k.forEach((A) => {
|
|
235
|
+
o.has(A.id) || o.set(A.id, { ...A });
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return h(e), Array.from(o.values());
|
|
240
|
+
}
|
|
241
|
+
const X = (e) => {
|
|
242
|
+
!t.isMultiple || t.isListMode || E();
|
|
243
|
+
}, Y = (e, l) => {
|
|
244
|
+
t.isMultiple || t.isListMode || (_.value = !0, b.value = l.key, c("handleCheck", {
|
|
245
|
+
selectedValue: [b.value],
|
|
246
|
+
// 选中节点的值
|
|
247
|
+
selectedNode: [l.data]
|
|
248
|
+
// // 选中节点
|
|
249
|
+
}));
|
|
250
|
+
}, j = L(""), Z = (e) => {
|
|
251
|
+
m.value.filter(e);
|
|
252
|
+
}, ee = (e, l) => l[P.value].includes(e), te = (e) => {
|
|
253
|
+
let l = 0;
|
|
254
|
+
function o(h) {
|
|
255
|
+
for (const i of h) {
|
|
256
|
+
const k = i[g.value] && i[g.value].length > 0;
|
|
257
|
+
t.includeParentSelected ? l++ : k || l++, k && o(i[g.value]);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return o(e), l;
|
|
261
|
+
}, le = S(() => te(n.value));
|
|
262
|
+
function E() {
|
|
263
|
+
const { selectedNodeValues: e, selectedNodes: l, selectedParentNodes: o } = J();
|
|
264
|
+
c("handleCheck", {
|
|
265
|
+
selectedValue: e,
|
|
266
|
+
// 选中节点的值的集合
|
|
267
|
+
selectedNode: l,
|
|
268
|
+
// 选中节点的集合
|
|
269
|
+
selectedParentNodes: o
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
const ne = (e, l) => {
|
|
273
|
+
m.value?.setChecked(e, l), E();
|
|
274
|
+
}, z = () => {
|
|
275
|
+
p["default-checked-keys"] && B(() => {
|
|
276
|
+
E();
|
|
277
|
+
});
|
|
278
|
+
}, oe = (e) => {
|
|
279
|
+
c("handleDeleteNode", e);
|
|
280
|
+
}, w = (e) => e?.map((l) => ({
|
|
281
|
+
...l,
|
|
282
|
+
[g.value]: l[g.value]?.length ? w(l[g.value]) : void 0
|
|
283
|
+
})), F = async () => {
|
|
284
|
+
G.value ? t.apiConfig(t.reqParams)?.then((e) => {
|
|
285
|
+
n.value = w(e?.data || []), z(), I(t.modelValue), c("initFinish", n.value);
|
|
286
|
+
}) : $();
|
|
287
|
+
}, $ = () => {
|
|
288
|
+
t.isListMode ? n.value = w(t.treeList || []) : (n.value = w(t.treeList || []), n.value.length && (z(), I(t.modelValue)));
|
|
289
|
+
}, I = (e) => {
|
|
290
|
+
const l = e && e.length && e.map((o) => o[t.treeProps.value]);
|
|
291
|
+
B(() => {
|
|
292
|
+
m.value?.setCheckedKeys(l);
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
return q(
|
|
296
|
+
() => t.treeList,
|
|
297
|
+
() => {
|
|
298
|
+
$();
|
|
299
|
+
},
|
|
300
|
+
{ deep: !0 }
|
|
301
|
+
), q(
|
|
302
|
+
() => t.modelValue,
|
|
303
|
+
(e) => {
|
|
304
|
+
B(() => {
|
|
305
|
+
I(e);
|
|
306
|
+
});
|
|
307
|
+
},
|
|
308
|
+
{ deep: !0 }
|
|
309
|
+
), ie(() => {
|
|
310
|
+
F();
|
|
311
|
+
}), r({
|
|
312
|
+
allNodeNumbers: le,
|
|
313
|
+
loadData: F,
|
|
314
|
+
setNodeCheckStatus: ne
|
|
315
|
+
}), (e, l) => (x(), M("div", be, [
|
|
316
|
+
a.hasFilter ? (x(), M("div", Ce, [
|
|
317
|
+
v(f(fe), {
|
|
318
|
+
modelValue: j.value,
|
|
319
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => j.value = o),
|
|
320
|
+
placeholder: "请输入",
|
|
321
|
+
onInput: Z
|
|
322
|
+
}, {
|
|
323
|
+
prefix: N(() => [
|
|
324
|
+
v(f(H), {
|
|
325
|
+
size: 16,
|
|
326
|
+
color: "var(--neutral-color-12)",
|
|
327
|
+
class: "mg-r-4"
|
|
328
|
+
}, {
|
|
329
|
+
default: N(() => [
|
|
330
|
+
v(f(ve))
|
|
331
|
+
]),
|
|
332
|
+
_: 1
|
|
333
|
+
})
|
|
334
|
+
]),
|
|
335
|
+
_: 1
|
|
336
|
+
}, 8, ["modelValue"])
|
|
337
|
+
])) : re("", !0),
|
|
338
|
+
T("div", {
|
|
339
|
+
class: de([a.hasFilter ? "pd-l-8 pd-r-8" : "", "flex-1 overflow-hidden"])
|
|
340
|
+
}, [
|
|
341
|
+
v(f(pe), null, {
|
|
342
|
+
default: N(({ width: o, height: h }) => [
|
|
343
|
+
v(f(me), ce({
|
|
344
|
+
ref_key: "treeRef",
|
|
345
|
+
ref: m,
|
|
346
|
+
height: h,
|
|
347
|
+
width: o,
|
|
348
|
+
data: n.value,
|
|
349
|
+
props: a.treeProps,
|
|
350
|
+
"node-key": D.value,
|
|
351
|
+
"show-checkbox": a.isMultiple && !a.isListMode,
|
|
352
|
+
"item-size": 34,
|
|
353
|
+
indent: f(u),
|
|
354
|
+
"highlight-current": U.value,
|
|
355
|
+
icon: a.isListMode ? "" : y,
|
|
356
|
+
"filter-method": ee
|
|
357
|
+
}, f(p), {
|
|
358
|
+
onNodeClick: Y,
|
|
359
|
+
onCheck: X
|
|
360
|
+
}), {
|
|
361
|
+
default: N(({ node: i }) => [
|
|
362
|
+
a.isListMode ? (x(), M("div", Le, [
|
|
363
|
+
O(e.$slots, "node", {
|
|
364
|
+
node: i,
|
|
365
|
+
data: i.data
|
|
366
|
+
}, () => [
|
|
367
|
+
T("span", null, K(i.data[P.value]), 1)
|
|
368
|
+
], !0),
|
|
369
|
+
T("div", {
|
|
370
|
+
class: "flex items-center",
|
|
371
|
+
onClick: ue((k) => oe(i.data), ["stop"])
|
|
372
|
+
}, [
|
|
373
|
+
v(f(H), {
|
|
374
|
+
size: 14,
|
|
375
|
+
color: "var(--neutral-color-5)"
|
|
376
|
+
}, {
|
|
377
|
+
default: N(() => [
|
|
378
|
+
v(f(ye))
|
|
379
|
+
]),
|
|
380
|
+
_: 1
|
|
381
|
+
})
|
|
382
|
+
], 8, xe)
|
|
383
|
+
])) : O(e.$slots, "node", {
|
|
384
|
+
key: 1,
|
|
385
|
+
node: i,
|
|
386
|
+
data: i.data
|
|
387
|
+
}, () => [
|
|
388
|
+
a.hasTreeLine ? (x(), he(f(s), {
|
|
389
|
+
key: 0,
|
|
390
|
+
node: i,
|
|
391
|
+
treeData: n.value,
|
|
392
|
+
showLabelLine: !1,
|
|
393
|
+
indent: f(V)
|
|
394
|
+
}, null, 8, ["node", "treeData", "indent"])) : (x(), M("span", Ve, K(i.data[P.value]), 1))
|
|
395
|
+
], !0)
|
|
396
|
+
]),
|
|
397
|
+
empty: N(() => [
|
|
398
|
+
v(f(ke))
|
|
399
|
+
]),
|
|
400
|
+
_: 3
|
|
401
|
+
}, 16, ["height", "width", "data", "props", "node-key", "show-checkbox", "indent", "highlight-current", "icon"])
|
|
402
|
+
]),
|
|
403
|
+
_: 3
|
|
404
|
+
})
|
|
405
|
+
], 2)
|
|
406
|
+
]));
|
|
407
|
+
}
|
|
408
|
+
}), Ae = /* @__PURE__ */ Se(we, [["__scopeId", "data-v-1466e8fd"]]);
|
|
409
|
+
export {
|
|
410
|
+
Ae as T
|
|
411
|
+
};
|
package/es/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { FileList as a } from "./FileList.mjs";
|
|
|
10
10
|
import { BatchImport as s } from "./BatchImport.mjs";
|
|
11
11
|
import { TreeSelect as S } from "./TreeSelect.mjs";
|
|
12
12
|
import { TreeShowSelect as d } from "./TreeShowSelect.mjs";
|
|
13
|
-
import { i as u } from "./chunks/config.
|
|
13
|
+
import { i as u } from "./chunks/config.vx0Pd_KA.js";
|
|
14
14
|
import { dayjs as y } from "element-plus";
|
|
15
15
|
const o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
16
16
|
__proto__: null,
|
package/lib/IconRenderer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/IconRenderer.css');const u=require("./chunks/index.CkihWzK6.js"),e=require("vue"),s=require("element-plus"),a=require("./chunks/config
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/IconRenderer.css');const u=require("./chunks/index.CkihWzK6.js"),e=require("vue"),s=require("element-plus"),a=require("./chunks/config.BQdizeHz.js"),d=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),m=Object.assign({name:"IconRenderer"},{__name:"layout",props:{iconName:{type:String,default:""},iconLibrary:{type:String,default:a.iconLibraryMap.lingyun,validator:o=>Object.values(a.iconLibraryMap).includes(o)},size:{type:Number,default:16},color:{type:String,default:""}},setup(o){e.useCssVars(n=>({c078896a:o.color}));const t=o,r=e.shallowRef(null),c=e.ref(!1),l=async()=>{if(!t.iconName){r.value=null;return}if(!c.value){c.value=!0;try{const n=await a.getIconComponent(t.iconLibrary,t.iconName);r.value=n}catch(n){console.error("Failed to load icon component:",n),r.value=null}finally{c.value=!1}}};return e.watch(()=>[t.iconLibrary,t.iconName],()=>{l()},{immediate:!1}),e.onMounted(()=>{l()}),(n,y)=>o.iconName&&r.value?(e.openBlock(),e.createBlock(e.unref(s.ElIcon),e.mergeProps({key:0,size:o.size,color:o.color},n.$attrs),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value)))]),_:1},16,["size","color"])):e.createCommentVNode("",!0)}}),p=d._export_sfc(m,[["__scopeId","data-v-563503ea"]]),i=u.withInstall(p);exports.iconLibraryMap=a.iconLibraryMap;exports.IconRenderer=i;exports.default=i;
|
package/lib/IconSelect.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./assets/IconSelect.css');var S=Object.create;var b=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var j=(o,a,l,m)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of V(a))!N.call(o,r)&&r!==l&&b(o,r,{get:()=>a[r],enumerable:!(m=_(a,r))||m.enumerable});return o};var z=(o,a,l)=>(l=o!=null?S(E(o)):{},j(a||!o||!o.__esModule?b(l,"default",{value:o,enumerable:!0}):l,o));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const L=require("./chunks/index.CkihWzK6.js"),e=require("vue"),s=require("element-plus"),A=require("./chunks/layout.ikdn8BHo.js"),y=require("./chunks/config
|
|
1
|
+
"use strict";require('./assets/IconSelect.css');var S=Object.create;var b=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty;var j=(o,a,l,m)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of V(a))!N.call(o,r)&&r!==l&&b(o,r,{get:()=>a[r],enumerable:!(m=_(a,r))||m.enumerable});return o};var z=(o,a,l)=>(l=o!=null?S(E(o)):{},j(a||!o||!o.__esModule?b(l,"default",{value:o,enumerable:!0}):l,o));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const L=require("./chunks/index.CkihWzK6.js"),e=require("vue"),s=require("element-plus"),A=require("./chunks/layout.ikdn8BHo.js"),y=require("./chunks/config.BQdizeHz.js"),M=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),O={class:"icon-select-content flex flex-col overflow-hidden"},q={key:0,class:"no-data flex items-center justify-center w-full"},D={key:1,class:"icon-select-grid overflow-y-auto display-grid"},P={key:0,class:"loading-text flex items-center justify-center w-full"},F=["title","onClick"],R=Object.assign({name:"IconSelect"},{__name:"layout",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"请选择图标"},width:{type:Number,default:520},iconSize:{type:Number,default:62},library:{type:String,default:y.iconLibraryMap.lingyun,validator:o=>Object.values(y.iconLibraryMap).includes(o)},iconSearch:{type:Object,default:null},iconAdd:{type:Object,default:null},iconEmpty:{type:Object,default:null},iconColor:{type:String,default:""}},emits:["update:modelValue"],setup(o,{emit:a}){e.useCssVars(t=>({v051e54a2:o.iconColor}));const l=o,m=a,r=e.ref(!1),f=e.ref(""),i=e.ref(l.modelValue),u=e.ref(null),p=e.ref([]),k=e.ref(!1),d=e.shallowRef({IconSearch:null,IconAdd:null}),h=async t=>{const n=t==="search"?l.iconSearch:l.iconAdd;if(n)return n;try{return(await import("color-message-lingyun-vue"))[t==="search"?"IconSearch":"IconAdd"]}catch{return console.warn(`color-message-lingyun-vue not found, ${t} icon will not be displayed`),null}},B=async()=>{const[t,n]=await Promise.all([h("search"),h("add")]);return{IconSearch:t,IconAdd:n}},w=async()=>{k.value=!0;try{const t=await y.getIconLibrary(l.library);p.value=Object.entries(t).filter(([n])=>n.toLowerCase()&&!["default","icons"].includes(n)).map(([n,c])=>({name:n,component:e.markRaw(c)}))}catch(t){console.error("Failed to load icons:",t),p.value=[]}finally{k.value=!1}},I=e.computed(()=>f.value?p.value.filter(t=>t.name.toLowerCase().includes(f.value.toLowerCase())):p.value),v=async()=>{if(!i.value){u.value=null;return}const t=await y.getIconComponent(l.library,i.value);u.value=t?e.markRaw(t):null},C=t=>{i.value=t.name,m("update:modelValue",t.name),r.value=!1};return e.watch(()=>l.modelValue,t=>{i.value=t,v()}),e.watch(()=>l.library,()=>{w(),v()}),e.watch(()=>i.value,()=>{v()}),e.onMounted(async()=>{d.value=await B(),w(),v()}),(t,n)=>(e.openBlock(),e.createBlock(e.unref(s.ElPopover),{visible:r.value,"onUpdate:visible":n[1]||(n[1]=c=>r.value=c),placement:"bottom-start",width:o.width,trigger:"click"},{reference:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center pointer radius-16 justify-center w-icon-item",{"select-icon-box bg-fcfdff text-202434 fz-14 flex-col":!u.value,"icon-item":i.value}])},[u.value?(e.openBlock(),e.createBlock(e.unref(s.ElIcon),{key:0,size:o.iconSize},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value)))]),_:1},8,["size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[d.value.IconAdd?(e.openBlock(),e.createBlock(e.unref(s.ElIcon),{key:0,size:16},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value.IconAdd)))]),_:1})):e.createCommentVNode("",!0),n[2]||(n[2]=e.createTextVNode(" 上传 ",-1))],64))],2)]),default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(e.unref(s.ElInput),{class:"mg-b-12",modelValue:f.value,"onUpdate:modelValue":n[0]||(n[0]=c=>f.value=c),placeholder:"搜索图标",clearable:""},e.createSlots({_:2},[d.value.IconSearch?{name:"prefix",fn:e.withCtx(()=>[e.createVNode(e.unref(s.ElIcon),{size:16},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.value.IconSearch)))]),_:1})]),key:"0"}:void 0]),1032,["modelValue"]),I.value.length===0?(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(A._sfc_main,{icon:o.iconEmpty,text:"未找到相关图标"},null,8,["icon"])])):(e.openBlock(),e.createElementBlock("div",D,[k.value?(e.openBlock(),e.createElementBlock("div",P," 加载中... ")):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(I.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.name,class:e.normalizeClass(["icon-item radius-8 justify-center items-center pointer flex w-icon-item",{active:i.value===c.name}]),title:c.name,onClick:x=>C(c)},[e.createVNode(e.unref(s.ElIcon),{size:50},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.component)))]),_:2},1024)],10,F))),128))]))])]),_:1},8,["visible","width"]))}}),T=M._export_sfc(R,[["__scopeId","data-v-4106dcd4"]]),g=L.withInstall(T);exports.IconSelect=g;exports.default=g;
|
package/lib/SearchBar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/SearchBar.css');const K=require("./chunks/index.CkihWzK6.js"),e=require("vue"),d=require("element-plus"),g=require("color-message-lingyun-vue"),o=require("color-star-custom-methods"),G=require("./chunks/layout.Ch_1hhpJ.js"),J=require("./chunks/layout.whToBh0O.js"),P=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),S=require("./chunks/layout.DDB7i4jV.js"),Q=[{type:"primary",label:"查询",value:o.operationConfigMap.search},{type:"default",label:"重置",value:o.operationConfigMap.reset,plain:!0}],F=320,x={__name:"OperationButtons",props:{operationList:{type:Array,default:()=>[]}},emits:[o.emitsMap.operation],setup(a,{emit:h}){const p=h,i=c=>{p(o.emitsMap.operation,c)};return(c,n)=>c.$slots.operation?e.renderSlot(c.$slots,"operation",{key:0,operationList:a.operationList}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.operationList,f=>(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:f.value,type:f.type,icon:f.icon,plain:f.plain,onClick:t=>i(f.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["type","icon","plain","onClick"]))),128))}},X=Object.assign({name:"FormWrapper"},{__name:"FormWrapper",props:{items:{type:Array,default:()=>[]},formData:{type:Object,default:()=>({})},rules:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:"auto"},labelPosition:{type:String,default:o.labelPositionMap.right},showLabel:{type:Boolean,default:!0},inline:{type:Boolean,default:!1},isFilter:{type:Boolean,default:!1},isFilterPreview:{type:Boolean,default:!1},minWidth:{type:Number,default:F},fixedWidth:{type:Boolean,default:!1}},emits:[o.emitsMap.change,o.emitsMap.enter],setup(a,{expose:h}){e.useCssVars(n=>({v38755745:a.minWidth+"px"}));const p=a,i=e.ref(null),c=e.computed(()=>p.isFilter?"filter-form":p.isFilterPreview?"filter-preview-form":p.fixedWidth?"search-bar-form search-bar-form-fixed":"search-bar-form");return h({validate:n=>i.value?i.value.validate(n):Promise.resolve(!0),resetFields:()=>{i.value&&i.value.resetFields()},clearValidate:n=>{i.value&&i.value.clearValidate(n)},scrollToField:n=>{i.value&&i.value.scrollToField(n)}}),(n,f)=>(e.openBlock(),e.createBlock(e.unref(d.ElForm),{ref_key:"formRef",ref:i,model:a.formData,"label-width":a.labelWidth,"label-position":a.labelPosition,inline:a.inline,rules:a.rules,class:e.normalizeClass({[c.value]:!0,"items-end display-grid":!a.isFilterPreview}),onSubmit:f[0]||(f[0]=e.withModifiers(()=>{},["prevent","stop"]))},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,t=>(e.openBlock(),e.createBlock(e.unref(d.ElFormItem),e.mergeProps({key:t.key,label:a.showLabel?t.label:"",prop:t.key,"show-label":a.showLabel,class:[{"search-bar-item--wide":t.wide}]},{ref_for:!0},t),{default:e.withCtx(()=>[e.renderSlot(n.$slots,t.key,{item:t,formData:a.formData},()=>[t.type===e.unref(o.componentType).text?(e.openBlock(),e.createBlock(e.unref(d.ElInput),e.mergeProps({key:0,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{class:"w-full",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key]),onKeyup:e.withKeys(l=>n.$emit(e.unref(o.emitsMap).enter,t.key,a.formData[t.key]),["enter"])}),null,16,["modelValue","onUpdate:modelValue","onChange","onKeyup"])):t.type===e.unref(o.componentType).select?(e.openBlock(),e.createBlock(G._sfc_main,e.mergeProps({key:1,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l,"static-options":t.options},{ref_for:!0},t,{onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key]),class:"w-full"}),null,16,["modelValue","onUpdate:modelValue","static-options","onChange"])):t.type===e.unref(o.componentType).date?(e.openBlock(),e.createBlock(e.unref(d.ElDatePicker),e.mergeProps({key:2,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},{...t,...e.unref(o.dateParamsMap)[t.dateType]},{type:t.dateType,format:t.format||e.unref(o.dateFormat).date,"value-format":t.valueFormat||e.unref(o.dateFormat).dateTime,class:"w-full",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])):t.type===e.unref(o.componentType).inputNumber?(e.openBlock(),e.createBlock(e.unref(d.ElInputNumber),e.mergeProps({key:3,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{class:"w-full",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).switch?(e.openBlock(),e.createBlock(e.unref(d.ElSwitch),e.mergeProps({key:4,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).radio?(e.openBlock(),e.createBlock(e.unref(d.ElRadioGroup),{key:5,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l,onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(e.unref(d.ElRadio),{key:l.value,label:l.value,value:l.value,disabled:l.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["label","value","disabled"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).checkbox?(e.openBlock(),e.createBlock(e.unref(d.ElCheckboxGroup),{key:6,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l,onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(e.unref(d.ElCheckbox),{key:l.value,label:l.value,value:l.value,disabled:l.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["label","value","disabled"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).textarea?(e.openBlock(),e.createBlock(e.unref(d.ElInput),e.mergeProps({key:7,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{class:"w-full",type:"textarea",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).upload?(e.openBlock(),e.createBlock(J._layout,e.mergeProps({key:8,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t),null,16,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],!0)]),_:2},1040,["label","prop","show-label","class"]))),128)),e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["model","label-width","label-position","inline","rules","class"]))}}),E=P._export_sfc(X,[["__scopeId","data-v-8adcd08b"]]),Y={class:"h-32 w-full"},Z={class:"flex items-center justify-between pd-b-20"},_={class:"text-right"},ee={class:"drawer-header"},te={class:"flex-1 pd-l-16 pd-r-16 overflow-y-auto"},ae={class:"text-right border-top pd-t-16 pd-l-16 pd-r-16"},le=Object.assign({name:"SearchBar"},{__name:"layout",props:{items:{type:Array,default:()=>[]},modelValue:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:"auto"},labelPosition:{type:String,default:o.labelPositionMap.right,validator:a=>[o.labelPositionMap.left,o.labelPositionMap.right,o.labelPositionMap.top].includes(a)},isExpand:{type:Boolean,default:!0},maxHeight:{type:Number,default:84},minWidth:{type:Number,default:F},operationList:{type:Array,default:Q},filterMode:{type:Boolean,default:!0},hideExpandButton:{type:Boolean,default:!0},fixedWidth:{type:Boolean,default:!1}},emits:[o.emitsMap.updateModelValue,o.emitsMap.operation,o.emitsMap.change],setup(a,{expose:h,emit:p}){e.useCssVars(r=>({c43334b4:a.maxHeight+"px",v002cf482:b.value?b.value+"px":"100%"}));const i=a,c=p,n=e.ref({}),f=e.ref(!i.isExpand),t=e.ref(null),l=e.ref(!1),y=e.ref(!1),V=e.ref(!1),W=e.computed(()=>{const r={};return i.items.forEach(u=>{if(u.required){const s=[{required:!0,message:`${u.label}不能为空`,trigger:"blur"}];typeof u.validator=="function"&&s.push({validator:u.validator,trigger:"blur"}),r[u.key]=s}}),r}),w=e.computed(()=>i.items?.filter(r=>!r.hidden)||[]),M=e.computed(()=>i.filterMode?w.value?.slice(0,2)||[]:w.value),k=e.computed(()=>i.filterMode?w.value.slice(2):[]),D=r=>{n.value={...r}},L=()=>{c(o.emitsMap.updateModelValue,{...n.value})},U=(r,u)=>{n.value[r]=u,V.value=!0,v(o.operationConfigMap.search),setTimeout(()=>{V.value=!1},200),C(r,u)},C=(r,u)=>{r&&c(o.emitsMap.change,r,u)},I=()=>n.value,B=(r,u)=>{V.value||c(o.emitsMap.operation,o.operationConfigMap.search,n.value)},v=r=>{L(),c(o.emitsMap.operation,r,n.value),(r===o.operationConfigMap.search||r===o.operationConfigMap.reset)&&(l.value=!1,y.value=!1)},z=r=>t.value.validate(r),b=e.ref(0),O=r=>{if(i.fixedWidth){b.value=132;return}b.value=r+32},R=()=>{f.value=!f.value},q=()=>{l.value=!1,y.value=!0},j=()=>{y.value=!1,l.value=!0},N=e.ref(!1),$=r=>{N.value=r>i.maxHeight},A=e.computed(()=>i.filterMode||f.value?"10px":"0");return e.onMounted(()=>{D(i.modelValue),$()}),e.watch(()=>i.modelValue,r=>{D(r)},{immediate:!0,deep:!0}),h({validate:z,getFormData:I,formRef:t}),(r,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative overflow-hidden w-full",{flex:a.filterMode}])},[e.createElementVNode("div",{class:e.normalizeClass({"is-collapsed overflow-hidden":!f.value})},[e.createVNode(e.unref(d.ElAutoResizer),null,{default:e.withCtx(({height:s})=>[e.createTextVNode(e.toDisplayString($(s))+" ",1),e.createVNode(E,{ref_key:"formRef",ref:t,items:M.value,"form-data":n.value,rules:W.value,"label-width":a.labelWidth,"label-position":a.labelPosition,inline:!0,"show-label":!a.filterMode,"min-width":a.minWidth,"is-filter-preview":a.filterMode,fixedWidth:a.fixedWidth,onChange:U,onEnter:B},e.createSlots({default:e.withCtx(()=>[a.isExpand&&!a.filterMode?(e.openBlock(),e.createBlock(e.unref(d.ElFormItem),{key:0,"label-width":"0"},{default:e.withCtx(()=>[e.createElementVNode("div",Y,[e.createVNode(e.unref(d.ElAutoResizer),null,{default:e.withCtx(({width:m})=>[e.createTextVNode(e.toDisplayString(O(m)),1)]),_:1})])]),_:1})):e.createCommentVNode("",!0)]),_:2},[e.renderList(M.value,m=>({name:m.key,fn:e.withCtx(H=>[e.renderSlot(r.$slots,m.key,e.normalizeProps(e.guardReactiveProps(H)),void 0,!0)])}))]),1032,["items","form-data","rules","label-width","label-position","show-label","min-width","is-filter-preview","fixedWidth"])]),_:3})],2),e.createElementVNode("div",{class:e.normalizeClass(["operation-buttons",{"absolute right-0 text-right":a.isExpand&&!a.filterMode,"text-left":a.filterMode,"bg-fff":a.isExpand&&!a.filterMode&&!a.fixedWidth}]),style:e.normalizeStyle({bottom:A.value})},[a.filterMode?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(d.ElButton),{onClick:u[0]||(u[0]=s=>v(e.unref(o.operationConfigMap).reset)),type:"default"},{default:e.withCtx(()=>[...u[3]||(u[3]=[e.createTextVNode("重置",-1)])]),_:1}),k.value?.length?(e.openBlock(),e.createBlock(e.unref(d.ElPopover),{key:0,visible:l.value,placement:"bottom-start",width:628,trigger:"click"},{reference:e.withCtx(()=>[e.createVNode(e.unref(d.ElButton),{onClick:u[1]||(u[1]=s=>l.value=!l.value),icon:e.unref(g.IconCheck),type:"default"},{default:e.withCtx(()=>[...u[4]||(u[4]=[e.createTextVNode(" 筛选器 ",-1)])]),_:1},8,["icon"])]),default:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createVNode(S.CustomTitle,{content:"筛选器",fontSize:16}),e.createVNode(e.unref(d.ElIcon),{size:16,onClick:q},{default:e.withCtx(()=>[e.createVNode(e.unref(g.IconMagnify))]),_:1})]),e.createVNode(E,{items:k.value,"form-data":n.value,"label-width":"auto","label-position":"top",inline:!1,"show-label":!0,"is-filter":!0,"min-width":a.minWidth,class:"filter-form-popover overflow-y-auto",onChange:C,onEnter:B},e.createSlots({_:2},[e.renderList(k.value,s=>({name:s.key,fn:e.withCtx(m=>[e.renderSlot(r.$slots,s.key,e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)])}))]),1032,["items","form-data","min-width"]),e.createElementVNode("div",_,[e.createVNode(x,{"operation-list":a.operationList,onOperation:v},e.createSlots({_:2},[r.$slots.operation?{name:"operation",fn:e.withCtx(({operationList:s})=>[e.renderSlot(r.$slots,"operation",{operationList:s},void 0,!0)]),key:"0"}:void 0]),1032,["operation-list"])])]),_:3},8,["visible"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[N.value&&a.isExpand&&a.hideExpandButton?(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:0,icon:f.value?e.unref(g.IconUp):e.unref(g.IconDown),text:"",onClick:R},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value?"收起":"展开"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0),e.createVNode(x,{"operation-list":a.operationList,onOperation:v},e.createSlots({_:2},[r.$slots.operation?{name:"operation",fn:e.withCtx(({operationList:s})=>[e.renderSlot(r.$slots,"operation",{operationList:s},void 0,!0)]),key:"0"}:void 0]),1032,["operation-list"])],64))],6),e.createVNode(e.unref(d.ElDrawer),{modelValue:y.value,"onUpdate:modelValue":u[2]||(u[2]=s=>y.value=s),size:"628","show-close":!1},{header:e.withCtx(()=>[e.createElementVNode("div",ee,[e.createVNode(S.CustomTitle,{content:"筛选器",fontSize:16}),e.createVNode(e.unref(d.ElIcon),{size:16,onClick:j,class:"shrink-button"},{default:e.withCtx(()=>[e.createVNode(e.unref(g.IconShrink))]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",te,[e.createVNode(E,{items:k.value,"form-data":n.value,"label-width":"auto","label-position":"top",inline:!1,"show-label":!0,"is-filter":!0,"min-width":a.minWidth,onChange:C,onEnter:B},e.createSlots({_:2},[e.renderList(k.value,s=>({name:s.key,fn:e.withCtx(m=>[e.renderSlot(r.$slots,s.key,e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)])}))]),1032,["items","form-data","min-width"])]),e.createElementVNode("div",ae,[e.createVNode(x,{"operation-list":a.operationList,onOperation:v},e.createSlots({_:2},[r.$slots.operation?{name:"operation",fn:e.withCtx(({operationList:s})=>[e.renderSlot(r.$slots,"operation",{operationList:s},void 0,!0)]),key:"0"}:void 0]),1032,["operation-list"])])]),_:3},8,["modelValue"])],2))}}),oe=P._export_sfc(le,[["__scopeId","data-v-3877c183"]]),T=K.withInstall(oe);exports.SearchBar=T;exports.default=T;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/SearchBar.css');const K=require("./chunks/index.CkihWzK6.js"),e=require("vue"),d=require("element-plus"),g=require("color-message-lingyun-vue"),o=require("color-star-custom-methods"),G=require("./chunks/layout.Ch_1hhpJ.js"),J=require("./chunks/layout.whToBh0O.js"),P=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),S=require("./chunks/layout.DDB7i4jV.js"),Q=[{type:"primary",label:"查询",value:o.operationConfigMap.search},{type:"default",label:"重置",value:o.operationConfigMap.reset,plain:!0}],F=320,x={__name:"OperationButtons",props:{operationList:{type:Array,default:()=>[]}},emits:[o.emitsMap.operation],setup(a,{emit:h}){const p=h,i=c=>{p(o.emitsMap.operation,c)};return(c,n)=>c.$slots.operation?e.renderSlot(c.$slots,"operation",{key:0,operationList:a.operationList}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(a.operationList,f=>(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:f.value,type:f.type,icon:f.icon,plain:f.plain,onClick:t=>i(f.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["type","icon","plain","onClick"]))),128))}},X=Object.assign({name:"FormWrapper"},{__name:"FormWrapper",props:{items:{type:Array,default:()=>[]},formData:{type:Object,default:()=>({})},rules:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:"auto"},labelPosition:{type:String,default:o.labelPositionMap.right},showLabel:{type:Boolean,default:!0},inline:{type:Boolean,default:!1},isFilter:{type:Boolean,default:!1},isFilterPreview:{type:Boolean,default:!1},minWidth:{type:Number,default:F},fixedWidth:{type:Boolean,default:!1}},emits:[o.emitsMap.change,o.emitsMap.enter],setup(a,{expose:h}){e.useCssVars(n=>({v1bc7ee80:a.minWidth+"px"}));const p=a,i=e.ref(null),c=e.computed(()=>p.isFilter?"filter-form":p.isFilterPreview?"filter-preview-form":p.fixedWidth?"search-bar-form search-bar-form-fixed":"search-bar-form");return h({validate:n=>i.value?i.value.validate(n):Promise.resolve(!0),resetFields:()=>{i.value&&i.value.resetFields()},clearValidate:n=>{i.value&&i.value.clearValidate(n)},scrollToField:n=>{i.value&&i.value.scrollToField(n)}}),(n,f)=>(e.openBlock(),e.createBlock(e.unref(d.ElForm),{ref_key:"formRef",ref:i,model:a.formData,"label-width":a.labelWidth,"label-position":a.labelPosition,inline:a.inline,rules:a.rules,class:e.normalizeClass({[c.value]:!0,"items-end display-grid":!a.isFilterPreview}),onSubmit:f[0]||(f[0]=e.withModifiers(()=>{},["prevent","stop"]))},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.items,t=>(e.openBlock(),e.createBlock(e.unref(d.ElFormItem),e.mergeProps({key:t.key,label:a.showLabel?t.label:"",prop:t.key,"show-label":a.showLabel,class:[{"search-bar-item--wide":t.wide}]},{ref_for:!0},t),{default:e.withCtx(()=>[e.renderSlot(n.$slots,t.key,{item:t,formData:a.formData},()=>[t.type===e.unref(o.componentType).text?(e.openBlock(),e.createBlock(e.unref(d.ElInput),e.mergeProps({key:0,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{class:"w-full",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key]),onKeyup:e.withKeys(l=>n.$emit(e.unref(o.emitsMap).enter,t.key,a.formData[t.key]),["enter"])}),null,16,["modelValue","onUpdate:modelValue","onChange","onKeyup"])):t.type===e.unref(o.componentType).select?(e.openBlock(),e.createBlock(G._sfc_main,e.mergeProps({key:1,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l,"static-options":t.options},{ref_for:!0},t,{onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key]),class:"w-full"}),null,16,["modelValue","onUpdate:modelValue","static-options","onChange"])):t.type===e.unref(o.componentType).date?(e.openBlock(),e.createBlock(e.unref(d.ElDatePicker),e.mergeProps({key:2,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},{...e.unref(o.dateParamsMap)[t.dateType],...t},{type:t.dateType,format:t.format||e.unref(o.dateFormat).date,"value-format":t.valueFormat||e.unref(o.dateFormat).dateTime,class:"w-full",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])):t.type===e.unref(o.componentType).inputNumber?(e.openBlock(),e.createBlock(e.unref(d.ElInputNumber),e.mergeProps({key:3,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{class:"w-full",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).switch?(e.openBlock(),e.createBlock(e.unref(d.ElSwitch),e.mergeProps({key:4,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).radio?(e.openBlock(),e.createBlock(e.unref(d.ElRadioGroup),{key:5,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l,onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(e.unref(d.ElRadio),{key:l.value,label:l.value,value:l.value,disabled:l.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["label","value","disabled"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).checkbox?(e.openBlock(),e.createBlock(e.unref(d.ElCheckboxGroup),{key:6,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l,onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(e.unref(d.ElCheckbox),{key:l.value,label:l.value,value:l.value,disabled:l.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["label","value","disabled"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).textarea?(e.openBlock(),e.createBlock(e.unref(d.ElInput),e.mergeProps({key:7,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{class:"w-full",type:"textarea",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).upload?(e.openBlock(),e.createBlock(J._layout,e.mergeProps({key:8,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t),null,16,["modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)],!0)]),_:2},1040,["label","prop","show-label","class"]))),128)),e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},8,["model","label-width","label-position","inline","rules","class"]))}}),E=P._export_sfc(X,[["__scopeId","data-v-79352bf5"]]),Y={class:"h-32 w-full"},Z={class:"flex items-center justify-between pd-b-20"},_={class:"text-right"},ee={class:"drawer-header"},te={class:"flex-1 pd-l-16 pd-r-16 overflow-y-auto"},ae={class:"text-right border-top pd-t-16 pd-l-16 pd-r-16"},le=Object.assign({name:"SearchBar"},{__name:"layout",props:{items:{type:Array,default:()=>[]},modelValue:{type:Object,default:()=>({})},labelWidth:{type:[String,Number],default:"auto"},labelPosition:{type:String,default:o.labelPositionMap.right,validator:a=>[o.labelPositionMap.left,o.labelPositionMap.right,o.labelPositionMap.top].includes(a)},isExpand:{type:Boolean,default:!0},maxHeight:{type:Number,default:84},minWidth:{type:Number,default:F},operationList:{type:Array,default:Q},filterMode:{type:Boolean,default:!0},hideExpandButton:{type:Boolean,default:!0},fixedWidth:{type:Boolean,default:!1}},emits:[o.emitsMap.updateModelValue,o.emitsMap.operation,o.emitsMap.change],setup(a,{expose:h,emit:p}){e.useCssVars(r=>({c43334b4:a.maxHeight+"px",v002cf482:b.value?b.value+"px":"100%"}));const i=a,c=p,n=e.ref({}),f=e.ref(!i.isExpand),t=e.ref(null),l=e.ref(!1),y=e.ref(!1),V=e.ref(!1),W=e.computed(()=>{const r={};return i.items.forEach(u=>{if(u.required){const s=[{required:!0,message:`${u.label}不能为空`,trigger:"blur"}];typeof u.validator=="function"&&s.push({validator:u.validator,trigger:"blur"}),r[u.key]=s}}),r}),w=e.computed(()=>i.items?.filter(r=>!r.hidden)||[]),M=e.computed(()=>i.filterMode?w.value?.slice(0,2)||[]:w.value),k=e.computed(()=>i.filterMode?w.value.slice(2):[]),D=r=>{n.value={...r}},L=()=>{c(o.emitsMap.updateModelValue,{...n.value})},U=(r,u)=>{n.value[r]=u,V.value=!0,v(o.operationConfigMap.search),setTimeout(()=>{V.value=!1},200),C(r,u)},C=(r,u)=>{r&&c(o.emitsMap.change,r,u)},I=()=>n.value,B=(r,u)=>{V.value||c(o.emitsMap.operation,o.operationConfigMap.search,n.value)},v=r=>{L(),c(o.emitsMap.operation,r,n.value),(r===o.operationConfigMap.search||r===o.operationConfigMap.reset)&&(l.value=!1,y.value=!1)},z=r=>t.value.validate(r),b=e.ref(0),O=r=>{if(i.fixedWidth){b.value=132;return}b.value=r+32},R=()=>{f.value=!f.value},q=()=>{l.value=!1,y.value=!0},j=()=>{y.value=!1,l.value=!0},N=e.ref(!1),$=r=>{N.value=r>i.maxHeight},A=e.computed(()=>i.filterMode||f.value?"10px":"0");return e.onMounted(()=>{D(i.modelValue),$()}),e.watch(()=>i.modelValue,r=>{D(r)},{immediate:!0,deep:!0}),h({validate:z,getFormData:I,formRef:t}),(r,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative overflow-hidden w-full",{flex:a.filterMode}])},[e.createElementVNode("div",{class:e.normalizeClass({"is-collapsed overflow-hidden":!f.value})},[e.createVNode(e.unref(d.ElAutoResizer),null,{default:e.withCtx(({height:s})=>[e.createTextVNode(e.toDisplayString($(s))+" ",1),e.createVNode(E,{ref_key:"formRef",ref:t,items:M.value,"form-data":n.value,rules:W.value,"label-width":a.labelWidth,"label-position":a.labelPosition,inline:!0,"show-label":!a.filterMode,"min-width":a.minWidth,"is-filter-preview":a.filterMode,fixedWidth:a.fixedWidth,onChange:U,onEnter:B},e.createSlots({default:e.withCtx(()=>[a.isExpand&&!a.filterMode?(e.openBlock(),e.createBlock(e.unref(d.ElFormItem),{key:0,"label-width":"0"},{default:e.withCtx(()=>[e.createElementVNode("div",Y,[e.createVNode(e.unref(d.ElAutoResizer),null,{default:e.withCtx(({width:m})=>[e.createTextVNode(e.toDisplayString(O(m)),1)]),_:1})])]),_:1})):e.createCommentVNode("",!0)]),_:2},[e.renderList(M.value,m=>({name:m.key,fn:e.withCtx(H=>[e.renderSlot(r.$slots,m.key,e.normalizeProps(e.guardReactiveProps(H)),void 0,!0)])}))]),1032,["items","form-data","rules","label-width","label-position","show-label","min-width","is-filter-preview","fixedWidth"])]),_:3})],2),e.createElementVNode("div",{class:e.normalizeClass(["operation-buttons",{"absolute right-0 text-right":a.isExpand&&!a.filterMode,"text-left":a.filterMode,"bg-fff":a.isExpand&&!a.filterMode&&!a.fixedWidth}]),style:e.normalizeStyle({bottom:A.value})},[a.filterMode?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(d.ElButton),{onClick:u[0]||(u[0]=s=>v(e.unref(o.operationConfigMap).reset)),type:"default"},{default:e.withCtx(()=>[...u[3]||(u[3]=[e.createTextVNode("重置",-1)])]),_:1}),k.value?.length?(e.openBlock(),e.createBlock(e.unref(d.ElPopover),{key:0,visible:l.value,placement:"bottom-start",width:628,trigger:"click"},{reference:e.withCtx(()=>[e.createVNode(e.unref(d.ElButton),{onClick:u[1]||(u[1]=s=>l.value=!l.value),icon:e.unref(g.IconCheck),type:"default"},{default:e.withCtx(()=>[...u[4]||(u[4]=[e.createTextVNode(" 筛选器 ",-1)])]),_:1},8,["icon"])]),default:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createVNode(S.CustomTitle,{content:"筛选器",fontSize:16}),e.createVNode(e.unref(d.ElIcon),{size:16,onClick:q},{default:e.withCtx(()=>[e.createVNode(e.unref(g.IconMagnify))]),_:1})]),e.createVNode(E,{items:k.value,"form-data":n.value,"label-width":"auto","label-position":"top",inline:!1,"show-label":!0,"is-filter":!0,"min-width":a.minWidth,class:"filter-form-popover overflow-y-auto",onChange:C,onEnter:B},e.createSlots({_:2},[e.renderList(k.value,s=>({name:s.key,fn:e.withCtx(m=>[e.renderSlot(r.$slots,s.key,e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)])}))]),1032,["items","form-data","min-width"]),e.createElementVNode("div",_,[e.createVNode(x,{"operation-list":a.operationList,onOperation:v},e.createSlots({_:2},[r.$slots.operation?{name:"operation",fn:e.withCtx(({operationList:s})=>[e.renderSlot(r.$slots,"operation",{operationList:s},void 0,!0)]),key:"0"}:void 0]),1032,["operation-list"])])]),_:3},8,["visible"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[N.value&&a.isExpand&&a.hideExpandButton?(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:0,icon:f.value?e.unref(g.IconUp):e.unref(g.IconDown),text:"",onClick:R},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value?"收起":"展开"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0),e.createVNode(x,{"operation-list":a.operationList,onOperation:v},e.createSlots({_:2},[r.$slots.operation?{name:"operation",fn:e.withCtx(({operationList:s})=>[e.renderSlot(r.$slots,"operation",{operationList:s},void 0,!0)]),key:"0"}:void 0]),1032,["operation-list"])],64))],6),e.createVNode(e.unref(d.ElDrawer),{modelValue:y.value,"onUpdate:modelValue":u[2]||(u[2]=s=>y.value=s),size:"628","show-close":!1},{header:e.withCtx(()=>[e.createElementVNode("div",ee,[e.createVNode(S.CustomTitle,{content:"筛选器",fontSize:16}),e.createVNode(e.unref(d.ElIcon),{size:16,onClick:j,class:"shrink-button"},{default:e.withCtx(()=>[e.createVNode(e.unref(g.IconShrink))]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",te,[e.createVNode(E,{items:k.value,"form-data":n.value,"label-width":"auto","label-position":"top",inline:!1,"show-label":!0,"is-filter":!0,"min-width":a.minWidth,onChange:C,onEnter:B},e.createSlots({_:2},[e.renderList(k.value,s=>({name:s.key,fn:e.withCtx(m=>[e.renderSlot(r.$slots,s.key,e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)])}))]),1032,["items","form-data","min-width"])]),e.createElementVNode("div",ae,[e.createVNode(x,{"operation-list":a.operationList,onOperation:v},e.createSlots({_:2},[r.$slots.operation?{name:"operation",fn:e.withCtx(({operationList:s})=>[e.renderSlot(r.$slots,"operation",{operationList:s},void 0,!0)]),key:"0"}:void 0]),1032,["operation-list"])])]),_:3},8,["modelValue"])],2))}}),oe=P._export_sfc(le,[["__scopeId","data-v-3877c183"]]),T=K.withInstall(oe);exports.SearchBar=T;exports.default=T;
|
package/lib/TreeSelect.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./chunks/index.CkihWzK6.js"),l=require("./chunks/layout.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./chunks/index.CkihWzK6.js"),l=require("./chunks/layout.00bu3jNF.js"),e=t.withInstall(l.TreeSelect);exports.TreeSelect=e;exports.default=e;
|
package/lib/TreeShowSelect.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/TreeShowSelect.css');const V=require("./chunks/index.CkihWzK6.js"),e=require("vue"),b=require("element-plus"),h=require("./chunks/layout.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/TreeShowSelect.css');const V=require("./chunks/index.CkihWzK6.js"),e=require("vue"),b=require("element-plus"),h=require("./chunks/layout.00bu3jNF.js"),w=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),y={class:"left-box w-50-percent flex flex-col overflow-hidden"},T={class:"head-box fz-14 pd-t-8 pd-b-8 pd-l-12 pd-r-12 mg-b-8 text-202434"},k={class:"pd-r-12 pd-l-12 flex-1 overflow-hidden"},P={class:"right-box w-50-percent flex flex-col overflow-hidden"},C={class:"head-box fz-14 pd-t-8 pd-b-8 pd-l-12 pd-r-12 mg-b-8 text-202434"},E={class:"pd-r-12 pd-l-12 flex-1 selected-list overflow-hidden pd-t-8"},D=Object.assign({name:"TreeShowSelect"},{__name:"layout",props:{modelValue:{type:Object,default:()=>[]},rightTreeList:{type:Array,default:()=>[]}},emits:["getCheckedNode"],setup(m,{emit:v}){const r=m,_=v,s=e.useAttrs(),n=e.ref(),N=e.computed(()=>s.treeProps?s.treeProps:{value:"id",label:"label",children:"children"}),p=t=>String(t).includes("%")?t:t+"px",l=e.ref([]),a=e.computed(()=>r.rightTreeList&&r.rightTreeList.length>0?r.rightTreeList:l.value),g=t=>{const{selectedNode:o,selectedValue:c,selectedParentNodes:i}=t;l.value=o,_("getCheckedNode",{selectedValue:c,selectedNode:o,selectedParentNodes:i})},x=t=>{n.value?.setNodeCheckStatus(t[N.value.value],!1)},S=t=>{l.value=t||[]};return e.watch(()=>r.modelValue,t=>{S(t)},{immediate:!0,deep:!0}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(b.ElAutoResizer),null,{default:e.withCtx(({width:c,height:i})=>[e.createElementVNode("div",{class:"out-box flex radius-8 text-202434 overflow-hidden",style:e.normalizeStyle({width:p(c),height:p(i)})},[e.createElementVNode("div",y,[e.createElementVNode("div",T,e.toDisplayString(n.value&&n.value.allNodeNumbers||0)+"项 ",1),e.createElementVNode("div",k,[e.createVNode(h.TreeSelect,e.mergeProps({modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=d=>l.value=d),ref_key:"treeRef",ref:n},e.unref(s),{onHandleCheck:g}),{node:e.withCtx(({node:d,data:u})=>[e.renderSlot(t.$slots,"node",{node:d,data:u,checkedNodes:l.value},void 0,!0)]),_:3},16,["modelValue"])])]),e.createElementVNode("div",P,[e.createElementVNode("div",C,e.toDisplayString(a.value.length)+"项 ",1),e.createElementVNode("div",E,[e.createVNode(h.TreeSelect,{modelValue:l.value,"onUpdate:modelValue":o[1]||(o[1]=d=>l.value=d),class:"tree-select-list",treeProps:e.unref(s).treeProps,treeList:a.value,isListMode:!0,isMultiple:!1,onHandleDeleteNode:x},{node:e.withCtx(({node:d,data:u})=>[e.renderSlot(t.$slots,"node",{node:d,data:u,checkedNodes:a.value},void 0,!0)]),_:3},8,["modelValue","treeProps","treeList"])])])],4)]),_:3}))}}),L=w._export_sfc(D,[["__scopeId","data-v-966c45c7"]]),f=V.withInstall(L);exports.TreeShowSelect=f;exports.default=f;
|
package/lib/assets/SearchBar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.filter-form[data-v-
|
|
1
|
+
.filter-form[data-v-79352bf5]{grid-template-columns:repeat(2,1fr);gap:10px}.filter-preview-form[data-v-79352bf5]{display:flex}.filter-preview-form .el-form-item[data-v-79352bf5]{width:var(--v1bc7ee80);margin-right:10px}.search-bar-form[data-v-79352bf5]{grid-template-columns:repeat(auto-fit,minmax(var(--v1bc7ee80),1fr));gap:10px}.search-bar-form.search-bar-form-fixed[data-v-79352bf5]{grid-template-columns:repeat(auto-fit,var(--v1bc7ee80))}.search-bar-form.search-bar-form-fixed.el-form--inline .el-form-item[data-v-79352bf5]{margin-bottom:18px}.search-bar-form.el-form--inline .el-form-item[data-v-79352bf5]{margin-right:0;margin-bottom:10px}.search-bar-form.el-form--inline .el-form-item.el-form-item--label-left[data-v-79352bf5]{display:flex;padding:0 14px;background:var(--neutral-color-18);border-radius:8px;border:1px solid var(--parting-line)}.search-bar-form.el-form--inline .el-form-item.el-form-item--label-left[data-v-79352bf5] .el-form-item__content{justify-content:end}.search-bar-form.el-form--inline.el-form--label-top[data-v-79352bf5]{display:grid}.search-bar-item--wide[data-v-79352bf5]{grid-column:span 2}.is-collapsed[data-v-3877c183]{max-height:var(--c43334b4)}.operation-buttons[data-v-3877c183]{width:var(--v002cf482);z-index:1}.h-32[data-v-3877c183]{height:32px}.drawer-header[data-v-3877c183]{display:flex;justify-content:space-between;align-items:center;width:100%}.drawer-header .shrink-button[data-v-3877c183]{margin-left:auto}.border-top[data-v-3877c183]{border-top:1px solid var(--parting-line)}[data-v-3877c183] .el-drawer__body{padding:16px 0;display:flex;flex-direction:column;overflow:hidden}.filter-form-popover[data-v-3877c183]{max-height:400px}[data-v-3877c183] .el-drawer__header{margin-bottom:0;padding:16px 16px 0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.w-50-percent[data-v-
|
|
1
|
+
.w-50-percent[data-v-966c45c7]{width:50%}.out-box[data-v-966c45c7]{border:1px solid var(--parting-line)}.out-box .head-box[data-v-966c45c7]{border-bottom:1px solid var(--parting-line)}.out-box .left-box[data-v-966c45c7]{border-right:1px solid var(--parting-line)}.out-box .selected-list .selected-item[data-v-966c45c7]{height:32px}.out-box .selected-list .selected-item[data-v-966c45c7]:hover{background:var(--primary-color-5)}.out-box .selected-list .virtual-scroller[data-v-966c45c7]{height:100%}.tree-select-list[data-v-966c45c7] .el-tree-node__content{margin-bottom:8px;padding:4px 0;height:32px;border-radius:8px}
|
package/lib/assets/layout2.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.el-tree .el-tree-node__content{position:relative}.element-tree-node-label-wrapper{flex:1;display:flex;align-items:center}.element-tree-node-label{font-size:12px}.element-tree-node-line-ver{display:block;position:absolute;top:0;left:0;height:100%;border-left:1px dashed #dcdfe6}.element-tree-node-line-ver.last-node-isLeaf-line{height:50%}.element-tree-node-line-hor{display:block;position:absolute;top:50%;left:0;height:0;border-bottom:1px dashed #dcdfe6}.element-tree-node-label-line{flex:1;border-top:1px dashed #dcdfe6;align-self:center;margin:0 10px}[data-v-
|
|
1
|
+
.el-tree .el-tree-node__content{position:relative}.element-tree-node-label-wrapper{flex:1;display:flex;align-items:center}.element-tree-node-label{font-size:12px}.element-tree-node-line-ver{display:block;position:absolute;top:0;left:0;height:100%;border-left:1px dashed #dcdfe6}.element-tree-node-line-ver.last-node-isLeaf-line{height:50%}.element-tree-node-line-hor{display:block;position:absolute;top:50%;left:0;height:0;border-bottom:1px dashed #dcdfe6}.element-tree-node-label-line{flex:1;border-top:1px dashed #dcdfe6;align-self:center;margin:0 10px}[data-v-1466e8fd] .el-tree-node__label{line-height:22px}[data-v-1466e8fd] .el-tree-node:focus>.el-tree-node__content{background-color:transparent}[data-v-1466e8fd] .el-tree-node__content{border-radius:8px}[data-v-1466e8fd] .el-tree-node__content:hover{background-color:var(--primary-color-5)}[data-v-1466e8fd] .element-tree-node-label{font-size:14px}.list-item[data-v-1466e8fd]{height:32px}.list-item[data-v-1466e8fd]:hover{background:var(--primary-color-5)}[data-v-1466e8fd] .element-tree-node-line-ver,[data-v-1466e8fd] .element-tree-node-line-hor{border-color:var(--neutral-color-19)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e={lingyun:"lingyun",aibox:"aibox"},t=async n=>{switch(n){case e.lingyun:return await Promise.resolve().then(()=>require("./global.lWIoINdc.js"));case e.aibox:return await Promise.resolve().then(()=>require("./global.DzBTkIU5.js"))}return null},i=async(n,r)=>{if(!r)return null;try{return(await t(n))[r]||null}catch(o){return console.warn(`Failed to load icon ${r} from ${n} library:`,o),null}};exports.getIconComponent=i;exports.getIconLibrary=t;exports.iconLibraryMap=e;
|