yc-vep-ui 0.0.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.
@@ -0,0 +1,1438 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createPropsRestProxy as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, h as d, mergeModels as f, mergeProps as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, onUnmounted as y, openBlock as b, reactive as x, ref as S, renderList as C, renderSlot as w, resolveComponent as T, resolveDirective as E, resolveDynamicComponent as D, setBlockTracking as O, toDisplayString as k, toValue as A, unref as j, useCssVars as ee, useModel as M, watch as N, watchEffect as te, withCtx as P, withDirectives as F } from "vue";
2
+ import { ElButton as I, ElDatePicker as L, ElInput as ne, ElInputNumber as re, ElInputTag as ie, ElLink as ae, ElMessageBox as oe, ElRadioGroup as se, ElSelect as ce, ElTag as R, ElText as z, ElTimeSelect as le } from "element-plus";
3
+ import { AiEditor as ue } from "aieditor";
4
+ import { init as de } from "echarts";
5
+ //#region src/components/Card/index.vue?vue&type=script&setup=true&lang.ts
6
+ var fe = { class: /* @__PURE__ */ h({ bodyClass: !0 }) }, pe = /* @__PURE__ */ u({
7
+ __name: "index",
8
+ props: {
9
+ title: {},
10
+ bodyClass: {},
11
+ hideBorder: { type: Boolean },
12
+ icon: {}
13
+ },
14
+ setup(e) {
15
+ let i = t(() => ({
16
+ display: "flex",
17
+ alignItems: "center",
18
+ gap: "4px",
19
+ borderBottom: e.hideBorder ? "1px solid #e5e7eb" : "none"
20
+ }));
21
+ return (t, o) => {
22
+ let l = T("el-icon"), u = T("el-card");
23
+ return b(), n(u, p(t.$attrs, { class: {
24
+ "ui-card": !0,
25
+ hideBorder: e.hideBorder
26
+ } }), s({
27
+ default: P(() => [a("div", fe, [w(t.$slots, "default", {}, void 0, !0)])]),
28
+ _: 2
29
+ }, [e.title && e.title?.length > 0 ? {
30
+ name: "header",
31
+ fn: P(() => [a("div", { style: g(i.value) }, [e.icon ? (b(), n(l, { key: 0 }, {
32
+ default: P(() => [(b(), n(D(e.icon), { color: "#2563eb" }))]),
33
+ _: 1
34
+ })) : r("", !0), o[0] || (O(-1, !0), (o[0] = a("h4", null, [c(k(e.title), 1)])).cacheIndex = 0, O(1), o[0])], 4)]),
35
+ key: "0"
36
+ } : void 0]), 1040, ["class"]);
37
+ };
38
+ }
39
+ }), B = (e, t) => {
40
+ let n = e.__vccOpts || e;
41
+ for (let [e, r] of t) n[e] = r;
42
+ return n;
43
+ }, V = /* @__PURE__ */ B(pe, [["__scopeId", "data-v-ae248017"]]), me = /* @__PURE__ */ u({
44
+ name: "ArrowRight",
45
+ __name: "arrow-right",
46
+ setup(e) {
47
+ return (e, t) => (b(), i("svg", {
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ viewBox: "0 0 1024 1024"
50
+ }, [a("path", {
51
+ fill: "currentColor",
52
+ d: "M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
53
+ })]));
54
+ }
55
+ }), he = /* @__PURE__ */ u({
56
+ name: "ArrowUp",
57
+ __name: "arrow-up",
58
+ setup(e) {
59
+ return (e, t) => (b(), i("svg", {
60
+ xmlns: "http://www.w3.org/2000/svg",
61
+ viewBox: "0 0 1024 1024"
62
+ }, [a("path", {
63
+ fill: "currentColor",
64
+ d: "m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"
65
+ })]));
66
+ }
67
+ }), ge = /* @__PURE__ */ u({
68
+ name: "CirclePlus",
69
+ __name: "circle-plus",
70
+ setup(e) {
71
+ return (e, t) => (b(), i("svg", {
72
+ xmlns: "http://www.w3.org/2000/svg",
73
+ viewBox: "0 0 1024 1024"
74
+ }, [
75
+ a("path", {
76
+ fill: "currentColor",
77
+ d: "M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"
78
+ }),
79
+ a("path", {
80
+ fill: "currentColor",
81
+ d: "M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"
82
+ }),
83
+ a("path", {
84
+ fill: "currentColor",
85
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
86
+ })
87
+ ]));
88
+ }
89
+ }), _e = /* @__PURE__ */ u({
90
+ name: "Delete",
91
+ __name: "delete",
92
+ setup(e) {
93
+ return (e, t) => (b(), i("svg", {
94
+ xmlns: "http://www.w3.org/2000/svg",
95
+ viewBox: "0 0 1024 1024"
96
+ }, [a("path", {
97
+ fill: "currentColor",
98
+ d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"
99
+ })]));
100
+ }
101
+ }), ve = /* @__PURE__ */ u({
102
+ name: "DocumentAdd",
103
+ __name: "document-add",
104
+ setup(e) {
105
+ return (e, t) => (b(), i("svg", {
106
+ xmlns: "http://www.w3.org/2000/svg",
107
+ viewBox: "0 0 1024 1024"
108
+ }, [a("path", {
109
+ fill: "currentColor",
110
+ d: "M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m320 512V448h64v128h128v64H544v128h-64V640H352v-64z"
111
+ })]));
112
+ }
113
+ }), ye = /* @__PURE__ */ u({
114
+ name: "Edit",
115
+ __name: "edit",
116
+ setup(e) {
117
+ return (e, t) => (b(), i("svg", {
118
+ xmlns: "http://www.w3.org/2000/svg",
119
+ viewBox: "0 0 1024 1024"
120
+ }, [a("path", {
121
+ fill: "currentColor",
122
+ d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"
123
+ }), a("path", {
124
+ fill: "currentColor",
125
+ d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
126
+ })]));
127
+ }
128
+ }), be = /* @__PURE__ */ u({
129
+ name: "Folder",
130
+ __name: "folder",
131
+ setup(e) {
132
+ return (e, t) => (b(), i("svg", {
133
+ xmlns: "http://www.w3.org/2000/svg",
134
+ viewBox: "0 0 1024 1024"
135
+ }, [a("path", {
136
+ fill: "currentColor",
137
+ d: "M128 192v640h768V320H485.76L357.504 192zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32"
138
+ })]));
139
+ }
140
+ }), xe = /* @__PURE__ */ u({
141
+ name: "MoreFilled",
142
+ __name: "more-filled",
143
+ setup(e) {
144
+ return (e, t) => (b(), i("svg", {
145
+ xmlns: "http://www.w3.org/2000/svg",
146
+ viewBox: "0 0 1024 1024"
147
+ }, [a("path", {
148
+ fill: "currentColor",
149
+ d: "M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"
150
+ })]));
151
+ }
152
+ }), Se = /* @__PURE__ */ u({
153
+ name: "Promotion",
154
+ __name: "promotion",
155
+ setup(e) {
156
+ return (e, t) => (b(), i("svg", {
157
+ xmlns: "http://www.w3.org/2000/svg",
158
+ viewBox: "0 0 1024 1024"
159
+ }, [a("path", {
160
+ fill: "currentColor",
161
+ d: "m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"
162
+ })]));
163
+ }
164
+ }), H = /* @__PURE__ */ u({
165
+ name: "Refresh",
166
+ __name: "refresh",
167
+ setup(e) {
168
+ return (e, t) => (b(), i("svg", {
169
+ xmlns: "http://www.w3.org/2000/svg",
170
+ viewBox: "0 0 1024 1024"
171
+ }, [a("path", {
172
+ fill: "currentColor",
173
+ d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
174
+ })]));
175
+ }
176
+ }), Ce = /* @__PURE__ */ u({
177
+ name: "Search",
178
+ __name: "search",
179
+ setup(e) {
180
+ return (e, t) => (b(), i("svg", {
181
+ xmlns: "http://www.w3.org/2000/svg",
182
+ viewBox: "0 0 1024 1024"
183
+ }, [a("path", {
184
+ fill: "currentColor",
185
+ d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"
186
+ })]));
187
+ }
188
+ });
189
+ //#endregion
190
+ //#region src/components/utils/tools.ts
191
+ function we(e) {
192
+ return typeof e == "number" ? e + "px" : e || "100px";
193
+ }
194
+ function U(e) {
195
+ return typeof e == "number" ? e + "px" : e || "180px";
196
+ }
197
+ function W(e, t) {
198
+ let n = {};
199
+ return Object.keys(Q).forEach((r) => {
200
+ let i = r;
201
+ n[i] = (n = {}) => ({
202
+ props: {
203
+ prop: e.prop,
204
+ ...n,
205
+ "onUpdate:modelValue": (n) => t[e.prop] = n,
206
+ onChange: (r) => n.onChange?.(r) || (t[e.prop] = r)
207
+ },
208
+ type: i,
209
+ component: Q[i]
210
+ });
211
+ }), ((n) => typeof e.render == "function" ? e.render({
212
+ h: n,
213
+ data: t
214
+ }) : n.input(n.props || {}))(n);
215
+ }
216
+ function G(e, t) {
217
+ let n = W(e, t);
218
+ return typeof n == "object" && (n.component ||= n), n;
219
+ }
220
+ //#endregion
221
+ //#region src/components/Filter/index.vue?vue&type=script&setup=true&lang.ts
222
+ var Te = { class: "flex flex-row justify-end items-center w-full" }, K = /* @__PURE__ */ B(/* @__PURE__ */ u({
223
+ name: "UiDefaultFilter",
224
+ __name: "index",
225
+ props: {
226
+ type: {},
227
+ size: { default: "default" },
228
+ fields: {},
229
+ expandNum: {},
230
+ valueWidth: { default: "100%" },
231
+ labelWidth: { default: "100px" },
232
+ omitFields: { default: () => [] },
233
+ rules: {},
234
+ required: { type: Boolean },
235
+ column: { default: 4 },
236
+ filterFixedValues: { default: () => ({ page: 1 }) }
237
+ },
238
+ emits: [
239
+ "submit",
240
+ "reset",
241
+ "search"
242
+ ],
243
+ setup(s, { emit: u }) {
244
+ let d = u, f = o(s, [
245
+ "fields",
246
+ "labelWidth",
247
+ "valueWidth",
248
+ "omitFields",
249
+ "column",
250
+ "size",
251
+ "filterFixedValues"
252
+ ]), m = x({
253
+ expandNum: 0,
254
+ expand: !1
255
+ }), h = x({}), _ = t(() => s.fields.slice(0, m.expand ? s.fields.length : m.expandNum)), y = t(() => 24 - _.value?.reduce((e, t) => e + (t.span || 24 / s.column), 0) % 24 - 24 / s.column);
256
+ v(() => {
257
+ m.expandNum = f?.expandNum ?? 2 * s.column - 1, s.fields.forEach((e) => {
258
+ let t = W(e, h)?.props?.defaultValue;
259
+ t !== void 0 && (h[e.prop] = t);
260
+ });
261
+ });
262
+ function S() {
263
+ let e = {};
264
+ Object.keys(h).forEach((t) => {
265
+ if (h[t] !== void 0) {
266
+ let n = A(h[t]);
267
+ e[t] = typeof n == "string" ? n.trim() : n;
268
+ }
269
+ }), d("submit", {
270
+ ...e,
271
+ ...s.filterFixedValues
272
+ }), d("search", {
273
+ ...e,
274
+ ...s.filterFixedValues
275
+ });
276
+ }
277
+ function E() {
278
+ Object.keys(h).forEach((e) => {
279
+ s.omitFields.includes(e) || (h[e] = void 0);
280
+ }), d("reset", h);
281
+ }
282
+ return (t, o) => {
283
+ let u = T("el-input"), d = T("el-form-item"), f = T("el-col"), v = T("el-button"), x = T("el-row"), O = T("el-form");
284
+ return b(), n(O, p({
285
+ model: h,
286
+ class: "w-full ui-filter",
287
+ size: s.size
288
+ }, t.$attrs), {
289
+ default: P(() => [l(x, {
290
+ gutter: 20,
291
+ class: "mb-[-15px]"
292
+ }, {
293
+ default: P(() => [(b(!0), i(e, null, C(_.value, (e) => (b(), n(f, { span: e.span || 24 / s.column }, {
294
+ default: P(() => [(b(), n(d, {
295
+ key: e.prop,
296
+ label: e.label,
297
+ "label-width": j(we)(e?.labelWidth || s.labelWidth),
298
+ "value-width": j(U)(e?.valueWidth || s.valueWidth)
299
+ }, {
300
+ default: P(() => [e.render ? (b(), n(D(j(W)(e, h).component), p({
301
+ key: 0,
302
+ modelValue: h[e.prop],
303
+ "onUpdate:modelValue": (t) => h[e.prop] = t
304
+ }, { ref_for: !0 }, j(W)(e, h).props, {
305
+ clearable: !0,
306
+ style: { width: j(U)(e?.valueWidth || s.valueWidth) }
307
+ }), null, 16, [
308
+ "modelValue",
309
+ "onUpdate:modelValue",
310
+ "style"
311
+ ])) : (b(), n(u, {
312
+ key: 1,
313
+ modelValue: h[e.prop],
314
+ "onUpdate:modelValue": (t) => h[e.prop] = t,
315
+ placeholder: "请输入",
316
+ clearable: !0,
317
+ style: g({ width: j(U)(e?.valueWidth || s.valueWidth) })
318
+ }, null, 8, [
319
+ "modelValue",
320
+ "onUpdate:modelValue",
321
+ "style"
322
+ ]))]),
323
+ _: 2
324
+ }, 1032, [
325
+ "label",
326
+ "label-width",
327
+ "value-width"
328
+ ]))]),
329
+ _: 2
330
+ }, 1032, ["span"]))), 256)), l(f, {
331
+ span: 24 / s.column,
332
+ offset: y.value
333
+ }, {
334
+ default: P(() => [l(d, {
335
+ label: "",
336
+ "label-width": "30px"
337
+ }, {
338
+ default: P(() => [a("div", Te, [
339
+ w(t.$slots, "left", { form: h }, void 0, !0),
340
+ s.fields.length >= 2 * s.column ? (b(), n(v, {
341
+ key: 0,
342
+ text: "",
343
+ icon: m.expand ? j(he) : j(me),
344
+ onClick: o[0] ||= (e) => m.expand = !m.expand
345
+ }, {
346
+ default: P(() => [c(k(m.expand ? "收起" : "展开"), 1)]),
347
+ _: 1
348
+ }, 8, ["icon"])) : r("", !0),
349
+ l(v, {
350
+ icon: j(Ce),
351
+ type: "primary",
352
+ onClick: S
353
+ }, {
354
+ default: P(() => [...o[1] ||= [c("查询", -1)]]),
355
+ _: 1
356
+ }, 8, ["icon"]),
357
+ l(v, {
358
+ icon: j(H),
359
+ onClick: E
360
+ }, {
361
+ default: P(() => [...o[2] ||= [c("重置", -1)]]),
362
+ _: 1
363
+ }, 8, ["icon"]),
364
+ w(t.$slots, "handle", { form: h }, void 0, !0),
365
+ w(t.$slots, "right", { form: h }, void 0, !0)
366
+ ])]),
367
+ _: 3
368
+ })]),
369
+ _: 3
370
+ }, 8, ["span", "offset"])]),
371
+ _: 3
372
+ })]),
373
+ _: 3
374
+ }, 16, ["model", "size"]);
375
+ };
376
+ }
377
+ }), [["__scopeId", "data-v-592774c8"]]), Ee = {
378
+ key: 0,
379
+ style: { display: "inline-block" }
380
+ }, De = {
381
+ key: 0,
382
+ style: { display: "inline-block" }
383
+ }, Oe = {
384
+ key: 0,
385
+ class: "ui-form-buttons"
386
+ }, q = /* @__PURE__ */ B(/* @__PURE__ */ u({
387
+ __name: "index",
388
+ props: {
389
+ fields: {},
390
+ expandNum: {},
391
+ valueWidth: { default: "auto" },
392
+ labelWidth: { default: "100px" },
393
+ labelPosition: { default: "top" },
394
+ omitFields: { default: () => [] },
395
+ rules: { default: () => x({}) },
396
+ required: { type: Boolean },
397
+ column: { default: 24 },
398
+ defaultValues: {},
399
+ form: {},
400
+ valueModel: { default: "default" },
401
+ size: {}
402
+ },
403
+ emits: ["submit", "reset"],
404
+ setup(a, { expose: s, emit: u }) {
405
+ ee((e) => ({ ec46e5ec: e.column / 2 }));
406
+ let d = u, f = o(a, [
407
+ "fields",
408
+ "labelWidth",
409
+ "valueWidth",
410
+ "omitFields",
411
+ "rules",
412
+ "labelPosition",
413
+ "valueModel",
414
+ "column"
415
+ ]), m = S(0), _ = S(), v = x({}), y = t(() => {
416
+ let e = A(v);
417
+ return a.fields.forEach((t) => {
418
+ let n = t.prop ? e?.[t.prop] : void 0, r = G(t, v)?.props?.defaultValue;
419
+ v[t.prop] = n ?? r ?? void 0, t?.slots && t?.slots?.length > 0 && t.slots.forEach((t) => {
420
+ let n = t.prop ? e?.[t.prop] : void 0, r = G(t, v)?.props?.defaultValue;
421
+ v[t.prop] = n ?? r ?? void 0;
422
+ });
423
+ }), a.fields.filter((e) => typeof e.prop == "string");
424
+ }), E = t(() => {
425
+ if (a.rules && Object.keys(a.rules).length) return a.rules;
426
+ let e = {};
427
+ return y.value.forEach((t) => {
428
+ t.rules && Object.keys(t.rules).length ? e[t.prop] = t.rules : t.required && (e[t.prop] = [{
429
+ required: !0,
430
+ message: "请输入" + t.label,
431
+ trigger: "change"
432
+ }]);
433
+ }), e;
434
+ });
435
+ te(() => {
436
+ Object.assign(v, f?.form);
437
+ });
438
+ async function O(e) {
439
+ let t = !0;
440
+ if (await e.validate((e) => {
441
+ t = e;
442
+ }), !t) return;
443
+ let n = {};
444
+ Object.keys(v).forEach((e) => {
445
+ v[e] !== void 0 && (n[e] = A(v[e]));
446
+ }), d("submit", n);
447
+ }
448
+ function M() {
449
+ _ && _.value?.clearValidate();
450
+ }
451
+ function N() {
452
+ Object.keys(v).forEach((e) => {
453
+ a.omitFields.includes(e) || (v[e] = void 0);
454
+ }), m.value += 1, d("reset", v);
455
+ }
456
+ function F() {
457
+ return v;
458
+ }
459
+ function I(e) {
460
+ Object.keys(e).forEach((t) => {
461
+ v[t] = e[t];
462
+ });
463
+ }
464
+ async function L() {
465
+ return new Promise((e) => {
466
+ _.value?.validate((t, n) => e(n));
467
+ });
468
+ }
469
+ return s({
470
+ getValues: F,
471
+ setValues: I,
472
+ clearValidate: M,
473
+ onSubmit: O,
474
+ validate: L
475
+ }), (t, o) => {
476
+ let s = T("el-input"), u = T("el-form-item"), d = T("el-form"), f = T("el-button");
477
+ return b(), i(e, null, [l(d, p({
478
+ ref_key: "uiFormRef",
479
+ ref: _,
480
+ model: v
481
+ }, t.$attrs, {
482
+ rules: E.value,
483
+ inline: a.labelPosition !== "top",
484
+ "label-position": a.labelPosition,
485
+ class: {
486
+ "ui-form": !0,
487
+ horizontal: a.labelPosition !== "top"
488
+ },
489
+ "validate-on-rule-change": !1
490
+ }), {
491
+ default: P(() => [(b(!0), i(e, null, C(y.value, (r) => (b(), n(u, {
492
+ key: r.prop,
493
+ label: r.label,
494
+ "label-width": a.labelWidth,
495
+ "value-width": a.valueWidth,
496
+ prop: r.prop,
497
+ style: g({
498
+ width: `${r?.width ? r?.width + "px" : "100%"}`,
499
+ gridColumn: `span ${(r?.span || a.column) / 2 || 1}`
500
+ })
501
+ }, {
502
+ default: P(() => [r.render ? (b(), i(e, { key: 0 }, [j(G)(r, v).component ? (b(), n(D(j(G)(r, v).component), p({
503
+ key: 1,
504
+ modelValue: v[r.prop],
505
+ "onUpdate:modelValue": (e) => v[r.prop] = e
506
+ }, { ref_for: !0 }, j(G)(r, v).props, {
507
+ clearable: !0,
508
+ key: `${r.prop}-${m.value}`,
509
+ style: { display: "inline-block" },
510
+ class: { underline: a.valueModel === "underline" }
511
+ }), null, 16, [
512
+ "modelValue",
513
+ "onUpdate:modelValue",
514
+ "class"
515
+ ])) : (b(), i("span", Ee, k(j(G)(r, v) || "-"), 1)), (b(!0), i(e, null, C(r.slots, (e) => w(t.$slots, "default", { form: v }, () => [j(G)(e, v).component ? (b(), n(D(j(G)(e, v).component), p({
516
+ key: 1,
517
+ modelValue: v[e.prop],
518
+ "onUpdate:modelValue": (t) => v[e.prop] = t,
519
+ "default-value": e.defaultValue,
520
+ placeholder: e.placeholder
521
+ }, { ref_for: !0 }, j(G)(e, v).props, {
522
+ style: {
523
+ display: "inline-block",
524
+ marginLeft: "10px",
525
+ width: `${e.width ? e.width + "px" : "100%"}`
526
+ },
527
+ class: { underline: a.valueModel === "underline" },
528
+ clearable: !0,
529
+ key: `${e.prop}-${m.value}`
530
+ }), null, 16, [
531
+ "modelValue",
532
+ "onUpdate:modelValue",
533
+ "default-value",
534
+ "placeholder",
535
+ "style",
536
+ "class"
537
+ ])) : (b(), i("span", De, k(j(G)(e, v) || "-"), 1))], !0)), 256))], 64)) : (b(), n(s, {
538
+ key: 1,
539
+ modelValue: v[r.prop],
540
+ "onUpdate:modelValue": (e) => v[r.prop] = e,
541
+ placeholder: "请输入",
542
+ clearable: !0,
543
+ class: h({ underline: a.valueModel === "underline" })
544
+ }, null, 8, [
545
+ "modelValue",
546
+ "onUpdate:modelValue",
547
+ "class"
548
+ ]))]),
549
+ _: 2
550
+ }, 1032, [
551
+ "label",
552
+ "label-width",
553
+ "value-width",
554
+ "prop",
555
+ "style"
556
+ ]))), 128))]),
557
+ _: 3
558
+ }, 16, [
559
+ "model",
560
+ "rules",
561
+ "inline",
562
+ "label-position",
563
+ "class"
564
+ ]), t.$attrs?.hideHandle ? r("", !0) : (b(), i("div", Oe, [
565
+ w(t.$slots, "handle", { form: v }, void 0, !0),
566
+ l(f, {
567
+ icon: j(H),
568
+ onClick: o[0] ||= (e) => _.value && N(),
569
+ size: t.$props.size
570
+ }, {
571
+ default: P(() => [...o[2] ||= [c("重置", -1)]]),
572
+ _: 1
573
+ }, 8, ["icon", "size"]),
574
+ l(f, {
575
+ icon: j(Se),
576
+ type: "primary",
577
+ onClick: o[1] ||= (e) => _.value && O(_.value),
578
+ size: t.$props.size
579
+ }, {
580
+ default: P(() => [...o[3] ||= [c("提交", -1)]]),
581
+ _: 1
582
+ }, 8, ["icon", "size"])
583
+ ]))], 64);
584
+ };
585
+ }
586
+ }), [["__scopeId", "data-v-f8f2a1f5"]]), ke = ["disabled"], J = /* @__PURE__ */ u({
587
+ __name: "index",
588
+ props: /* @__PURE__ */ f({
589
+ defaultValue: { default: "" },
590
+ disabled: {
591
+ type: Boolean,
592
+ default: !1
593
+ }
594
+ }, {
595
+ modelValue: {
596
+ type: String,
597
+ default: ""
598
+ },
599
+ modelModifiers: {}
600
+ }),
601
+ emits: /* @__PURE__ */ f(["change"], ["update:modelValue"]),
602
+ setup(e, { emit: t }) {
603
+ let n = S(), r = M(e, "modelValue"), a = S(r.value || e.defaultValue || ""), o = null, s = t;
604
+ return v(() => {
605
+ o = new ue({
606
+ element: n.value,
607
+ placeholder: "点击输入内容...",
608
+ content: r.value || e.defaultValue || "",
609
+ toolbarExcludeKeys: ["ai"],
610
+ onChange: (e) => {
611
+ let t = e.getHtml();
612
+ r.value = t, a.value = t, s("change", t);
613
+ }
614
+ }), o.setEditable(!e.disabled);
615
+ }), N(r, (e) => {
616
+ o && e !== o.getHtml() && o.setContent(e);
617
+ }), y(() => {
618
+ o && o.destroy();
619
+ }), (t, r) => (b(), i("div", {
620
+ ref_key: "editorRef",
621
+ ref: n,
622
+ style: { height: "500px" },
623
+ disabled: e.disabled
624
+ }, null, 8, ke));
625
+ }
626
+ }), Ae = { class: "ui-tree-wrapper" }, je = {
627
+ key: 0,
628
+ style: {
629
+ display: "flex",
630
+ "flex-direction": "row",
631
+ "justify-content": "space-between",
632
+ "align-items": "center",
633
+ gap: "10px"
634
+ }
635
+ }, Me = { class: "custom-tree-node" }, Ne = { class: "node-label flex items-center gap-1" }, Pe = { class: "text-red-500 flex items-center" }, Y = /* @__PURE__ */ B(/* @__PURE__ */ u({
636
+ __name: "index",
637
+ props: {
638
+ id: {},
639
+ data: { default: () => [] },
640
+ filterable: { type: Boolean },
641
+ placeholder: {},
642
+ hidePlusHandle: { type: Boolean },
643
+ hideNodeAdd: { type: Boolean },
644
+ hideNodeEdit: { type: Boolean },
645
+ hideNodeDel: { type: Boolean },
646
+ hideNodeHandle: { type: Boolean },
647
+ nodeKey: {},
648
+ props: { default: () => ({ label: "label" }) }
649
+ },
650
+ emits: ["change"],
651
+ setup(e, { emit: t }) {
652
+ let s = o(e, [
653
+ "filterable",
654
+ "placeholder",
655
+ "data",
656
+ "props"
657
+ ]), u = S(""), d = S(), f = S(null);
658
+ N(u, (t) => {
659
+ e.filterable && f.value.filter(t);
660
+ });
661
+ function m(t, n) {
662
+ return t ? n?.[e.props?.label || "label"]?.includes(t) ?? !1 : !0;
663
+ }
664
+ function h(e, t) {
665
+ e?.stopPropagation(), d.value = t.id;
666
+ }
667
+ function g() {
668
+ oe.prompt("请输入新的名称", "添加节点", {
669
+ confirmButtonText: "确定",
670
+ cancelButtonText: "取消",
671
+ callback: async (e) => {
672
+ if (e.action === "confirm") {
673
+ if (!s?.id) return;
674
+ console.log("添加 =》》", e?.value);
675
+ }
676
+ }
677
+ });
678
+ }
679
+ function _(e) {
680
+ oe.prompt("请输入新的名称", "重命名", {
681
+ confirmButtonText: "确定",
682
+ cancelButtonText: "取消",
683
+ inputValue: e.label
684
+ }).then(async ({ value: e }) => {
685
+ console.log("修改节点 =》》", e);
686
+ });
687
+ }
688
+ async function v(e) {
689
+ e.id && console.log("删除节点 =》》", e.id);
690
+ }
691
+ return (t, o) => {
692
+ let d = T("el-input"), y = T("el-icon"), x = T("el-button"), S = T("el-dropdown-item"), C = T("el-dropdown-menu"), E = T("el-dropdown"), D = T("el-tree-v2");
693
+ return b(), i("div", Ae, [
694
+ e.filterable ? (b(), i("div", je, [l(d, {
695
+ modelValue: u.value,
696
+ "onUpdate:modelValue": o[0] ||= (e) => u.value = e,
697
+ placeholder: e.placeholder ?? "请输入",
698
+ clearable: ""
699
+ }, null, 8, ["modelValue", "placeholder"]), s?.hidePlusHandle ? r("", !0) : (b(), n(x, {
700
+ key: 0,
701
+ style: {
702
+ margin: "0px",
703
+ padding: "0px"
704
+ },
705
+ link: ""
706
+ }, {
707
+ default: P(() => [l(y, { size: 22 }, {
708
+ default: P(() => [l(j(ge), { onClick: o[1] ||= (e) => g() })]),
709
+ _: 1
710
+ })]),
711
+ _: 1
712
+ }))])) : r("", !0),
713
+ w(t.$slots, "handle", { style: "margin-top: 8px" }, void 0, !0),
714
+ l(D, p({
715
+ ref_key: "treeRef",
716
+ ref: f,
717
+ style: { "margin-top": "8px" }
718
+ }, {
719
+ ...t.$props,
720
+ ...t.$attrs
721
+ }, {
722
+ "node-key": s?.nodeKey || "id",
723
+ "highlight-current": !0,
724
+ "filter-method": m
725
+ }), {
726
+ default: P(({ data: i }) => [a("div", Me, [a("div", Ne, [i?.children?.length ? (b(), n(y, { key: 0 }, {
727
+ default: P(() => [l(j(be))]),
728
+ _: 1
729
+ })) : r("", !0), c(" " + k(i?.[e.props?.label || "label"]) + " " + k(i?.children?.length ? `(${i.children.length})` : ""), 1)]), s.hideNodeHandle ? r("", !0) : (b(), n(E, {
730
+ key: 0,
731
+ trigger: "click"
732
+ }, {
733
+ dropdown: P(() => [l(C, null, {
734
+ default: P(() => [
735
+ s?.hideNodeAdd ? r("", !0) : (b(), n(S, {
736
+ key: 0,
737
+ onClick: o[2] ||= (e) => g()
738
+ }, {
739
+ default: P(() => [l(y, null, {
740
+ default: P(() => [l(j(ve))]),
741
+ _: 1
742
+ }), o[3] ||= c("添加 ", -1)]),
743
+ _: 1
744
+ })),
745
+ s?.hideNodeEdit ? r("", !0) : (b(), n(S, {
746
+ key: 1,
747
+ onClick: (e) => _(i)
748
+ }, {
749
+ default: P(() => [l(y, null, {
750
+ default: P(() => [l(j(ye))]),
751
+ _: 1
752
+ }), o[4] ||= c("编辑 ", -1)]),
753
+ _: 1
754
+ }, 8, ["onClick"])),
755
+ s?.hideNodeDel ? r("", !0) : (b(), n(S, {
756
+ key: 2,
757
+ onClick: (e) => v(i)
758
+ }, {
759
+ default: P(() => [a("span", Pe, [l(y, null, {
760
+ default: P(() => [l(j(_e))]),
761
+ _: 1
762
+ }), o[5] ||= c("删除 ", -1)])]),
763
+ _: 1
764
+ }, 8, ["onClick"])),
765
+ w(t.$slots, "node-handle", { data: i }, void 0, !0)
766
+ ]),
767
+ _: 2
768
+ }, 1024)]),
769
+ default: P(() => [l(y, { onClick: (e) => h(e, i) }, {
770
+ default: P(() => [l(j(xe))]),
771
+ _: 1
772
+ }, 8, ["onClick"])]),
773
+ _: 2
774
+ }, 1024))])]),
775
+ _: 3
776
+ }, 16, ["node-key"])
777
+ ]);
778
+ };
779
+ }
780
+ }), [["__scopeId", "data-v-a155afd8"]]), Fe = { style: { height: "100%" } }, Ie = { style: {
781
+ display: "flex",
782
+ "flex-direction": "row",
783
+ "justify-content": "space-between",
784
+ "align-items": "center",
785
+ gap: "10px"
786
+ } }, Le = { style: { margin: "10px 0px" } }, Re = ["onClick"], ze = { key: 0 }, X = /* @__PURE__ */ B(/* @__PURE__ */ u({
787
+ __name: "index",
788
+ props: {
789
+ loading: { default: () => S(!1) },
790
+ data: {},
791
+ placeholder: {},
792
+ props: {},
793
+ vInfiniteScroll: { type: Function },
794
+ filterable: { type: Boolean }
795
+ },
796
+ emits: ["node-click"],
797
+ setup(o, { emit: s }) {
798
+ let c = s, l = S(""), u = S(), d = t(() => l.value ? o.data.filter((e) => e[o.props?.label || "label"]?.includes(l.value)) : o.data);
799
+ N(() => [u.value, o.data?.[0]], (e) => {
800
+ !e[0] && e[1] && (u.value = o.data?.[0]);
801
+ }, { immediate: !0 });
802
+ function f(e) {
803
+ u.value = e, c("node-click", e);
804
+ }
805
+ return (t, s) => {
806
+ let c = T("el-input");
807
+ return b(), i("div", Fe, [
808
+ a("div", Ie, [o.filterable ? (b(), n(c, {
809
+ key: 0,
810
+ modelValue: l.value,
811
+ "onUpdate:modelValue": s[0] ||= (e) => l.value = e,
812
+ placeholder: o.placeholder ?? "请输入"
813
+ }, null, 8, ["modelValue", "placeholder"])) : r("", !0), w(t.$slots, "plus", {}, void 0, !0)]),
814
+ a("div", Le, [w(t.$slots, "handle", {}, void 0, !0)]),
815
+ F((b(), i("ul", p({
816
+ class: "infinite-list",
817
+ "infinite-scroll-immediate": !1
818
+ }, t.$attrs), [(b(!0), i(e, null, C(d.value, (e, n) => (b(), i("li", {
819
+ key: "infinite-list-" + n,
820
+ class: h({
821
+ "infinite-list-item": !0,
822
+ active: e === u.value
823
+ }),
824
+ onClick: (t) => f(e)
825
+ }, [a("span", null, k(e[o.props?.label || "label"]), 1), w(t.$slots, "itemHandle", { data: e }, void 0, !0)], 10, Re))), 128))], 16)), [[j(o.vInfiniteScroll), o.vInfiniteScroll]]),
826
+ o.loading.value ? (b(), i("p", ze, "loading...")) : r("", !0)
827
+ ]);
828
+ };
829
+ }
830
+ }), [["__scopeId", "data-v-2180fa82"]]), Be = {
831
+ key: 0,
832
+ style: {
833
+ padding: "10px 0px",
834
+ "margin-bottom": "10px",
835
+ "border-bottom": "1px solid #e5e5e5"
836
+ }
837
+ }, Ve = { key: 1 }, Z = /* @__PURE__ */ B(/* @__PURE__ */ u({
838
+ __name: "index",
839
+ props: {
840
+ data: {},
841
+ fields: { default: () => [] },
842
+ column: { default: 4 },
843
+ title: { default: "" },
844
+ border: { type: Boolean },
845
+ direction: {},
846
+ size: {},
847
+ extra: {},
848
+ labelWidth: {}
849
+ },
850
+ setup(t) {
851
+ let a = o(t, [
852
+ "title",
853
+ "column",
854
+ "fields",
855
+ "data"
856
+ ]);
857
+ return (o, s) => {
858
+ let c = T("el-descriptions-item"), u = T("el-descriptions");
859
+ return b(), i(e, null, [
860
+ t.title ? (b(), i("h4", Be, k(t.title), 1)) : r("", !0),
861
+ w(o.$slots, "title", {}, void 0, !0),
862
+ l(u, p({ column: t.column }, a, { class: "ui-descriptions" }), {
863
+ default: P(() => [(b(!0), i(e, null, C(t.fields, (e) => (b(), n(c, {
864
+ key: e.prop,
865
+ label: e.label,
866
+ span: e.span || 2
867
+ }, {
868
+ default: P(() => [e.render ? (b(), n(D(j(W)(e, t.data).component), p({
869
+ key: 0,
870
+ modelValue: t.data[e.prop],
871
+ "onUpdate:modelValue": (n) => t.data[e.prop] = n
872
+ }, { ref_for: !0 }, j(W)(e, t.data).props, {
873
+ clearable: !0,
874
+ key: e.prop,
875
+ style: { display: "inline-block" }
876
+ }), null, 16, ["modelValue", "onUpdate:modelValue"])) : (b(), i("span", Ve, k(t.data[e.prop] || "-"), 1))]),
877
+ _: 2
878
+ }, 1032, ["label", "span"]))), 128))]),
879
+ _: 1
880
+ }, 16, ["column"])
881
+ ], 64);
882
+ };
883
+ }
884
+ }), [["__scopeId", "data-v-f02c30f9"]]), He = {
885
+ key: 0,
886
+ class: "flex mt-3 justify-end"
887
+ }, Ue = /* @__PURE__ */ u({
888
+ __name: "index",
889
+ props: {
890
+ visible: { type: Boolean },
891
+ width: {},
892
+ disabled: { type: Boolean },
893
+ component: {},
894
+ componentProps: {}
895
+ },
896
+ emits: [
897
+ "update:visible",
898
+ "close",
899
+ "submit"
900
+ ],
901
+ setup(e, { emit: t }) {
902
+ let a = t, o = e, s = S();
903
+ function u() {
904
+ a("close"), a("update:visible", !1);
905
+ }
906
+ function d() {
907
+ a("submit", A(s?.value || {})), a("update:visible", !1);
908
+ }
909
+ return (e, t) => {
910
+ let a = T("el-button"), f = T("el-dialog");
911
+ return b(), n(f, p(e.$attrs, {
912
+ "model-value": o.visible,
913
+ "show-close": o.disabled,
914
+ fullscreen: !o.width,
915
+ "destroy-on-close": "",
916
+ "lock-scroll": !1,
917
+ "close-on-click-modal": !1,
918
+ "onUpdate:modelValue": t[0] ||= (e) => !e && u(),
919
+ onClose: u
920
+ }), {
921
+ default: P(() => [(b(), n(D(o.component), p({
922
+ ref_key: "slotRef",
923
+ ref: s
924
+ }, o.componentProps), null, 16)), o.disabled ? r("", !0) : (b(), i("div", He, [l(a, { onClick: u }, {
925
+ default: P(() => [...t[1] ||= [c("取消", -1)]]),
926
+ _: 1
927
+ }), l(a, {
928
+ type: "primary",
929
+ onClick: d
930
+ }, {
931
+ default: P(() => [...t[2] ||= [c("确定", -1)]]),
932
+ _: 1
933
+ })]))]),
934
+ _: 1
935
+ }, 16, [
936
+ "model-value",
937
+ "show-close",
938
+ "fullscreen"
939
+ ]);
940
+ };
941
+ }
942
+ });
943
+ //#endregion
944
+ //#region src/components/utils/render.ts
945
+ function We(e) {
946
+ return d("template", { style: {
947
+ display: "flex",
948
+ flexDirection: "row",
949
+ flexWrap: "wrap"
950
+ } }, (Array.isArray(e) ? e : [e]).map((e) => {
951
+ let { text: t, ...n } = e;
952
+ return d(I, {
953
+ ...n,
954
+ link: !0,
955
+ size: "small",
956
+ type: e.type || "default"
957
+ }, () => t);
958
+ }));
959
+ }
960
+ function Ge(e) {
961
+ return Array.isArray(e) ? d("div", { style: {
962
+ display: "flex",
963
+ gap: "8px",
964
+ flexDirection: "row",
965
+ flexWrap: "wrap"
966
+ } }, e.map((e) => d(ae, {
967
+ ...e,
968
+ type: e.type || "primary"
969
+ }, d(z, {
970
+ lineClamp: e?.lineClamp,
971
+ type: e.type || "primary"
972
+ }, () => e.prop)))) : d(ae, {
973
+ ...e,
974
+ type: e.type || "primary"
975
+ }, d(z, {
976
+ lineClamp: e?.lineClamp,
977
+ type: e.type || "primary"
978
+ }, () => e.prop));
979
+ }
980
+ function Ke(e) {
981
+ return d("div", { style: {
982
+ display: "flex",
983
+ gap: "4px",
984
+ flexDirection: "row",
985
+ flexWrap: "wrap"
986
+ } }, (Array.isArray(e.prop) ? e.prop : [e.prop]).map((t) => d(R, e, () => t)));
987
+ }
988
+ function qe(e) {
989
+ return d(R, { ...e });
990
+ }
991
+ function Je(e) {
992
+ return d(ce, {
993
+ style: { minWidth: "160px" },
994
+ ...e,
995
+ placeholder: "请选择",
996
+ filterable: !0
997
+ });
998
+ }
999
+ function Ye(e) {
1000
+ let t = e?.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
1001
+ return d(L, {
1002
+ format: t,
1003
+ valueFormat: t,
1004
+ startPlaceholder: "开始时间",
1005
+ endPlaceholder: "结束时间",
1006
+ ...e,
1007
+ placeholder: "请选择",
1008
+ "onUpdate:modelValue": (t) => e?.onChange?.(t)
1009
+ });
1010
+ }
1011
+ function Xe(e) {
1012
+ let { start: t = "00:00", end: n = "23:30", ...r } = e;
1013
+ return d(le, {
1014
+ start: t,
1015
+ end: n,
1016
+ ...r,
1017
+ placeholder: "请选择",
1018
+ filterable: !0
1019
+ });
1020
+ }
1021
+ function Ze(e) {
1022
+ return d(ne, {
1023
+ ...e,
1024
+ placeholder: "请输入"
1025
+ });
1026
+ }
1027
+ function Qe(e) {
1028
+ let { align: t = "left", controlsPosition: n = "right", ...r } = e;
1029
+ return d(re, {
1030
+ align: t,
1031
+ style: {
1032
+ ...e?.style || {},
1033
+ width: "100%"
1034
+ },
1035
+ controlsPosition: n,
1036
+ placeholder: "请输入",
1037
+ ...r
1038
+ });
1039
+ }
1040
+ function $e(e) {
1041
+ let { rows: t = 1, ...n } = e;
1042
+ return d(ne, {
1043
+ placeholder: "请输入",
1044
+ rows: t,
1045
+ ...n,
1046
+ type: "textarea"
1047
+ });
1048
+ }
1049
+ function et(e) {
1050
+ return d(ie, {
1051
+ placeholder: "请输入",
1052
+ ...e,
1053
+ clearable: !1
1054
+ });
1055
+ }
1056
+ function tt(e) {
1057
+ return d(J, e);
1058
+ }
1059
+ function nt(e) {
1060
+ return d(se, e);
1061
+ }
1062
+ function rt(e) {
1063
+ return d(z, e, () => e.prop);
1064
+ }
1065
+ var Q = {
1066
+ button: We,
1067
+ link: Ge,
1068
+ tag: Ke,
1069
+ switch: qe,
1070
+ select: Je,
1071
+ datePicker: Ye,
1072
+ timeSelect: Xe,
1073
+ input: Ze,
1074
+ inputNumber: Qe,
1075
+ textarea: $e,
1076
+ inputTag: et,
1077
+ editor: tt,
1078
+ radio: nt,
1079
+ text: rt
1080
+ }, it = /* @__PURE__ */ u({
1081
+ name: "UiColumn",
1082
+ __name: "UiColumn",
1083
+ props: {
1084
+ key: {},
1085
+ data: {},
1086
+ column: {},
1087
+ align: {},
1088
+ size: {}
1089
+ },
1090
+ emits: ["update:data"],
1091
+ setup(t, { emit: r }) {
1092
+ let a = r, o = t;
1093
+ function s(e, t, n) {
1094
+ let r = {};
1095
+ Object.keys(Q).forEach((i) => {
1096
+ let o = i;
1097
+ r[o] = (r) => {
1098
+ let i = Array.isArray(r) ? r : {
1099
+ placeholder: "请输入",
1100
+ filterable: !0,
1101
+ ...r,
1102
+ prop: r?.prop || e[n.prop],
1103
+ modelValue: r?.prop || e[n.prop],
1104
+ onChange: r?.onChange || ((e) => a("update:data", t, n.prop, e)),
1105
+ onInput: r?.onInput || ((e) => a("update:data", t, n.prop, e))
1106
+ };
1107
+ return Q[o](i);
1108
+ };
1109
+ });
1110
+ let i = n.render ? n.render({
1111
+ data: e,
1112
+ index: t,
1113
+ h: r,
1114
+ column: n
1115
+ }) : null;
1116
+ return i ? typeof i == "object" ? i : d("div", { innerHTML: String(i) }) : null;
1117
+ }
1118
+ return (r, a) => {
1119
+ let l = T("UiColumn", !0), u = T("el-table-column"), d = T("el-text");
1120
+ return t.column?.children && t.column?.children?.length > 0 ? (b(), n(u, {
1121
+ key: 0,
1122
+ label: t.column.label,
1123
+ align: o.align
1124
+ }, {
1125
+ default: P(() => [(b(!0), i(e, null, C(t.column.children, (e) => (b(), n(l, p({
1126
+ column: e,
1127
+ data: o.data
1128
+ }, { ref_for: !0 }, r.$attrs, { align: o.align }), null, 16, [
1129
+ "column",
1130
+ "data",
1131
+ "align"
1132
+ ]))), 256))]),
1133
+ _: 1
1134
+ }, 8, ["label", "align"])) : (b(), n(u, {
1135
+ key: 1,
1136
+ prop: String(t.column.prop),
1137
+ label: t.column.label,
1138
+ "column-key": String(t.column.prop),
1139
+ align: o.align,
1140
+ width: t.column.width,
1141
+ "show-overflow-tooltip": t.column.showOverflowTooltip
1142
+ }, {
1143
+ default: P(({ row: e, $index: r }) => [t.column.render ? (b(), n(D(s(e, r, t.column)), {
1144
+ key: 0,
1145
+ align: o.align,
1146
+ size: o.size
1147
+ }, null, 8, ["align", "size"])) : (b(), n(d, {
1148
+ key: 1,
1149
+ "line-clamp": t.column?.lineClamp || 2
1150
+ }, {
1151
+ default: P(() => [c(k(e[t.column.prop]), 1)]),
1152
+ _: 2
1153
+ }, 1032, ["line-clamp"]))]),
1154
+ _: 1
1155
+ }, 8, [
1156
+ "prop",
1157
+ "label",
1158
+ "column-key",
1159
+ "align",
1160
+ "width",
1161
+ "show-overflow-tooltip"
1162
+ ]));
1163
+ };
1164
+ }
1165
+ }), at = /* @__PURE__ */ B(/* @__PURE__ */ u({
1166
+ __name: "index",
1167
+ props: {
1168
+ loading: {
1169
+ type: [Boolean, Object],
1170
+ default: !1
1171
+ },
1172
+ border: {
1173
+ type: Boolean,
1174
+ default: !1
1175
+ },
1176
+ size: { default: "default" },
1177
+ data: { default: () => x([]) },
1178
+ columns: {},
1179
+ align: { default: "left" },
1180
+ hidePagination: {
1181
+ type: Boolean,
1182
+ default: !1
1183
+ },
1184
+ pagination: { default: () => x({
1185
+ page: 1,
1186
+ pageSize: 10,
1187
+ total: 0,
1188
+ pageSizes: [
1189
+ 10,
1190
+ 20,
1191
+ 50
1192
+ ]
1193
+ }) },
1194
+ currentChange: { type: Function },
1195
+ selectionChange: { type: Function },
1196
+ selectable: { type: Function },
1197
+ defaultCheckedKeys: {},
1198
+ rowKey: {}
1199
+ },
1200
+ emits: ["pagination"],
1201
+ setup(a, { emit: s }) {
1202
+ let c = s, l = o(a, [
1203
+ "loading",
1204
+ "border",
1205
+ "align",
1206
+ "hidePagination",
1207
+ "pagination",
1208
+ "data",
1209
+ "size"
1210
+ ]), u = S(), d = t(() => A(l.columns)?.some((e) => e.type === "index")), f = t(() => A(l.columns)?.some((e) => e.type === "selection")), h = t(() => !l.columns || !l.columns.length ? [] : l.columns.filter((e) => e.type !== "index" && e.type !== "selection"));
1211
+ N(() => [l.defaultCheckedKeys, a.data], ([e, t]) => {
1212
+ !e?.length || !t?.length || m(() => {
1213
+ if (!u.value) return;
1214
+ let n = t.filter((t) => e.includes(t.id));
1215
+ u.value.clearSelection(), n.forEach((e) => u.value?.toggleRowSelection(e, !0));
1216
+ });
1217
+ }, { immediate: !0 });
1218
+ function g(e, t) {
1219
+ a.pagination.page = e || a.pagination.page, a.pagination.pageSize = t || a.pagination.pageSize, c("pagination", A(a.pagination));
1220
+ }
1221
+ function _(e, t, n) {
1222
+ a.data[e] && (a.data[e] = {
1223
+ ...a.data[e],
1224
+ [t]: n
1225
+ });
1226
+ }
1227
+ return (t, o) => {
1228
+ let s = T("el-table-column"), c = T("el-table"), m = T("el-pagination"), v = E("loading");
1229
+ return b(), i("div", null, [
1230
+ F((b(), n(c, p({ border: a.border }, t.$attrs, {
1231
+ data: a.data,
1232
+ lazy: !0,
1233
+ class: "ui-table",
1234
+ fit: "",
1235
+ ref_key: "tableRef",
1236
+ ref: u
1237
+ }), {
1238
+ default: P(() => [
1239
+ f.value ? (b(), n(s, {
1240
+ key: 0,
1241
+ type: "selection",
1242
+ selectable: l.selectable,
1243
+ "column-key": "selection_0",
1244
+ align: a.align,
1245
+ fixed: "left"
1246
+ }, null, 8, ["selectable", "align"])) : r("", !0),
1247
+ d.value ? (b(), n(s, {
1248
+ key: 1,
1249
+ fixed: "left",
1250
+ type: "index",
1251
+ label: "序号",
1252
+ width: "60",
1253
+ "column-key": "index_1",
1254
+ align: a.align
1255
+ }, null, 8, ["align"])) : r("", !0),
1256
+ (b(!0), i(e, null, C(h.value, (e, t) => (b(), n(it, {
1257
+ key: t + "column_" + e?.prop?.toString(),
1258
+ column: e,
1259
+ data: a.data,
1260
+ align: a.align,
1261
+ "onUpdate:data": _,
1262
+ size: a.size
1263
+ }, null, 8, [
1264
+ "column",
1265
+ "data",
1266
+ "align",
1267
+ "size"
1268
+ ]))), 128))
1269
+ ]),
1270
+ _: 1
1271
+ }, 16, ["border", "data"])), [[v, a.loading]]),
1272
+ a.hidePagination ? r("", !0) : (b(), n(m, {
1273
+ key: 0,
1274
+ class: "ui-pagination",
1275
+ size: "small",
1276
+ background: "",
1277
+ layout: "total, sizes, prev, pager, next, jumper",
1278
+ "page-sizes": a.pagination?.pageSizes || [
1279
+ 10,
1280
+ 20,
1281
+ 50
1282
+ ],
1283
+ "page-size": a.pagination.pageSize,
1284
+ "onUpdate:pageSize": o[0] ||= (e) => a.pagination.pageSize = e,
1285
+ "current-page": a.pagination.page,
1286
+ "onUpdate:currentPage": o[1] ||= (e) => a.pagination.page = e,
1287
+ total: a.pagination.total,
1288
+ "onUpdate:total": o[2] ||= (e) => a.pagination.total = e,
1289
+ onChange: g
1290
+ }, null, 8, [
1291
+ "page-sizes",
1292
+ "page-size",
1293
+ "current-page",
1294
+ "total"
1295
+ ])),
1296
+ w(t.$slots, "default", {}, void 0, !0)
1297
+ ]);
1298
+ };
1299
+ }
1300
+ }), [["__scopeId", "data-v-f401a9a8"]]), $ = /* @__PURE__ */ u({
1301
+ __name: "Series",
1302
+ props: {
1303
+ option: {},
1304
+ height: {}
1305
+ },
1306
+ setup(e) {
1307
+ let t = e, n = S(null), r = S(null);
1308
+ v(() => {
1309
+ n.value && (r.value = de(n.value), a());
1310
+ }), _(() => {
1311
+ r.value && r.value.dispose();
1312
+ }), N(() => t.option, (e) => {
1313
+ e && a();
1314
+ }, { deep: !0 });
1315
+ function a() {
1316
+ r.value && (!Array.isArray(t?.option.series) || !t?.option?.series?.length || r.value.setOption(t.option));
1317
+ }
1318
+ return (e, r) => (b(), i("div", p(e.$attrs, {
1319
+ style: {
1320
+ width: "100%",
1321
+ height: t.height || "100%",
1322
+ minHeight: t.height || "260px"
1323
+ },
1324
+ ref_key: "chartRef",
1325
+ ref: n
1326
+ }), null, 16));
1327
+ }
1328
+ }), ot = /* @__PURE__ */ u({
1329
+ __name: "Pie",
1330
+ props: {
1331
+ data: {},
1332
+ option: {},
1333
+ title: {},
1334
+ horizontal: { type: Boolean },
1335
+ height: {}
1336
+ },
1337
+ setup(e) {
1338
+ let r = e, i = t(() => {
1339
+ let e = r?.option || {}, t = Array.isArray(r?.option?.series) ? r.option.series.filter((e) => e && typeof e == "object" && "type" in e && e.type === "pie") : [], n = t[0] || {}, i = e?.legend?.orient;
1340
+ return {
1341
+ title: {
1342
+ text: r?.title || "",
1343
+ left: "left"
1344
+ },
1345
+ tooltip: { trigger: "item" },
1346
+ legend: e?.legend ?? (r?.horizontal ? {
1347
+ orient: "vertical",
1348
+ top: "center",
1349
+ right: "10%",
1350
+ data: r?.data?.map((e) => e.name),
1351
+ formatter: (e) => {
1352
+ let t = r?.data?.find((t) => t.name === e);
1353
+ return `${e} ${t ? t.value : 0}`;
1354
+ }
1355
+ } : {
1356
+ top: "5%",
1357
+ left: "center"
1358
+ }),
1359
+ series: t.length > 0 ? t : [{
1360
+ name: n?.name || "xx饼图",
1361
+ type: "pie",
1362
+ radius: ["40%", "70%"],
1363
+ center: r?.horizontal || i === "vertical" ? ["30%", "50%"] : ["50%", "50%"],
1364
+ avoidLabelOverlap: !1,
1365
+ itemStyle: { borderRadius: 10 },
1366
+ label: {
1367
+ show: !1,
1368
+ position: "center"
1369
+ },
1370
+ emphasis: { label: {
1371
+ show: !0,
1372
+ fontSize: 40,
1373
+ fontWeight: "bold"
1374
+ } },
1375
+ labelLine: { show: !1 },
1376
+ data: r.data || []
1377
+ }]
1378
+ };
1379
+ });
1380
+ return (t, r) => (b(), n($, p({
1381
+ option: i.value,
1382
+ height: e.height
1383
+ }, t.$attrs), null, 16, ["option", "height"]));
1384
+ }
1385
+ }), st = /* @__PURE__ */ u({
1386
+ __name: "Bar",
1387
+ props: {
1388
+ data: {},
1389
+ option: {},
1390
+ title: {}
1391
+ },
1392
+ setup(e) {
1393
+ let r = e, i = t(() => {
1394
+ let e = r?.option || {};
1395
+ return {
1396
+ title: {
1397
+ text: r?.title || "",
1398
+ left: "left"
1399
+ },
1400
+ tooltip: { trigger: "axis" },
1401
+ legend: {
1402
+ top: "5%",
1403
+ left: "center",
1404
+ ...e?.legend || {}
1405
+ },
1406
+ xAxis: {
1407
+ type: "category",
1408
+ data: r.data.map((e) => e.name)
1409
+ },
1410
+ yAxis: { type: "value" },
1411
+ series: r?.option?.series || r.data?.map((e) => ({
1412
+ name: e?.name || "xx柱状图",
1413
+ type: "bar",
1414
+ data: e.value,
1415
+ barWidth: "20%"
1416
+ }))
1417
+ };
1418
+ });
1419
+ return (e, t) => (b(), n($, { option: i.value }, null, 8, ["option"]));
1420
+ }
1421
+ }), ct = {
1422
+ UiCard: V,
1423
+ UiTable: at,
1424
+ UiFilter: K,
1425
+ UiForm: q,
1426
+ UiEditor: J,
1427
+ UiTree: Y,
1428
+ UiInfiniteScroll: X,
1429
+ UiDescriptions: Z,
1430
+ UiDialog: Ue,
1431
+ UiPie: ot,
1432
+ UiSeries: $,
1433
+ UiBar: st
1434
+ }, lt = { install(e) {
1435
+ for (let [t, n] of Object.entries(ct)) e.component(t, n);
1436
+ } };
1437
+ //#endregion
1438
+ export { st as UiBar, V as UiCard, Z as UiDescriptions, Ue as UiDialog, J as UiEditor, K as UiFilter, q as UiForm, X as UiInfiniteScroll, ot as UiPie, $ as UiSeries, at as UiTable, Y as UiTree, lt as default };