yc-vep-ui 0.0.39 → 0.0.40
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/dist/entry.d.ts +11 -8
- package/dist/vep-ui.es.js +641 -666
- package/dist/vep-ui.umd.js +1 -1
- package/dist/yc-vep-ui.css +46 -63
- package/package.json +1 -2
package/dist/vep-ui.es.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import { ElButton as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { AiEditor as at } from "aieditor";
|
|
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, getCurrentInstance as d, h as f, mergeModels as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle 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 ne, ElInput as L, ElInputNumber as re, ElInputTag as ie, ElLink as R, ElRadioGroup as ae, ElSelect as oe, ElTag as z, ElText as B, ElTimeSelect as se } from "element-plus";
|
|
3
|
+
import { ArrowRight as ce, ArrowUp as le, CirclePlus as ue, Delete as de, DocumentAdd as fe, Edit as pe, Folder as me, MoreFilled as he, Promotion as ge, Refresh as V, Search as _e } from "@element-plus/icons-vue";
|
|
4
|
+
import { AiEditor as ve } from "aieditor";
|
|
6
5
|
//#region \0rolldown/runtime.js
|
|
7
|
-
var
|
|
6
|
+
var H = Object.defineProperty, ye = (e, t) => {
|
|
8
7
|
let n = {};
|
|
9
|
-
for (var r in e)
|
|
8
|
+
for (var r in e) H(n, r, {
|
|
10
9
|
get: e[r],
|
|
11
10
|
enumerable: !0
|
|
12
11
|
});
|
|
13
|
-
return t ||
|
|
14
|
-
},
|
|
12
|
+
return t || H(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
13
|
+
}, be = { class: /* @__PURE__ */ g({ bodyClass: !0 }) }, xe = /* @__PURE__ */ u({
|
|
15
14
|
__name: "index",
|
|
16
15
|
props: {
|
|
17
16
|
title: {},
|
|
@@ -20,94 +19,91 @@ var ot = Object.defineProperty, st = (e, t) => {
|
|
|
20
19
|
icon: {}
|
|
21
20
|
},
|
|
22
21
|
setup(e) {
|
|
23
|
-
let
|
|
22
|
+
let i = t(() => ({
|
|
24
23
|
display: "flex",
|
|
25
24
|
alignItems: "center",
|
|
26
25
|
gap: "4px",
|
|
27
26
|
borderBottom: e.hideBorder ? "1px solid #e5e7eb" : "none"
|
|
28
27
|
}));
|
|
29
|
-
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, [e.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
key: "0"
|
|
44
|
-
} : void 0]), 1040, ["class"]);
|
|
45
|
-
};
|
|
28
|
+
return (t, o) => (b(), n(D(T("el-card")), m(t.$attrs, { class: {
|
|
29
|
+
"ui-card": !0,
|
|
30
|
+
hideBorder: e.hideBorder
|
|
31
|
+
} }), s({
|
|
32
|
+
default: P(() => [a("div", be, [w(t.$slots, "default", {}, void 0, !0)])]),
|
|
33
|
+
_: 2
|
|
34
|
+
}, [e.title && e.title?.length > 0 ? {
|
|
35
|
+
name: "header",
|
|
36
|
+
fn: P(() => [a("div", { style: _(i.value) }, [e.icon ? (b(), n(D(T("el-icon")), { key: 0 }, {
|
|
37
|
+
default: P(() => [(b(), n(D(e.icon), { color: "#2563eb" }))]),
|
|
38
|
+
_: 1
|
|
39
|
+
})) : r("", !0), o[0] || (O(-1, !0), (o[0] = a("h4", null, [c(k(e.title), 1)])).cacheIndex = 0, O(1), o[0])], 4)]),
|
|
40
|
+
key: "0"
|
|
41
|
+
} : void 0]), 1040, ["class"]));
|
|
46
42
|
}
|
|
47
|
-
}),
|
|
43
|
+
}), U = (e, t) => {
|
|
48
44
|
let n = e.__vccOpts || e;
|
|
49
45
|
for (let [e, r] of t) n[e] = r;
|
|
50
46
|
return n;
|
|
51
|
-
},
|
|
47
|
+
}, W = /* @__PURE__ */ U(xe, [["__scopeId", "data-v-5df32072"]]);
|
|
52
48
|
//#endregion
|
|
53
49
|
//#region src/components/utils/render.ts
|
|
54
|
-
function
|
|
55
|
-
return
|
|
50
|
+
function Se(e) {
|
|
51
|
+
return f("template", { style: {
|
|
56
52
|
display: "flex",
|
|
57
53
|
flexDirection: "row",
|
|
58
54
|
flexWrap: "wrap"
|
|
59
55
|
} }, (Array.isArray(e) ? e : [e]).map((e) => {
|
|
60
|
-
let { text:
|
|
61
|
-
return
|
|
62
|
-
...
|
|
56
|
+
let { text: t, ...n } = e;
|
|
57
|
+
return f(I, {
|
|
58
|
+
...n,
|
|
63
59
|
link: !0,
|
|
64
60
|
size: "small",
|
|
65
61
|
type: e.type || "default"
|
|
66
|
-
}, () =>
|
|
62
|
+
}, () => t);
|
|
67
63
|
}));
|
|
68
64
|
}
|
|
69
|
-
function
|
|
70
|
-
return Array.isArray(e) ?
|
|
65
|
+
function Ce(e) {
|
|
66
|
+
return Array.isArray(e) ? f("div", { style: {
|
|
71
67
|
display: "flex",
|
|
72
68
|
gap: "8px",
|
|
73
69
|
flexDirection: "row",
|
|
74
70
|
flexWrap: "wrap"
|
|
75
|
-
} }, e.map((e) =>
|
|
71
|
+
} }, e.map((e) => f(R, {
|
|
76
72
|
...e,
|
|
77
73
|
type: e.type || "primary"
|
|
78
|
-
},
|
|
74
|
+
}, f(B, {
|
|
79
75
|
lineClamp: e?.lineClamp,
|
|
80
76
|
type: e.type || "primary"
|
|
81
|
-
}, () => e.prop)))) :
|
|
77
|
+
}, () => e.prop)))) : f(R, {
|
|
82
78
|
...e,
|
|
83
79
|
type: e.type || "primary"
|
|
84
|
-
},
|
|
80
|
+
}, f(B, {
|
|
85
81
|
lineClamp: e?.lineClamp,
|
|
86
82
|
type: e.type || "primary"
|
|
87
83
|
}, () => e.prop));
|
|
88
84
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
85
|
+
function we(e) {
|
|
86
|
+
return f("div", { style: {
|
|
91
87
|
display: "flex",
|
|
92
88
|
gap: "4px",
|
|
93
89
|
flexDirection: "row",
|
|
94
90
|
flexWrap: "wrap"
|
|
95
|
-
} }, (Array.isArray(e.prop) ? e.prop : [e.prop]).map((t) =>
|
|
91
|
+
} }, (Array.isArray(e.prop) ? e.prop : [e.prop]).map((t) => f(z, e, () => t)));
|
|
96
92
|
}
|
|
97
|
-
function
|
|
98
|
-
return
|
|
93
|
+
function Te(e) {
|
|
94
|
+
return f(z, { ...e });
|
|
99
95
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
96
|
+
function Ee(e) {
|
|
97
|
+
return f(oe, {
|
|
102
98
|
style: { minWidth: "160px" },
|
|
103
99
|
...e,
|
|
104
100
|
placeholder: "请选择",
|
|
105
101
|
filterable: !0
|
|
106
102
|
});
|
|
107
103
|
}
|
|
108
|
-
function
|
|
104
|
+
function De(e) {
|
|
109
105
|
let t = e?.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
110
|
-
return
|
|
106
|
+
return f(ne, {
|
|
111
107
|
format: t,
|
|
112
108
|
valueFormat: t,
|
|
113
109
|
startPlaceholder: "开始时间",
|
|
@@ -117,9 +113,9 @@ function gt(e) {
|
|
|
117
113
|
"onUpdate:modelValue": (t) => e?.onChange?.(t)
|
|
118
114
|
});
|
|
119
115
|
}
|
|
120
|
-
function
|
|
116
|
+
function Oe(e) {
|
|
121
117
|
let { start: t = "00:00", end: n = "23:30", ...r } = e;
|
|
122
|
-
return
|
|
118
|
+
return f(se, {
|
|
123
119
|
start: t,
|
|
124
120
|
end: n,
|
|
125
121
|
...r,
|
|
@@ -127,15 +123,15 @@ function _t(e) {
|
|
|
127
123
|
filterable: !0
|
|
128
124
|
});
|
|
129
125
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
126
|
+
function ke(e) {
|
|
127
|
+
return f(L, {
|
|
132
128
|
...e,
|
|
133
129
|
placeholder: "请输入"
|
|
134
130
|
});
|
|
135
131
|
}
|
|
136
|
-
function
|
|
132
|
+
function Ae(e) {
|
|
137
133
|
let { align: t = "left", controlsPosition: n = "right", ...r } = e;
|
|
138
|
-
return
|
|
134
|
+
return f(re, {
|
|
139
135
|
align: t,
|
|
140
136
|
style: {
|
|
141
137
|
...e?.style || {},
|
|
@@ -146,47 +142,47 @@ function yt(e) {
|
|
|
146
142
|
...r
|
|
147
143
|
});
|
|
148
144
|
}
|
|
149
|
-
function
|
|
145
|
+
function je(e) {
|
|
150
146
|
let { rows: t = 1, ...n } = e;
|
|
151
|
-
return
|
|
147
|
+
return f(L, {
|
|
152
148
|
placeholder: "请输入",
|
|
153
149
|
rows: t,
|
|
154
150
|
...n,
|
|
155
151
|
type: "textarea"
|
|
156
152
|
});
|
|
157
153
|
}
|
|
158
|
-
function
|
|
159
|
-
return
|
|
154
|
+
function Me(e) {
|
|
155
|
+
return f(ie, {
|
|
160
156
|
placeholder: "请输入",
|
|
161
157
|
...e,
|
|
162
158
|
clearable: !1
|
|
163
159
|
});
|
|
164
160
|
}
|
|
165
|
-
function
|
|
166
|
-
return
|
|
161
|
+
function Ne(e) {
|
|
162
|
+
return f(Q, e);
|
|
167
163
|
}
|
|
168
|
-
function
|
|
169
|
-
return
|
|
164
|
+
function Pe(e) {
|
|
165
|
+
return f(ae, e);
|
|
170
166
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
167
|
+
function Fe(e) {
|
|
168
|
+
return f(B, e, () => e.prop);
|
|
173
169
|
}
|
|
174
|
-
var
|
|
175
|
-
button:
|
|
176
|
-
link:
|
|
177
|
-
tag:
|
|
178
|
-
switch:
|
|
179
|
-
select:
|
|
180
|
-
datePicker:
|
|
181
|
-
timeSelect:
|
|
182
|
-
input:
|
|
183
|
-
inputNumber:
|
|
184
|
-
textarea:
|
|
185
|
-
inputTag:
|
|
186
|
-
editor:
|
|
187
|
-
radio:
|
|
188
|
-
text:
|
|
189
|
-
},
|
|
170
|
+
var G = {
|
|
171
|
+
button: Se,
|
|
172
|
+
link: Ce,
|
|
173
|
+
tag: we,
|
|
174
|
+
switch: Te,
|
|
175
|
+
select: Ee,
|
|
176
|
+
datePicker: De,
|
|
177
|
+
timeSelect: Oe,
|
|
178
|
+
input: ke,
|
|
179
|
+
inputNumber: Ae,
|
|
180
|
+
textarea: je,
|
|
181
|
+
inputTag: Me,
|
|
182
|
+
editor: Ne,
|
|
183
|
+
radio: Pe,
|
|
184
|
+
text: Fe
|
|
185
|
+
}, Ie = /* @__PURE__ */ u({
|
|
190
186
|
name: "UiColumn",
|
|
191
187
|
__name: "UiColumn",
|
|
192
188
|
props: {
|
|
@@ -197,69 +193,69 @@ var Y = {
|
|
|
197
193
|
size: {}
|
|
198
194
|
},
|
|
199
195
|
emits: ["update:data"],
|
|
200
|
-
setup(
|
|
201
|
-
let
|
|
202
|
-
function
|
|
203
|
-
let
|
|
204
|
-
Object.keys(
|
|
205
|
-
let
|
|
206
|
-
|
|
207
|
-
let
|
|
196
|
+
setup(t, { emit: a }) {
|
|
197
|
+
let o = a, s = t;
|
|
198
|
+
function l(e, t, n) {
|
|
199
|
+
let r = {};
|
|
200
|
+
Object.keys(G).forEach((i) => {
|
|
201
|
+
let a = i;
|
|
202
|
+
r[a] = (r) => {
|
|
203
|
+
let i = Array.isArray(r) ? r : {
|
|
208
204
|
placeholder: "请输入",
|
|
209
205
|
filterable: !0,
|
|
210
|
-
...
|
|
211
|
-
prop:
|
|
212
|
-
modelValue:
|
|
213
|
-
onChange:
|
|
214
|
-
onInput:
|
|
206
|
+
...r,
|
|
207
|
+
prop: r?.prop || e[n.prop],
|
|
208
|
+
modelValue: r?.prop || e[n.prop],
|
|
209
|
+
onChange: r?.onChange || ((e) => o("update:data", t, n.prop, e)),
|
|
210
|
+
onInput: r?.onInput || ((e) => o("update:data", t, n.prop, e))
|
|
215
211
|
};
|
|
216
|
-
return
|
|
212
|
+
return G[a](i);
|
|
217
213
|
};
|
|
218
214
|
});
|
|
219
|
-
let
|
|
215
|
+
let i = n.render ? n.render({
|
|
220
216
|
data: e,
|
|
221
217
|
index: t,
|
|
222
|
-
h:
|
|
223
|
-
column:
|
|
218
|
+
h: r,
|
|
219
|
+
column: n
|
|
224
220
|
}) : null;
|
|
225
|
-
return
|
|
221
|
+
return i ? typeof i == "object" ? i : f("div", { innerHTML: String(i) }) : null;
|
|
226
222
|
}
|
|
227
|
-
return (
|
|
228
|
-
let
|
|
229
|
-
return
|
|
223
|
+
return (a, o) => {
|
|
224
|
+
let u = T("UiColumn", !0);
|
|
225
|
+
return t.column?.children && t.column?.children?.length > 0 ? (b(), n(D(T("el-table-column")), {
|
|
230
226
|
key: 0,
|
|
231
|
-
label:
|
|
232
|
-
align:
|
|
227
|
+
label: t.column.label,
|
|
228
|
+
align: s.align
|
|
233
229
|
}, {
|
|
234
|
-
default:
|
|
230
|
+
default: P(() => [(b(!0), i(e, null, C(t.column.children, (e) => (b(), n(u, m({
|
|
235
231
|
column: e,
|
|
236
|
-
data:
|
|
237
|
-
}, { ref_for: !0 },
|
|
232
|
+
data: s.data
|
|
233
|
+
}, { ref_for: !0 }, a.$attrs, { align: s.align }), null, 16, [
|
|
238
234
|
"column",
|
|
239
235
|
"data",
|
|
240
236
|
"align"
|
|
241
237
|
]))), 256))]),
|
|
242
238
|
_: 1
|
|
243
|
-
}, 8, ["label", "align"])) : (
|
|
239
|
+
}, 8, ["label", "align"])) : (b(), n(D(T("el-table-column")), {
|
|
244
240
|
key: 1,
|
|
245
|
-
prop: String(
|
|
246
|
-
label:
|
|
247
|
-
"column-key": String(
|
|
248
|
-
align:
|
|
249
|
-
width:
|
|
250
|
-
"show-overflow-tooltip":
|
|
241
|
+
prop: String(t.column.prop),
|
|
242
|
+
label: t.column.label,
|
|
243
|
+
"column-key": String(t.column.prop),
|
|
244
|
+
align: s.align,
|
|
245
|
+
width: t.column.width,
|
|
246
|
+
"show-overflow-tooltip": t.column.showOverflowTooltip
|
|
251
247
|
}, {
|
|
252
|
-
default:
|
|
248
|
+
default: P((a) => [a?.row ? (b(), i(e, { key: 0 }, [t.column.render ? (b(), n(D(l(a.row, a.$index, t.column)), {
|
|
253
249
|
key: 0,
|
|
254
|
-
align:
|
|
255
|
-
size:
|
|
256
|
-
}, null, 8, ["align", "size"])) : (
|
|
250
|
+
align: s.align,
|
|
251
|
+
size: s.size
|
|
252
|
+
}, null, 8, ["align", "size"])) : (b(), n(D(T("el-text")), {
|
|
257
253
|
key: 1,
|
|
258
|
-
"line-clamp":
|
|
254
|
+
"line-clamp": t.column?.lineClamp || 2
|
|
259
255
|
}, {
|
|
260
|
-
default:
|
|
256
|
+
default: P(() => [c(k(a.row[t.column.prop]), 1)]),
|
|
261
257
|
_: 2
|
|
262
|
-
}, 1032, ["line-clamp"]))], 64)) :
|
|
258
|
+
}, 1032, ["line-clamp"]))], 64)) : r("", !0)]),
|
|
263
259
|
_: 1
|
|
264
260
|
}, 8, [
|
|
265
261
|
"prop",
|
|
@@ -271,7 +267,7 @@ var Y = {
|
|
|
271
267
|
]));
|
|
272
268
|
};
|
|
273
269
|
}
|
|
274
|
-
}),
|
|
270
|
+
}), K = /* @__PURE__ */ U(/* @__PURE__ */ u({
|
|
275
271
|
__name: "index",
|
|
276
272
|
props: {
|
|
277
273
|
loading: {
|
|
@@ -283,14 +279,14 @@ var Y = {
|
|
|
283
279
|
default: !1
|
|
284
280
|
},
|
|
285
281
|
size: { default: "default" },
|
|
286
|
-
data: { default: () =>
|
|
282
|
+
data: { default: () => x([]) },
|
|
287
283
|
columns: {},
|
|
288
284
|
align: { default: "left" },
|
|
289
285
|
hidePagination: {
|
|
290
286
|
type: Boolean,
|
|
291
287
|
default: !1
|
|
292
288
|
},
|
|
293
|
-
pagination: { default: () =>
|
|
289
|
+
pagination: { default: () => x({
|
|
294
290
|
page: 1,
|
|
295
291
|
pageSize: 10,
|
|
296
292
|
total: 0,
|
|
@@ -307,8 +303,8 @@ var Y = {
|
|
|
307
303
|
rowKey: {}
|
|
308
304
|
},
|
|
309
305
|
emits: ["pagination"],
|
|
310
|
-
setup(
|
|
311
|
-
let
|
|
306
|
+
setup(a, { emit: s }) {
|
|
307
|
+
let c = s, l = o(a, [
|
|
312
308
|
"loading",
|
|
313
309
|
"border",
|
|
314
310
|
"align",
|
|
@@ -316,59 +312,59 @@ var Y = {
|
|
|
316
312
|
"pagination",
|
|
317
313
|
"data",
|
|
318
314
|
"size"
|
|
319
|
-
]),
|
|
320
|
-
|
|
321
|
-
!e?.length || !t?.length ||
|
|
322
|
-
if (!
|
|
315
|
+
]), u = S(), d = t(() => A(l.columns)?.some((e) => e.type === "index")), f = t(() => A(l.columns)?.some((e) => e.type === "selection")), p = t(() => !l.columns || !l.columns.length ? [] : l.columns.filter((e) => e.type !== "index" && e.type !== "selection"));
|
|
316
|
+
N(() => [l.defaultCheckedKeys, a.data], ([e, t]) => {
|
|
317
|
+
!e?.length || !t?.length || h(() => {
|
|
318
|
+
if (!u.value) return;
|
|
323
319
|
let n = t.filter((t) => e.includes(t.id));
|
|
324
|
-
|
|
320
|
+
u.value.clearSelection(), n.forEach((e) => u.value?.toggleRowSelection(e, !0));
|
|
325
321
|
});
|
|
326
322
|
}, { immediate: !0 });
|
|
327
|
-
function
|
|
328
|
-
|
|
323
|
+
function g(e, t) {
|
|
324
|
+
a.pagination.page = e || a.pagination.page, a.pagination.pageSize = t || a.pagination.pageSize, c("pagination", A(a.pagination));
|
|
329
325
|
}
|
|
330
|
-
function
|
|
331
|
-
|
|
332
|
-
...
|
|
333
|
-
[
|
|
326
|
+
function _(e, t, n) {
|
|
327
|
+
a.data[e] && (a.data[e] = {
|
|
328
|
+
...a.data[e],
|
|
329
|
+
[t]: n
|
|
334
330
|
});
|
|
335
331
|
}
|
|
336
|
-
return (t,
|
|
337
|
-
let
|
|
338
|
-
return
|
|
339
|
-
|
|
340
|
-
data:
|
|
332
|
+
return (t, o) => {
|
|
333
|
+
let s = E("loading");
|
|
334
|
+
return b(), i("div", null, [
|
|
335
|
+
F((b(), n(D(T("el-table")), m({ border: a.border }, t.$attrs, {
|
|
336
|
+
data: a.data,
|
|
341
337
|
lazy: !0,
|
|
342
338
|
class: "ui-table",
|
|
343
339
|
fit: "",
|
|
344
340
|
ref_key: "tableRef",
|
|
345
|
-
ref:
|
|
341
|
+
ref: u
|
|
346
342
|
}), {
|
|
347
|
-
default:
|
|
348
|
-
|
|
343
|
+
default: P(() => [
|
|
344
|
+
f.value ? (b(), n(D(T("el-table-column")), {
|
|
349
345
|
key: 0,
|
|
350
346
|
type: "selection",
|
|
351
|
-
selectable:
|
|
347
|
+
selectable: l.selectable,
|
|
352
348
|
"column-key": "selection_0",
|
|
353
|
-
align:
|
|
349
|
+
align: a.align,
|
|
354
350
|
fixed: "left"
|
|
355
|
-
}, null, 8, ["selectable", "align"])) :
|
|
356
|
-
|
|
351
|
+
}, null, 8, ["selectable", "align"])) : r("", !0),
|
|
352
|
+
d.value ? (b(), n(D(T("el-table-column")), {
|
|
357
353
|
key: 1,
|
|
358
354
|
fixed: "left",
|
|
359
355
|
type: "index",
|
|
360
356
|
label: "序号",
|
|
361
357
|
width: "60",
|
|
362
358
|
"column-key": "index_1",
|
|
363
|
-
align:
|
|
364
|
-
}, null, 8, ["align"])) :
|
|
365
|
-
(
|
|
366
|
-
key:
|
|
367
|
-
column:
|
|
368
|
-
data:
|
|
369
|
-
align:
|
|
370
|
-
"onUpdate:data":
|
|
371
|
-
size:
|
|
359
|
+
align: a.align
|
|
360
|
+
}, null, 8, ["align"])) : r("", !0),
|
|
361
|
+
(b(!0), i(e, null, C(p.value, (e, t) => (b(), n(Ie, {
|
|
362
|
+
key: t + "column_" + e?.prop?.toString(),
|
|
363
|
+
column: e,
|
|
364
|
+
data: a.data,
|
|
365
|
+
align: a.align,
|
|
366
|
+
"onUpdate:data": _,
|
|
367
|
+
size: a.size
|
|
372
368
|
}, null, 8, [
|
|
373
369
|
"column",
|
|
374
370
|
"data",
|
|
@@ -377,47 +373,47 @@ var Y = {
|
|
|
377
373
|
]))), 128))
|
|
378
374
|
]),
|
|
379
375
|
_: 1
|
|
380
|
-
}, 16, ["border", "data"])), [[
|
|
381
|
-
|
|
376
|
+
}, 16, ["border", "data"])), [[s, a.loading]]),
|
|
377
|
+
a.hidePagination ? r("", !0) : (b(), n(D(T("el-pagination")), {
|
|
382
378
|
key: 0,
|
|
383
379
|
class: "ui-pagination",
|
|
384
380
|
size: "small",
|
|
385
381
|
background: "",
|
|
386
382
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
387
|
-
"page-sizes":
|
|
383
|
+
"page-sizes": a.pagination?.pageSizes || [
|
|
388
384
|
10,
|
|
389
385
|
20,
|
|
390
386
|
50
|
|
391
387
|
],
|
|
392
|
-
"page-size":
|
|
393
|
-
"onUpdate:pageSize":
|
|
394
|
-
"current-page":
|
|
395
|
-
"onUpdate:currentPage":
|
|
396
|
-
total:
|
|
397
|
-
"onUpdate:total":
|
|
398
|
-
onChange:
|
|
399
|
-
}, null,
|
|
388
|
+
"page-size": a.pagination.pageSize,
|
|
389
|
+
"onUpdate:pageSize": o[0] ||= (e) => a.pagination.pageSize = e,
|
|
390
|
+
"current-page": a.pagination.page,
|
|
391
|
+
"onUpdate:currentPage": o[1] ||= (e) => a.pagination.page = e,
|
|
392
|
+
total: a.pagination.total,
|
|
393
|
+
"onUpdate:total": o[2] ||= (e) => a.pagination.total = e,
|
|
394
|
+
onChange: g
|
|
395
|
+
}, null, 40, [
|
|
400
396
|
"page-sizes",
|
|
401
397
|
"page-size",
|
|
402
398
|
"current-page",
|
|
403
399
|
"total"
|
|
404
400
|
])),
|
|
405
|
-
|
|
401
|
+
w(t.$slots, "default", {}, void 0, !0)
|
|
406
402
|
]);
|
|
407
403
|
};
|
|
408
404
|
}
|
|
409
|
-
}), [["__scopeId", "data-v-
|
|
405
|
+
}), [["__scopeId", "data-v-318e4e13"]]);
|
|
410
406
|
//#endregion
|
|
411
407
|
//#region src/components/utils/tools.ts
|
|
412
|
-
function
|
|
408
|
+
function Le(e) {
|
|
413
409
|
return typeof e == "number" ? e + "px" : e || "100px";
|
|
414
410
|
}
|
|
415
|
-
function
|
|
411
|
+
function q(e) {
|
|
416
412
|
return typeof e == "number" ? e + "px" : e || "180px";
|
|
417
413
|
}
|
|
418
|
-
function
|
|
414
|
+
function J(e, t) {
|
|
419
415
|
let n = {};
|
|
420
|
-
return Object.keys(
|
|
416
|
+
return Object.keys(G).forEach((r) => {
|
|
421
417
|
let i = r;
|
|
422
418
|
n[i] = (n = {}) => ({
|
|
423
419
|
props: {
|
|
@@ -427,20 +423,20 @@ function Z(e, t) {
|
|
|
427
423
|
onChange: (r) => n.onChange?.(r) || (t[e.prop] = r)
|
|
428
424
|
},
|
|
429
425
|
type: i,
|
|
430
|
-
component:
|
|
426
|
+
component: G[i]
|
|
431
427
|
});
|
|
432
428
|
}), ((n) => typeof e.render == "function" ? e.render({
|
|
433
429
|
h: n,
|
|
434
430
|
data: t
|
|
435
431
|
}) : n.input(n.props || {}))(n);
|
|
436
432
|
}
|
|
437
|
-
function
|
|
438
|
-
let n =
|
|
433
|
+
function Y(e, t) {
|
|
434
|
+
let n = J(e, t);
|
|
439
435
|
return typeof n == "object" && (n.component ||= n), n;
|
|
440
436
|
}
|
|
441
437
|
//#endregion
|
|
442
438
|
//#region src/components/Filter/index.vue?vue&type=script&setup=true&lang.ts
|
|
443
|
-
var
|
|
439
|
+
var Re = { class: "filter-buttons" }, X = /* @__PURE__ */ U(/* @__PURE__ */ u({
|
|
444
440
|
name: "UiDefaultFilter",
|
|
445
441
|
__name: "index",
|
|
446
442
|
props: {
|
|
@@ -461,8 +457,8 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
461
457
|
"reset",
|
|
462
458
|
"search"
|
|
463
459
|
],
|
|
464
|
-
setup(
|
|
465
|
-
let
|
|
460
|
+
setup(s, { emit: l }) {
|
|
461
|
+
let u = l, d = o(s, [
|
|
466
462
|
"fields",
|
|
467
463
|
"labelWidth",
|
|
468
464
|
"valueWidth",
|
|
@@ -470,138 +466,135 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
470
466
|
"column",
|
|
471
467
|
"size",
|
|
472
468
|
"filterFixedValues"
|
|
473
|
-
]),
|
|
469
|
+
]), f = x({
|
|
474
470
|
expandNum: 0,
|
|
475
471
|
expand: !1
|
|
476
|
-
}),
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
let t =
|
|
480
|
-
t !== void 0 && (
|
|
472
|
+
}), p = x({}), h = t(() => s.fields.slice(0, f.expand ? s.fields.length : f.expandNum)), g = t(() => 24 - h.value?.reduce((e, t) => e + (t.span || 24 / s.column), 0) % 24 - 24 / s.column);
|
|
473
|
+
v(() => {
|
|
474
|
+
f.expandNum = d?.expandNum ?? 2 * s.column - 1, s.fields.forEach((e) => {
|
|
475
|
+
let t = J(e, p)?.props?.defaultValue;
|
|
476
|
+
t !== void 0 && (p[e.prop] = t);
|
|
481
477
|
});
|
|
482
478
|
});
|
|
483
|
-
function
|
|
484
|
-
let
|
|
485
|
-
Object.keys(
|
|
486
|
-
if (
|
|
487
|
-
let n =
|
|
488
|
-
t
|
|
479
|
+
function y() {
|
|
480
|
+
let e = {};
|
|
481
|
+
Object.keys(p).forEach((t) => {
|
|
482
|
+
if (p[t] !== void 0) {
|
|
483
|
+
let n = A(p[t]);
|
|
484
|
+
e[t] = typeof n == "string" ? n.trim() : n;
|
|
489
485
|
}
|
|
490
|
-
}),
|
|
491
|
-
...
|
|
492
|
-
...
|
|
493
|
-
}),
|
|
494
|
-
...
|
|
495
|
-
...
|
|
486
|
+
}), u("submit", {
|
|
487
|
+
...e,
|
|
488
|
+
...s.filterFixedValues
|
|
489
|
+
}), u("search", {
|
|
490
|
+
...e,
|
|
491
|
+
...s.filterFixedValues
|
|
496
492
|
});
|
|
497
493
|
}
|
|
498
|
-
function
|
|
499
|
-
Object.keys(
|
|
500
|
-
|
|
501
|
-
}),
|
|
494
|
+
function S() {
|
|
495
|
+
Object.keys(p).forEach((e) => {
|
|
496
|
+
s.omitFields.includes(e) || (p[e] = void 0);
|
|
497
|
+
}), u("reset", p);
|
|
502
498
|
}
|
|
503
|
-
return (t,
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
"onUpdate:modelValue",
|
|
539
|
-
"style"
|
|
540
|
-
]))]),
|
|
541
|
-
_: 2
|
|
542
|
-
}, 1032, [
|
|
543
|
-
"label",
|
|
544
|
-
"label-width",
|
|
545
|
-
"value-width"
|
|
499
|
+
return (t, o) => (b(), n(D(T("el-form")), m({
|
|
500
|
+
model: p,
|
|
501
|
+
class: "ui-filter",
|
|
502
|
+
size: s.size
|
|
503
|
+
}, t.$attrs), {
|
|
504
|
+
default: P(() => [(b(), n(D(T("el-row")), { gutter: 20 }, {
|
|
505
|
+
default: P(() => [(b(!0), i(e, null, C(h.value, (e) => (b(), n(D(T("el-col")), { span: e.span || 24 / s.column }, {
|
|
506
|
+
default: P(() => [(b(), n(D(T("el-form-item")), {
|
|
507
|
+
key: e.prop,
|
|
508
|
+
label: e.label,
|
|
509
|
+
"label-width": j(Le)(e?.labelWidth || s.labelWidth),
|
|
510
|
+
"value-width": j(q)(e?.valueWidth || s.valueWidth)
|
|
511
|
+
}, {
|
|
512
|
+
default: P(() => [e.render ? (b(), n(D(j(J)(e, p).component), m({
|
|
513
|
+
key: 0,
|
|
514
|
+
modelValue: p[e.prop],
|
|
515
|
+
"onUpdate:modelValue": (t) => p[e.prop] = t
|
|
516
|
+
}, { ref_for: !0 }, j(J)(e, p).props, {
|
|
517
|
+
clearable: !0,
|
|
518
|
+
style: { width: j(q)(e?.valueWidth || s.valueWidth) }
|
|
519
|
+
}), null, 16, [
|
|
520
|
+
"modelValue",
|
|
521
|
+
"onUpdate:modelValue",
|
|
522
|
+
"style"
|
|
523
|
+
])) : (b(), n(D(T("el-input")), {
|
|
524
|
+
key: 1,
|
|
525
|
+
modelValue: p[e.prop],
|
|
526
|
+
"onUpdate:modelValue": (t) => p[e.prop] = t,
|
|
527
|
+
placeholder: "请输入",
|
|
528
|
+
clearable: !0,
|
|
529
|
+
style: _({ width: j(q)(e?.valueWidth || s.valueWidth) })
|
|
530
|
+
}, null, 8, [
|
|
531
|
+
"modelValue",
|
|
532
|
+
"onUpdate:modelValue",
|
|
533
|
+
"style"
|
|
546
534
|
]))]),
|
|
547
535
|
_: 2
|
|
548
|
-
}, 1032, [
|
|
549
|
-
|
|
550
|
-
|
|
536
|
+
}, 1032, [
|
|
537
|
+
"label",
|
|
538
|
+
"label-width",
|
|
539
|
+
"value-width"
|
|
540
|
+
]))]),
|
|
541
|
+
_: 2
|
|
542
|
+
}, 1032, ["span"]))), 256)), (b(), n(D(T("el-col")), {
|
|
543
|
+
span: 24 / s.column,
|
|
544
|
+
offset: g.value
|
|
545
|
+
}, {
|
|
546
|
+
default: P(() => [(b(), n(D(T("el-form-item")), {
|
|
547
|
+
label: "",
|
|
548
|
+
"label-width": "30px"
|
|
551
549
|
}, {
|
|
552
|
-
default:
|
|
553
|
-
|
|
554
|
-
"
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}, 8, ["icon"]),
|
|
582
|
-
z(t.$slots, "handle", { form: a }, void 0, !0),
|
|
583
|
-
z(t.$slots, "right", { form: a }, void 0, !0)
|
|
584
|
-
])]),
|
|
585
|
-
_: 3
|
|
586
|
-
})]),
|
|
550
|
+
default: P(() => [a("div", Re, [
|
|
551
|
+
w(t.$slots, "left", { form: p }, void 0, !0),
|
|
552
|
+
s.fields.length >= 2 * s.column ? (b(), n(D(T("el-button")), {
|
|
553
|
+
key: 0,
|
|
554
|
+
text: "",
|
|
555
|
+
icon: f.expand ? j(le) : j(ce),
|
|
556
|
+
onClick: o[0] ||= (e) => f.expand = !f.expand
|
|
557
|
+
}, {
|
|
558
|
+
default: P(() => [c(k(f.expand ? "收起" : "展开"), 1)]),
|
|
559
|
+
_: 1
|
|
560
|
+
}, 8, ["icon"])) : r("", !0),
|
|
561
|
+
(b(), n(D(T("el-button")), {
|
|
562
|
+
icon: j(_e),
|
|
563
|
+
type: "primary",
|
|
564
|
+
onClick: y
|
|
565
|
+
}, {
|
|
566
|
+
default: P(() => [...o[1] ||= [c("查询", -1)]]),
|
|
567
|
+
_: 1
|
|
568
|
+
}, 8, ["icon"])),
|
|
569
|
+
(b(), n(D(T("el-button")), {
|
|
570
|
+
icon: j(V),
|
|
571
|
+
onClick: S
|
|
572
|
+
}, {
|
|
573
|
+
default: P(() => [...o[2] ||= [c("重置", -1)]]),
|
|
574
|
+
_: 1
|
|
575
|
+
}, 8, ["icon"])),
|
|
576
|
+
w(t.$slots, "handle", { form: p }, void 0, !0),
|
|
577
|
+
w(t.$slots, "right", { form: p }, void 0, !0)
|
|
578
|
+
])]),
|
|
587
579
|
_: 3
|
|
588
|
-
}
|
|
580
|
+
}))]),
|
|
589
581
|
_: 3
|
|
590
|
-
})]),
|
|
582
|
+
}, 8, ["span", "offset"]))]),
|
|
591
583
|
_: 3
|
|
592
|
-
}
|
|
593
|
-
|
|
584
|
+
}))]),
|
|
585
|
+
_: 3
|
|
586
|
+
}, 16, ["model", "size"]));
|
|
594
587
|
}
|
|
595
|
-
}), [["__scopeId", "data-v-
|
|
588
|
+
}), [["__scopeId", "data-v-47b940ac"]]), ze = {
|
|
596
589
|
key: 0,
|
|
597
590
|
style: { display: "inline-block" }
|
|
598
|
-
},
|
|
591
|
+
}, Be = {
|
|
599
592
|
key: 0,
|
|
600
593
|
style: { display: "inline-block" }
|
|
601
|
-
},
|
|
594
|
+
}, Ve = {
|
|
602
595
|
key: 0,
|
|
603
596
|
class: "ui-form-buttons"
|
|
604
|
-
},
|
|
597
|
+
}, Z = /* @__PURE__ */ U(/* @__PURE__ */ u({
|
|
605
598
|
__name: "index",
|
|
606
599
|
props: {
|
|
607
600
|
fields: {},
|
|
@@ -610,7 +603,7 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
610
603
|
labelWidth: { default: "100px" },
|
|
611
604
|
labelPosition: { default: "top" },
|
|
612
605
|
omitFields: { default: () => [] },
|
|
613
|
-
rules: { default: () =>
|
|
606
|
+
rules: { default: () => x({}) },
|
|
614
607
|
required: { type: Boolean },
|
|
615
608
|
column: { default: 24 },
|
|
616
609
|
defaultValues: {},
|
|
@@ -619,9 +612,9 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
619
612
|
size: {}
|
|
620
613
|
},
|
|
621
614
|
emits: ["submit", "reset"],
|
|
622
|
-
setup(
|
|
623
|
-
|
|
624
|
-
let
|
|
615
|
+
setup(a, { expose: s, emit: l }) {
|
|
616
|
+
ee((e) => ({ c0267e42: e.column / 2 }));
|
|
617
|
+
let u = l, d = o(a, [
|
|
625
618
|
"fields",
|
|
626
619
|
"labelWidth",
|
|
627
620
|
"valueWidth",
|
|
@@ -630,180 +623,177 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
630
623
|
"labelPosition",
|
|
631
624
|
"valueModel",
|
|
632
625
|
"column"
|
|
633
|
-
]),
|
|
634
|
-
let
|
|
635
|
-
return
|
|
636
|
-
let n =
|
|
637
|
-
|
|
638
|
-
let n =
|
|
639
|
-
|
|
626
|
+
]), f = S(0), p = S(), h = x({}), v = t(() => {
|
|
627
|
+
let e = A(h);
|
|
628
|
+
return a.fields.forEach((t) => {
|
|
629
|
+
let n = t.prop ? e?.[t.prop] : void 0, r = Y(t, h)?.props?.defaultValue;
|
|
630
|
+
h[t.prop] = n ?? r ?? void 0, t?.slots && t?.slots?.length > 0 && t.slots.forEach((t) => {
|
|
631
|
+
let n = t.prop ? e?.[t.prop] : void 0, r = Y(t, h)?.props?.defaultValue;
|
|
632
|
+
h[t.prop] = n ?? r ?? void 0;
|
|
640
633
|
});
|
|
641
|
-
}),
|
|
642
|
-
}),
|
|
643
|
-
if (
|
|
644
|
-
let
|
|
645
|
-
return
|
|
646
|
-
|
|
634
|
+
}), a.fields.filter((e) => typeof e.prop == "string");
|
|
635
|
+
}), y = t(() => {
|
|
636
|
+
if (a.rules && Object.keys(a.rules).length) return a.rules;
|
|
637
|
+
let e = {};
|
|
638
|
+
return v.value.forEach((t) => {
|
|
639
|
+
t.rules && Object.keys(t.rules).length ? e[t.prop] = t.rules : t.required && (e[t.prop] = [{
|
|
647
640
|
required: !0,
|
|
648
|
-
message: "请输入" +
|
|
641
|
+
message: "请输入" + t.label,
|
|
649
642
|
trigger: "change"
|
|
650
643
|
}]);
|
|
651
|
-
}),
|
|
644
|
+
}), e;
|
|
652
645
|
});
|
|
653
|
-
|
|
654
|
-
Object.assign(
|
|
646
|
+
te(() => {
|
|
647
|
+
Object.assign(h, d?.form);
|
|
655
648
|
});
|
|
656
|
-
async function
|
|
649
|
+
async function E(e) {
|
|
657
650
|
let t = !0;
|
|
658
651
|
if (await e.validate((e) => {
|
|
659
652
|
t = e;
|
|
660
653
|
}), !t) return;
|
|
661
654
|
let n = {};
|
|
662
|
-
Object.keys(
|
|
663
|
-
|
|
664
|
-
}),
|
|
655
|
+
Object.keys(h).forEach((e) => {
|
|
656
|
+
h[e] !== void 0 && (n[e] = A(h[e]));
|
|
657
|
+
}), u("submit", n);
|
|
665
658
|
}
|
|
666
|
-
function
|
|
667
|
-
|
|
659
|
+
function O() {
|
|
660
|
+
p && p.value?.clearValidate();
|
|
668
661
|
}
|
|
669
|
-
function
|
|
670
|
-
Object.keys(
|
|
671
|
-
|
|
672
|
-
}),
|
|
662
|
+
function M() {
|
|
663
|
+
Object.keys(h).forEach((e) => {
|
|
664
|
+
a.omitFields.includes(e) || (h[e] = void 0);
|
|
665
|
+
}), f.value += 1, u("reset", h);
|
|
673
666
|
}
|
|
674
|
-
function
|
|
675
|
-
return
|
|
667
|
+
function N() {
|
|
668
|
+
return h;
|
|
676
669
|
}
|
|
677
|
-
function
|
|
670
|
+
function F(e) {
|
|
678
671
|
Object.keys(e).forEach((t) => {
|
|
679
|
-
|
|
672
|
+
h[t] = e[t];
|
|
680
673
|
});
|
|
681
674
|
}
|
|
682
|
-
async function
|
|
675
|
+
async function I() {
|
|
683
676
|
return new Promise((e) => {
|
|
684
|
-
|
|
677
|
+
p.value?.validate((t, n) => e(n));
|
|
685
678
|
});
|
|
686
679
|
}
|
|
687
|
-
return
|
|
688
|
-
getValues:
|
|
689
|
-
setValues:
|
|
690
|
-
clearValidate:
|
|
691
|
-
onSubmit:
|
|
692
|
-
validate:
|
|
693
|
-
}), (t,
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
"
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
}, 8, ["icon", "size"])
|
|
801
|
-
]))], 64);
|
|
802
|
-
};
|
|
680
|
+
return s({
|
|
681
|
+
getValues: N,
|
|
682
|
+
setValues: F,
|
|
683
|
+
clearValidate: O,
|
|
684
|
+
onSubmit: E,
|
|
685
|
+
validate: I
|
|
686
|
+
}), (t, o) => (b(), i(e, null, [(b(), n(D(T("el-form")), m({
|
|
687
|
+
ref_key: "uiFormRef",
|
|
688
|
+
ref: p,
|
|
689
|
+
model: h
|
|
690
|
+
}, t.$attrs, {
|
|
691
|
+
rules: y.value,
|
|
692
|
+
inline: a.labelPosition !== "top",
|
|
693
|
+
"label-position": a.labelPosition,
|
|
694
|
+
class: {
|
|
695
|
+
"ui-form": !0,
|
|
696
|
+
horizontal: a.labelPosition !== "top"
|
|
697
|
+
},
|
|
698
|
+
"validate-on-rule-change": !1
|
|
699
|
+
}), {
|
|
700
|
+
default: P(() => [(b(!0), i(e, null, C(v.value, (r) => (b(), n(D(T("el-form-item")), {
|
|
701
|
+
key: r.prop,
|
|
702
|
+
label: r.label,
|
|
703
|
+
"label-width": a.labelWidth,
|
|
704
|
+
"value-width": a.valueWidth,
|
|
705
|
+
prop: r.prop,
|
|
706
|
+
style: _({
|
|
707
|
+
width: `${r?.width ? r?.width + "px" : "100%"}`,
|
|
708
|
+
gridColumn: `span ${(r?.span || a.column) / 2 || 1}`
|
|
709
|
+
})
|
|
710
|
+
}, {
|
|
711
|
+
default: P(() => [r.render ? (b(), i(e, { key: 0 }, [j(Y)(r, h).component ? (b(), n(D(j(Y)(r, h).component), m({
|
|
712
|
+
key: 1,
|
|
713
|
+
modelValue: h[r.prop],
|
|
714
|
+
"onUpdate:modelValue": (e) => h[r.prop] = e
|
|
715
|
+
}, { ref_for: !0 }, j(Y)(r, h).props, {
|
|
716
|
+
clearable: !0,
|
|
717
|
+
key: `${r.prop}-${f.value}`,
|
|
718
|
+
style: { display: "inline-block" },
|
|
719
|
+
class: { underline: a.valueModel === "underline" }
|
|
720
|
+
}), null, 16, [
|
|
721
|
+
"modelValue",
|
|
722
|
+
"onUpdate:modelValue",
|
|
723
|
+
"class"
|
|
724
|
+
])) : (b(), i("span", ze, k(j(Y)(r, h) || "-"), 1)), (b(!0), i(e, null, C(r.slots, (e) => w(t.$slots, "default", { form: h }, () => [j(Y)(e, h).component ? (b(), n(D(j(Y)(e, h).component), m({
|
|
725
|
+
key: 1,
|
|
726
|
+
modelValue: h[e.prop],
|
|
727
|
+
"onUpdate:modelValue": (t) => h[e.prop] = t,
|
|
728
|
+
"default-value": e.defaultValue,
|
|
729
|
+
placeholder: e.placeholder
|
|
730
|
+
}, { ref_for: !0 }, j(Y)(e, h).props, {
|
|
731
|
+
style: {
|
|
732
|
+
display: "inline-block",
|
|
733
|
+
marginLeft: "10px",
|
|
734
|
+
width: `${e.width ? e.width + "px" : "100%"}`
|
|
735
|
+
},
|
|
736
|
+
class: { underline: a.valueModel === "underline" },
|
|
737
|
+
clearable: !0,
|
|
738
|
+
key: `${e.prop}-${f.value}`
|
|
739
|
+
}), null, 16, [
|
|
740
|
+
"modelValue",
|
|
741
|
+
"onUpdate:modelValue",
|
|
742
|
+
"default-value",
|
|
743
|
+
"placeholder",
|
|
744
|
+
"style",
|
|
745
|
+
"class"
|
|
746
|
+
])) : (b(), i("span", Be, k(j(Y)(e, h) || "-"), 1))], !0)), 256))], 64)) : (b(), n(D(T("el-input")), {
|
|
747
|
+
key: 1,
|
|
748
|
+
modelValue: h[r.prop],
|
|
749
|
+
"onUpdate:modelValue": (e) => h[r.prop] = e,
|
|
750
|
+
placeholder: "请输入",
|
|
751
|
+
clearable: !0,
|
|
752
|
+
class: g({ underline: a.valueModel === "underline" })
|
|
753
|
+
}, null, 8, [
|
|
754
|
+
"modelValue",
|
|
755
|
+
"onUpdate:modelValue",
|
|
756
|
+
"class"
|
|
757
|
+
]))]),
|
|
758
|
+
_: 2
|
|
759
|
+
}, 1032, [
|
|
760
|
+
"label",
|
|
761
|
+
"label-width",
|
|
762
|
+
"value-width",
|
|
763
|
+
"prop",
|
|
764
|
+
"style"
|
|
765
|
+
]))), 128))]),
|
|
766
|
+
_: 3
|
|
767
|
+
}, 16, [
|
|
768
|
+
"model",
|
|
769
|
+
"rules",
|
|
770
|
+
"inline",
|
|
771
|
+
"label-position",
|
|
772
|
+
"class"
|
|
773
|
+
])), t.$attrs?.hideHandle ? r("", !0) : (b(), i("div", Ve, [
|
|
774
|
+
w(t.$slots, "handle", { form: h }, void 0, !0),
|
|
775
|
+
(b(), n(D(T("el-button")), {
|
|
776
|
+
icon: j(V),
|
|
777
|
+
onClick: o[0] ||= (e) => p.value && M(),
|
|
778
|
+
size: t.$props.size
|
|
779
|
+
}, {
|
|
780
|
+
default: P(() => [...o[2] ||= [c("重置", -1)]]),
|
|
781
|
+
_: 1
|
|
782
|
+
}, 8, ["icon", "size"])),
|
|
783
|
+
(b(), n(D(T("el-button")), {
|
|
784
|
+
icon: j(ge),
|
|
785
|
+
type: "primary",
|
|
786
|
+
onClick: o[1] ||= (e) => p.value && E(p.value),
|
|
787
|
+
size: t.$props.size
|
|
788
|
+
}, {
|
|
789
|
+
default: P(() => [...o[3] ||= [c("提交", -1)]]),
|
|
790
|
+
_: 1
|
|
791
|
+
}, 8, ["icon", "size"]))
|
|
792
|
+
]))], 64));
|
|
803
793
|
}
|
|
804
|
-
}), [["__scopeId", "data-v-
|
|
794
|
+
}), [["__scopeId", "data-v-e1340874"]]), He = ["disabled"], Q = /* @__PURE__ */ u({
|
|
805
795
|
__name: "index",
|
|
806
|
-
props: /* @__PURE__ */
|
|
796
|
+
props: /* @__PURE__ */ p({
|
|
807
797
|
defaultValue: { default: "" },
|
|
808
798
|
disabled: {
|
|
809
799
|
type: Boolean,
|
|
@@ -816,32 +806,32 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
816
806
|
},
|
|
817
807
|
modelModifiers: {}
|
|
818
808
|
}),
|
|
819
|
-
emits: /* @__PURE__ */
|
|
809
|
+
emits: /* @__PURE__ */ p(["change"], ["update:modelValue"]),
|
|
820
810
|
setup(e, { emit: t }) {
|
|
821
|
-
let n =
|
|
822
|
-
return
|
|
823
|
-
|
|
811
|
+
let n = S(), r = M(e, "modelValue"), a = S(r.value || e.defaultValue || ""), o = null, s = t;
|
|
812
|
+
return v(() => {
|
|
813
|
+
o = new ve({
|
|
824
814
|
element: n.value,
|
|
825
815
|
placeholder: "点击输入内容...",
|
|
826
816
|
content: r.value || e.defaultValue || "",
|
|
827
817
|
toolbarExcludeKeys: ["ai"],
|
|
828
818
|
onChange: (e) => {
|
|
829
819
|
let t = e.getHtml();
|
|
830
|
-
r.value = t,
|
|
820
|
+
r.value = t, a.value = t, s("change", t);
|
|
831
821
|
}
|
|
832
|
-
}),
|
|
833
|
-
}),
|
|
834
|
-
|
|
835
|
-
}),
|
|
836
|
-
|
|
837
|
-
}), (t, r) => (
|
|
822
|
+
}), o.setEditable(!e.disabled);
|
|
823
|
+
}), N(r, (e) => {
|
|
824
|
+
o && e !== o.getHtml() && o.setContent(e);
|
|
825
|
+
}), y(() => {
|
|
826
|
+
o && o.destroy();
|
|
827
|
+
}), (t, r) => (b(), i("div", {
|
|
838
828
|
ref_key: "editorRef",
|
|
839
829
|
ref: n,
|
|
840
830
|
style: { height: "500px" },
|
|
841
831
|
disabled: e.disabled
|
|
842
|
-
}, null, 8,
|
|
832
|
+
}, null, 8, He));
|
|
843
833
|
}
|
|
844
|
-
}),
|
|
834
|
+
}), Ue = { class: "ui-tree-wrapper" }, We = {
|
|
845
835
|
key: 0,
|
|
846
836
|
style: {
|
|
847
837
|
display: "flex",
|
|
@@ -850,14 +840,14 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
850
840
|
"align-items": "center",
|
|
851
841
|
gap: "10px"
|
|
852
842
|
}
|
|
853
|
-
},
|
|
843
|
+
}, Ge = {
|
|
854
844
|
key: 0,
|
|
855
845
|
class: "custom-tree-node"
|
|
856
|
-
},
|
|
846
|
+
}, Ke = { class: "node-label" }, qe = { style: {
|
|
857
847
|
color: "#ef4444",
|
|
858
848
|
display: "flex",
|
|
859
849
|
"align-items": "center"
|
|
860
|
-
} },
|
|
850
|
+
} }, $ = /* @__PURE__ */ U(/* @__PURE__ */ u({
|
|
861
851
|
__name: "index",
|
|
862
852
|
props: {
|
|
863
853
|
id: {},
|
|
@@ -874,144 +864,133 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
874
864
|
},
|
|
875
865
|
emits: ["change"],
|
|
876
866
|
setup(e, { emit: t }) {
|
|
877
|
-
let
|
|
867
|
+
let s = o(e, [
|
|
878
868
|
"filterable",
|
|
879
869
|
"placeholder",
|
|
880
870
|
"data",
|
|
881
871
|
"props"
|
|
882
|
-
]),
|
|
883
|
-
|
|
884
|
-
e.filterable &&
|
|
872
|
+
]), u = S(""), f = S(), p = S(), h = d()?.appContext.config.globalProperties.$messageBox;
|
|
873
|
+
N(u, (t) => {
|
|
874
|
+
e.filterable && p.value?.filter(t);
|
|
885
875
|
});
|
|
886
|
-
function
|
|
876
|
+
function g(t, n) {
|
|
887
877
|
return t ? n?.[e.props?.label || "label"]?.includes(t) ?? !1 : !0;
|
|
888
878
|
}
|
|
889
|
-
function
|
|
890
|
-
e?.stopPropagation(),
|
|
879
|
+
function _(e, t) {
|
|
880
|
+
e?.stopPropagation(), f.value = t.id;
|
|
891
881
|
}
|
|
892
|
-
function
|
|
893
|
-
|
|
882
|
+
function v() {
|
|
883
|
+
h?.prompt("请输入新的名称", "添加节点", {
|
|
894
884
|
confirmButtonText: "确定",
|
|
895
|
-
cancelButtonText: "取消"
|
|
896
|
-
callback: async (e) => {
|
|
897
|
-
if (e.action === "confirm") {
|
|
898
|
-
if (!n?.id) return;
|
|
899
|
-
console.log("添加 =》》", e?.value);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
885
|
+
cancelButtonText: "取消"
|
|
902
886
|
});
|
|
903
887
|
}
|
|
904
|
-
function
|
|
905
|
-
|
|
888
|
+
function y(e) {
|
|
889
|
+
h?.prompt("请输入新的名称", "重命名", {
|
|
906
890
|
confirmButtonText: "确定",
|
|
907
891
|
cancelButtonText: "取消",
|
|
908
892
|
inputValue: e.label
|
|
909
|
-
}).then(async ({ value: e }) => {
|
|
910
|
-
console.log("修改节点 =》》", e);
|
|
911
893
|
});
|
|
912
894
|
}
|
|
913
|
-
async function
|
|
895
|
+
async function x(e) {
|
|
914
896
|
e.id && console.log("删除节点 =》》", e.id);
|
|
915
897
|
}
|
|
916
|
-
return (t,
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
default: K(() => [k(f, { size: 22 }, {
|
|
933
|
-
default: K(() => [k(W(Xe), { onClick: i[1] ||= (e) => c() })]),
|
|
934
|
-
_: 1
|
|
935
|
-
})]),
|
|
898
|
+
return (t, o) => (b(), i("div", Ue, [
|
|
899
|
+
e.filterable ? (b(), i("div", We, [(b(), n(D(T("el-input")), {
|
|
900
|
+
modelValue: u.value,
|
|
901
|
+
"onUpdate:modelValue": o[0] ||= (e) => u.value = e,
|
|
902
|
+
placeholder: e.placeholder ?? "请输入",
|
|
903
|
+
clearable: ""
|
|
904
|
+
}, null, 8, ["modelValue", "placeholder"])), s?.hidePlusHandle ? r("", !0) : (b(), n(D(T("el-button")), {
|
|
905
|
+
key: 0,
|
|
906
|
+
style: {
|
|
907
|
+
margin: "0px",
|
|
908
|
+
padding: "0px"
|
|
909
|
+
},
|
|
910
|
+
link: ""
|
|
911
|
+
}, {
|
|
912
|
+
default: P(() => [(b(), n(D(T("el-icon")), { size: 22 }, {
|
|
913
|
+
default: P(() => [l(j(ue), { onClick: o[1] ||= (e) => v() })]),
|
|
936
914
|
_: 1
|
|
937
|
-
}))])
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
915
|
+
}))]),
|
|
916
|
+
_: 1
|
|
917
|
+
}))])) : r("", !0),
|
|
918
|
+
w(t.$slots, "handle", { style: "margin-top: 8px" }, void 0, !0),
|
|
919
|
+
(b(), n(D(T("el-tree-v2")), m({
|
|
920
|
+
ref_key: "treeRef",
|
|
921
|
+
ref: p,
|
|
922
|
+
style: { "margin-top": "8px" }
|
|
923
|
+
}, {
|
|
924
|
+
...t.$props,
|
|
925
|
+
...t.$attrs
|
|
926
|
+
}, {
|
|
927
|
+
"node-key": s?.nodeKey || "id",
|
|
928
|
+
"highlight-current": !0,
|
|
929
|
+
"filter-method": g
|
|
930
|
+
}), {
|
|
931
|
+
default: P((u) => [u?.data ? (b(), i("div", Ge, [a("div", Ke, [u.data?.children?.length ? (b(), n(D(T("el-icon")), { key: 0 }, {
|
|
932
|
+
default: P(() => [l(j(me))]),
|
|
933
|
+
_: 1
|
|
934
|
+
})) : r("", !0), c(" " + k(u.data?.[e.props?.label || "label"]) + " " + k(u.data?.children?.length ? `(${u.data.children.length})` : ""), 1)]), s.hideNodeHandle ? r("", !0) : (b(), n(D(T("el-dropdown")), {
|
|
935
|
+
key: 0,
|
|
936
|
+
trigger: "click"
|
|
946
937
|
}, {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
key: 0,
|
|
956
|
-
trigger: "click"
|
|
957
|
-
}, {
|
|
958
|
-
dropdown: K(() => [k(h, null, {
|
|
959
|
-
default: K(() => [
|
|
960
|
-
n?.hideNodeAdd ? w("", !0) : (F(), C(m, {
|
|
961
|
-
key: 0,
|
|
962
|
-
onClick: i[2] ||= (e) => c()
|
|
963
|
-
}, {
|
|
964
|
-
default: K(() => [k(f, null, {
|
|
965
|
-
default: K(() => [k(W(Qe))]),
|
|
966
|
-
_: 1
|
|
967
|
-
}), i[3] ||= O("添加 ", -1)]),
|
|
938
|
+
dropdown: P(() => [(b(), n(D(T("el-dropdown-menu")), null, {
|
|
939
|
+
default: P(() => [
|
|
940
|
+
s?.hideNodeAdd ? r("", !0) : (b(), n(D(T("el-dropdown-item")), {
|
|
941
|
+
key: 0,
|
|
942
|
+
onClick: o[2] ||= (e) => v()
|
|
943
|
+
}, {
|
|
944
|
+
default: P(() => [(b(), n(D(T("el-icon")), null, {
|
|
945
|
+
default: P(() => [l(j(fe))]),
|
|
968
946
|
_: 1
|
|
969
|
-
})),
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
947
|
+
})), o[3] ||= c("添加 ", -1)]),
|
|
948
|
+
_: 1
|
|
949
|
+
})),
|
|
950
|
+
s?.hideNodeEdit ? r("", !0) : (b(), n(D(T("el-dropdown-item")), {
|
|
951
|
+
key: 1,
|
|
952
|
+
onClick: (e) => y(u.data)
|
|
953
|
+
}, {
|
|
954
|
+
default: P(() => [(b(), n(D(T("el-icon")), null, {
|
|
955
|
+
default: P(() => [l(j(pe))]),
|
|
978
956
|
_: 1
|
|
979
|
-
},
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
957
|
+
})), o[4] ||= c("编辑 ", -1)]),
|
|
958
|
+
_: 1
|
|
959
|
+
}, 8, ["onClick"])),
|
|
960
|
+
s?.hideNodeDel ? r("", !0) : (b(), n(D(T("el-dropdown-item")), {
|
|
961
|
+
key: 2,
|
|
962
|
+
onClick: (e) => x(u.data)
|
|
963
|
+
}, {
|
|
964
|
+
default: P(() => [a("span", qe, [(b(), n(D(T("el-icon")), null, {
|
|
965
|
+
default: P(() => [l(j(de))]),
|
|
988
966
|
_: 1
|
|
989
|
-
},
|
|
990
|
-
|
|
991
|
-
]),
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
default: K(() => [k(f, { onClick: (e) => s(e, r.data) }, {
|
|
995
|
-
default: K(() => [k(W(tt))]),
|
|
996
|
-
_: 1
|
|
997
|
-
}, 8, ["onClick"])]),
|
|
967
|
+
})), o[5] ||= c("删除 ", -1)])]),
|
|
968
|
+
_: 1
|
|
969
|
+
}, 8, ["onClick"])),
|
|
970
|
+
w(t.$slots, "node-handle", { data: u.data }, void 0, !0)
|
|
971
|
+
]),
|
|
998
972
|
_: 2
|
|
999
|
-
}, 1024))])
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
973
|
+
}, 1024))]),
|
|
974
|
+
default: P(() => [(b(), n(D(T("el-icon")), { onClick: (e) => _(e, u.data) }, {
|
|
975
|
+
default: P(() => [l(j(he))]),
|
|
976
|
+
_: 1
|
|
977
|
+
}, 8, ["onClick"]))]),
|
|
978
|
+
_: 2
|
|
979
|
+
}, 1024))])) : r("", !0)]),
|
|
980
|
+
_: 3
|
|
981
|
+
}, 16, ["node-key"]))
|
|
982
|
+
]));
|
|
1004
983
|
}
|
|
1005
|
-
}), [["__scopeId", "data-v-
|
|
984
|
+
}), [["__scopeId", "data-v-e624c69c"]]), Je = { style: { height: "100%" } }, Ye = { style: {
|
|
1006
985
|
display: "flex",
|
|
1007
986
|
"flex-direction": "row",
|
|
1008
987
|
"justify-content": "space-between",
|
|
1009
988
|
"align-items": "center",
|
|
1010
989
|
gap: "10px"
|
|
1011
|
-
} },
|
|
990
|
+
} }, Xe = { style: { margin: "10px 0px" } }, Ze = ["onClick"], Qe = { key: 0 }, $e = /* @__PURE__ */ U(/* @__PURE__ */ u({
|
|
1012
991
|
__name: "index",
|
|
1013
992
|
props: {
|
|
1014
|
-
loading: { default: () =>
|
|
993
|
+
loading: { default: () => S(!1) },
|
|
1015
994
|
data: {},
|
|
1016
995
|
placeholder: {},
|
|
1017
996
|
props: {},
|
|
@@ -1019,47 +998,47 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
1019
998
|
filterable: { type: Boolean }
|
|
1020
999
|
},
|
|
1021
1000
|
emits: ["node-click"],
|
|
1022
|
-
setup(
|
|
1023
|
-
let
|
|
1024
|
-
|
|
1025
|
-
!
|
|
1001
|
+
setup(o, { emit: s }) {
|
|
1002
|
+
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);
|
|
1003
|
+
N(() => [u.value, o.data?.[0]], (e) => {
|
|
1004
|
+
!e[0] && e[1] && (u.value = o.data?.[0]);
|
|
1026
1005
|
}, { immediate: !0 });
|
|
1027
|
-
function
|
|
1028
|
-
|
|
1006
|
+
function f(e) {
|
|
1007
|
+
u.value = e, c("node-click", e);
|
|
1029
1008
|
}
|
|
1030
|
-
return (t,
|
|
1031
|
-
let
|
|
1032
|
-
return
|
|
1033
|
-
|
|
1009
|
+
return (t, s) => {
|
|
1010
|
+
let c = T("el-input");
|
|
1011
|
+
return b(), i("div", Je, [
|
|
1012
|
+
a("div", Ye, [o.filterable ? (b(), n(c, {
|
|
1034
1013
|
key: 0,
|
|
1035
|
-
modelValue:
|
|
1036
|
-
"onUpdate:modelValue":
|
|
1037
|
-
placeholder:
|
|
1038
|
-
}, null, 8, ["modelValue", "placeholder"])) :
|
|
1039
|
-
|
|
1040
|
-
|
|
1014
|
+
modelValue: l.value,
|
|
1015
|
+
"onUpdate:modelValue": s[0] ||= (e) => l.value = e,
|
|
1016
|
+
placeholder: o.placeholder ?? "请输入"
|
|
1017
|
+
}, null, 8, ["modelValue", "placeholder"])) : r("", !0), w(t.$slots, "plus", {}, void 0, !0)]),
|
|
1018
|
+
a("div", Xe, [w(t.$slots, "handle", {}, void 0, !0)]),
|
|
1019
|
+
F((b(), i("ul", m({
|
|
1041
1020
|
class: "infinite-list",
|
|
1042
1021
|
"infinite-scroll-immediate": !1
|
|
1043
|
-
}, t.$attrs), [(
|
|
1044
|
-
key: "infinite-list-" +
|
|
1045
|
-
class:
|
|
1022
|
+
}, t.$attrs), [(b(!0), i(e, null, C(d.value, (e, n) => (b(), i("li", {
|
|
1023
|
+
key: "infinite-list-" + n,
|
|
1024
|
+
class: g({
|
|
1046
1025
|
"infinite-list-item": !0,
|
|
1047
|
-
active:
|
|
1026
|
+
active: e === u.value
|
|
1048
1027
|
}),
|
|
1049
|
-
onClick: (
|
|
1050
|
-
}, [
|
|
1051
|
-
|
|
1028
|
+
onClick: (t) => f(e)
|
|
1029
|
+
}, [a("span", null, k(e[o.props?.label || "label"]), 1), w(t.$slots, "itemHandle", { data: e }, void 0, !0)], 10, Ze))), 128))], 16)), [[j(o.vInfiniteScroll), o.vInfiniteScroll]]),
|
|
1030
|
+
o.loading.value ? (b(), i("p", Qe, "loading...")) : r("", !0)
|
|
1052
1031
|
]);
|
|
1053
1032
|
};
|
|
1054
1033
|
}
|
|
1055
|
-
}), [["__scopeId", "data-v-2180fa82"]]),
|
|
1034
|
+
}), [["__scopeId", "data-v-2180fa82"]]), et = {
|
|
1056
1035
|
key: 0,
|
|
1057
1036
|
style: {
|
|
1058
1037
|
padding: "10px 0px",
|
|
1059
1038
|
"margin-bottom": "10px",
|
|
1060
1039
|
"border-bottom": "1px solid #e5e5e5"
|
|
1061
1040
|
}
|
|
1062
|
-
},
|
|
1041
|
+
}, tt = { key: 1 }, nt = /* @__PURE__ */ U(/* @__PURE__ */ u({
|
|
1063
1042
|
__name: "index",
|
|
1064
1043
|
props: {
|
|
1065
1044
|
data: {},
|
|
@@ -1072,33 +1051,33 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
1072
1051
|
extra: {},
|
|
1073
1052
|
labelWidth: {}
|
|
1074
1053
|
},
|
|
1075
|
-
setup(
|
|
1076
|
-
let
|
|
1054
|
+
setup(t) {
|
|
1055
|
+
let a = o(t, [
|
|
1077
1056
|
"title",
|
|
1078
1057
|
"column",
|
|
1079
1058
|
"fields",
|
|
1080
1059
|
"data"
|
|
1081
1060
|
]);
|
|
1082
|
-
return (
|
|
1083
|
-
let
|
|
1084
|
-
return
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
default:
|
|
1089
|
-
key:
|
|
1090
|
-
label:
|
|
1091
|
-
span:
|
|
1061
|
+
return (o, s) => {
|
|
1062
|
+
let c = T("el-descriptions-item"), u = T("el-descriptions");
|
|
1063
|
+
return b(), i(e, null, [
|
|
1064
|
+
t.title ? (b(), i("h4", et, k(t.title), 1)) : r("", !0),
|
|
1065
|
+
w(o.$slots, "title", {}, void 0, !0),
|
|
1066
|
+
l(u, m({ column: t.column }, a, { class: "ui-descriptions" }), {
|
|
1067
|
+
default: P(() => [(b(!0), i(e, null, C(t.fields, (e) => (b(), n(c, {
|
|
1068
|
+
key: e.prop,
|
|
1069
|
+
label: e.label,
|
|
1070
|
+
span: e.span || 2
|
|
1092
1071
|
}, {
|
|
1093
|
-
default:
|
|
1072
|
+
default: P(() => [e.render ? (b(), n(D(j(J)(e, t.data).component), m({
|
|
1094
1073
|
key: 0,
|
|
1095
|
-
modelValue:
|
|
1096
|
-
"onUpdate:modelValue": (n) =>
|
|
1097
|
-
}, { ref_for: !0 },
|
|
1074
|
+
modelValue: t.data[e.prop],
|
|
1075
|
+
"onUpdate:modelValue": (n) => t.data[e.prop] = n
|
|
1076
|
+
}, { ref_for: !0 }, j(J)(e, t.data).props, {
|
|
1098
1077
|
clearable: !0,
|
|
1099
|
-
key:
|
|
1078
|
+
key: e.prop,
|
|
1100
1079
|
style: { display: "inline-block" }
|
|
1101
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (
|
|
1080
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (b(), i("span", tt, k(t.data[e.prop] || "-"), 1))]),
|
|
1102
1081
|
_: 2
|
|
1103
1082
|
}, 1032, ["label", "span"]))), 128))]),
|
|
1104
1083
|
_: 1
|
|
@@ -1106,10 +1085,10 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
1106
1085
|
], 64);
|
|
1107
1086
|
};
|
|
1108
1087
|
}
|
|
1109
|
-
}), [["__scopeId", "data-v-f02c30f9"]]),
|
|
1088
|
+
}), [["__scopeId", "data-v-f02c30f9"]]), rt = {
|
|
1110
1089
|
key: 0,
|
|
1111
1090
|
class: "dialog-footer"
|
|
1112
|
-
},
|
|
1091
|
+
}, it = /* @__PURE__ */ U(/* @__PURE__ */ u({
|
|
1113
1092
|
__name: "index",
|
|
1114
1093
|
props: {
|
|
1115
1094
|
visible: { type: Boolean },
|
|
@@ -1124,60 +1103,56 @@ var Ot = { class: "filter-buttons" }, kt = /* @__PURE__ */ J(/* @__PURE__ */ A({
|
|
|
1124
1103
|
"submit"
|
|
1125
1104
|
],
|
|
1126
1105
|
setup(e, { emit: t }) {
|
|
1127
|
-
let
|
|
1128
|
-
function
|
|
1129
|
-
|
|
1106
|
+
let a = t, o = e, s = S();
|
|
1107
|
+
function l() {
|
|
1108
|
+
a("close"), a("update:visible", !1);
|
|
1130
1109
|
}
|
|
1131
|
-
function
|
|
1132
|
-
|
|
1110
|
+
function u() {
|
|
1111
|
+
a("submit", A(s?.value || {})), a("update:visible", !1);
|
|
1133
1112
|
}
|
|
1134
|
-
return (e, t) => {
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
}, r.componentProps), null, 16)), r.disabled ? w("", !0) : (F(), T("div", Xt, [k(n, { onClick: a }, {
|
|
1150
|
-
default: K(() => [...t[1] ||= [O("取消", -1)]]),
|
|
1151
|
-
_: 1
|
|
1152
|
-
}), k(n, {
|
|
1153
|
-
type: "primary",
|
|
1154
|
-
onClick: o
|
|
1155
|
-
}, {
|
|
1156
|
-
default: K(() => [...t[2] ||= [O("确定", -1)]]),
|
|
1157
|
-
_: 1
|
|
1158
|
-
})]))]),
|
|
1113
|
+
return (e, t) => (b(), n(D(T("el-dialog")), m(e.$attrs, {
|
|
1114
|
+
"model-value": o.visible,
|
|
1115
|
+
"show-close": o.disabled,
|
|
1116
|
+
fullscreen: !o.width,
|
|
1117
|
+
"destroy-on-close": "",
|
|
1118
|
+
"lock-scroll": !1,
|
|
1119
|
+
"close-on-click-modal": !1,
|
|
1120
|
+
"onUpdate:modelValue": t[0] ||= (e) => !e && l(),
|
|
1121
|
+
onClose: l
|
|
1122
|
+
}), {
|
|
1123
|
+
default: P(() => [(b(), n(D(o.component), m({
|
|
1124
|
+
ref_key: "slotRef",
|
|
1125
|
+
ref: s
|
|
1126
|
+
}, o.componentProps), null, 16)), o.disabled ? r("", !0) : (b(), i("div", rt, [(b(), n(D(T("el-button")), { onClick: l }, {
|
|
1127
|
+
default: P(() => [...t[1] ||= [c("取消", -1)]]),
|
|
1159
1128
|
_: 1
|
|
1160
|
-
},
|
|
1161
|
-
"
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1129
|
+
})), (b(), n(D(T("el-button")), {
|
|
1130
|
+
type: "primary",
|
|
1131
|
+
onClick: u
|
|
1132
|
+
}, {
|
|
1133
|
+
default: P(() => [...t[2] ||= [c("确定", -1)]]),
|
|
1134
|
+
_: 1
|
|
1135
|
+
}))]))]),
|
|
1136
|
+
_: 1
|
|
1137
|
+
}, 16, [
|
|
1138
|
+
"model-value",
|
|
1139
|
+
"show-close",
|
|
1140
|
+
"fullscreen"
|
|
1141
|
+
]));
|
|
1166
1142
|
}
|
|
1167
|
-
}), [["__scopeId", "data-v-
|
|
1168
|
-
UiCard: () =>
|
|
1169
|
-
UiDescriptions: () =>
|
|
1170
|
-
UiDialog: () =>
|
|
1171
|
-
UiEditor: () =>
|
|
1172
|
-
UiFilter: () =>
|
|
1173
|
-
UiForm: () =>
|
|
1174
|
-
UiInfiniteScroll: () =>
|
|
1175
|
-
UiTable: () =>
|
|
1176
|
-
UiTree: () =>
|
|
1177
|
-
}),
|
|
1178
|
-
t
|
|
1179
|
-
let n
|
|
1180
|
-
for (let [e, r] of Object.entries(n)) r && typeof r == "object" && "install" in r ? t.use(r) : r && typeof r == "function" && t.component(e.replace(/^Ui/, "Yc"), r);
|
|
1143
|
+
}), [["__scopeId", "data-v-27665bd6"]]), at = /* @__PURE__ */ ye({
|
|
1144
|
+
UiCard: () => W,
|
|
1145
|
+
UiDescriptions: () => nt,
|
|
1146
|
+
UiDialog: () => it,
|
|
1147
|
+
UiEditor: () => Q,
|
|
1148
|
+
UiFilter: () => X,
|
|
1149
|
+
UiForm: () => Z,
|
|
1150
|
+
UiInfiniteScroll: () => $e,
|
|
1151
|
+
UiTable: () => K,
|
|
1152
|
+
UiTree: () => $
|
|
1153
|
+
}), ot = { async install(e) {
|
|
1154
|
+
let t = await Promise.resolve().then(() => at);
|
|
1155
|
+
for (let [n, r] of Object.entries(t)) r && typeof r == "object" && "install" in r ? e.use(r) : r && typeof r == "function" && e.component(n, r);
|
|
1181
1156
|
} };
|
|
1182
1157
|
//#endregion
|
|
1183
|
-
export {
|
|
1158
|
+
export { W as UiCard, nt as UiDescriptions, it as UiDialog, Q as UiEditor, X as UiFilter, Z as UiForm, $e as UiInfiniteScroll, K as UiTable, $ as UiTree, ot as default, ot as ycPlugin };
|