yxuse 3.0.38 → 3.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api.cjs.js +1 -1
- package/lib/api.es.js +4 -4
- package/lib/app.cjs.js +1 -1
- package/lib/app.es.js +1 -1
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +13 -15
- package/lib/directives.cjs.js +1 -1
- package/lib/directives.es.js +2 -2
- package/lib/hooks.cjs.js +1 -1
- package/lib/hooks.es.js +1 -1
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs10.js +1 -1
- package/lib/index.cjs11.js +3 -0
- package/lib/index.cjs11.js.gz +0 -0
- package/lib/index.cjs12.js +1 -0
- package/lib/index.cjs13.js +1 -0
- package/lib/index.cjs2.js +1 -42
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs4.js +1 -1
- package/lib/index.cjs5.js +42 -1
- package/lib/index.cjs5.js.gz +0 -0
- package/lib/index.cjs6.js +1 -1
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs7.js +1 -3
- package/lib/index.cjs8.js +1 -1
- package/lib/index.cjs9.js +1 -1
- package/lib/index.es.js +44 -19
- package/lib/index.es10.js +309 -9
- package/lib/index.es10.js.gz +0 -0
- package/lib/index.es11.js +1682 -0
- package/lib/index.es11.js.gz +0 -0
- package/lib/index.es12.js +124 -0
- package/lib/index.es13.js +19 -0
- package/lib/index.es2.js +14 -8230
- package/lib/index.es3.js +41 -131
- package/lib/index.es4.js +33 -38
- package/lib/index.es5.js +7347 -33
- package/lib/index.es5.js.gz +0 -0
- package/lib/index.es6.js +893 -301
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es7.js +18 -1674
- package/lib/index.es8.js +4 -15
- package/lib/index.es9.js +7 -20
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +17 -20
- package/lib/translate.cjs.js +1 -1
- package/lib/translate.es.js +9 -12
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +2 -2
- package/lib/yxIcon.cjs.js +1 -1
- package/lib/yxIcon.es.js +3 -3
- package/package.json +1 -1
- package/types/bc/index.d.ts +5 -0
- package/types/config/index.d.ts +3 -0
- package/types/index.d.ts +3 -2
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs7.js.gz +0 -0
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es7.js.gz +0 -0
package/lib/index.es6.js
CHANGED
|
@@ -1,315 +1,907 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
var me = Object.defineProperty;
|
|
2
|
+
var G = Object.getOwnPropertySymbols;
|
|
3
|
+
var se = Object.prototype.hasOwnProperty, le = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var ae = (n, o, t) => o in n ? me(n, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[o] = t, V = (n, o) => {
|
|
5
|
+
for (var t in o || (o = {}))
|
|
6
|
+
se.call(o, t) && ae(n, t, o[t]);
|
|
7
|
+
if (G)
|
|
8
|
+
for (var t of G(o))
|
|
9
|
+
le.call(o, t) && ae(n, t, o[t]);
|
|
10
|
+
return n;
|
|
11
|
+
};
|
|
12
|
+
var A = (n, o) => {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var s in n)
|
|
15
|
+
se.call(n, s) && o.indexOf(s) < 0 && (t[s] = n[s]);
|
|
16
|
+
if (n != null && G)
|
|
17
|
+
for (var s of G(n))
|
|
18
|
+
o.indexOf(s) < 0 && le.call(n, s) && (t[s] = n[s]);
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
var J = (n, o, t) => new Promise((s, l) => {
|
|
22
|
+
var d = (b) => {
|
|
23
|
+
try {
|
|
24
|
+
h(t.next(b));
|
|
25
|
+
} catch (p) {
|
|
26
|
+
l(p);
|
|
27
|
+
}
|
|
28
|
+
}, S = (b) => {
|
|
29
|
+
try {
|
|
30
|
+
h(t.throw(b));
|
|
31
|
+
} catch (p) {
|
|
32
|
+
l(p);
|
|
33
|
+
}
|
|
34
|
+
}, h = (b) => b.done ? s(b.value) : Promise.resolve(b.value).then(d, S);
|
|
35
|
+
h((t = t.apply(n, o)).next());
|
|
36
|
+
});
|
|
37
|
+
import { defineComponent as P, reactive as he, resolveComponent as k, openBlock as _, createBlock as F, createSlots as ge, withCtx as T, renderSlot as te, createElementVNode as I, createVNode as f, createTextVNode as z, watch as ie, resolveDynamicComponent as j, mergeProps as D, createElementBlock as N, Fragment as L, renderList as q, createCommentVNode as B, useSlots as ne, useAttrs as oe, ref as O, onMounted as _e, nextTick as ye, isVNode as ce, withModifiers as be, computed as ve, unref as X, normalizeStyle as Q, toDisplayString as E, withKeys as we, toHandlers as Se, pushScopeId as Ce, popScopeId as xe } from "vue";
|
|
38
|
+
import { S as $e, _ as Z, T as ke } from "./index.es5.js";
|
|
39
|
+
import "./index.es11.js";
|
|
40
|
+
import "element-plus";
|
|
41
|
+
import { u as Ve } from "./index.es13.js";
|
|
42
|
+
const Ne = { class: "dialog-footer flex justify-end" }, Fe = /* @__PURE__ */ P({
|
|
43
|
+
__name: "index",
|
|
44
|
+
setup(n, { expose: o }) {
|
|
45
|
+
const t = he({
|
|
46
|
+
width: "40%",
|
|
47
|
+
show: !1,
|
|
48
|
+
title: "",
|
|
49
|
+
loading: !1,
|
|
50
|
+
showFooter: !0,
|
|
51
|
+
autoClose: !0
|
|
52
|
+
}), s = () => {
|
|
53
|
+
t.show = !1;
|
|
54
|
+
}, l = {}, d = () => J(this, null, function* () {
|
|
55
|
+
if (!(l.beforeSubmit && !(yield l.beforeSubmit()))) {
|
|
56
|
+
t.loading = !0;
|
|
57
|
+
try {
|
|
58
|
+
l.submit && (yield l.submit()), t.loading = !1, t.autoClose && s();
|
|
59
|
+
} catch (h) {
|
|
60
|
+
t.loading = !1;
|
|
61
|
+
}
|
|
48
62
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
return
|
|
63
|
+
});
|
|
64
|
+
return o({
|
|
65
|
+
show: ({ width: h, title: b, submit: p, cancel: w, showFooter: v, autoClose: C, beforeOpen: R, beforeSubmit: m }) => {
|
|
66
|
+
h && (t.width = h), b && (t.title = b), v !== void 0 && (t.showFooter = v), C !== void 0 && (t.autoClose = C), p && (l.submit = p), w && (l.cancel = w), m && (l.beforeSubmit = m), R && R(), t.show = !0;
|
|
67
|
+
},
|
|
68
|
+
close: s
|
|
69
|
+
}), (h, b) => {
|
|
70
|
+
const p = k("el-button"), w = k("el-dialog");
|
|
71
|
+
return _(), F(w, {
|
|
72
|
+
"close-on-click-modal": !1,
|
|
73
|
+
attrs: "",
|
|
74
|
+
width: t.width,
|
|
75
|
+
modelValue: t.show,
|
|
76
|
+
"onUpdate:modelValue": b[0] || (b[0] = (v) => t.show = v),
|
|
77
|
+
title: t.title
|
|
78
|
+
}, ge({
|
|
79
|
+
default: T(() => [
|
|
80
|
+
te(h.$slots, "default")
|
|
81
|
+
]),
|
|
82
|
+
_: 2
|
|
83
|
+
}, [
|
|
84
|
+
t.showFooter ? {
|
|
85
|
+
name: "footer",
|
|
86
|
+
fn: T(() => [
|
|
87
|
+
I("span", Ne, [
|
|
88
|
+
f(p, {
|
|
89
|
+
plain: "",
|
|
90
|
+
onClick: s
|
|
91
|
+
}, {
|
|
92
|
+
default: T(() => [
|
|
93
|
+
z("取消")
|
|
94
|
+
]),
|
|
95
|
+
_: 1
|
|
96
|
+
}),
|
|
97
|
+
f(p, {
|
|
98
|
+
loading: t.loading,
|
|
99
|
+
onClick: d
|
|
100
|
+
}, {
|
|
101
|
+
default: T(() => [
|
|
102
|
+
z("确认")
|
|
103
|
+
]),
|
|
104
|
+
_: 1
|
|
105
|
+
}, 8, ["loading"])
|
|
106
|
+
])
|
|
107
|
+
]),
|
|
108
|
+
key: "0"
|
|
109
|
+
} : void 0
|
|
110
|
+
]), 1032, ["width", "modelValue", "title"]);
|
|
58
111
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
112
|
+
}
|
|
113
|
+
}), de = /* @__PURE__ */ P({
|
|
114
|
+
__name: "index",
|
|
115
|
+
props: {
|
|
116
|
+
conf: {},
|
|
117
|
+
model: {}
|
|
118
|
+
},
|
|
119
|
+
emits: ["change"],
|
|
120
|
+
setup(n, { emit: o }) {
|
|
121
|
+
const t = n, s = o;
|
|
122
|
+
return ie(
|
|
123
|
+
() => {
|
|
124
|
+
var l;
|
|
125
|
+
return t.model[(l = t.conf) == null ? void 0 : l.prop];
|
|
126
|
+
},
|
|
127
|
+
() => {
|
|
128
|
+
s("change", t.model);
|
|
62
129
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
130
|
+
), (l, d) => {
|
|
131
|
+
var S, h, b;
|
|
132
|
+
return _(), F(j(`el-${(S = l.conf) == null ? void 0 : S.renderType}`), D({
|
|
133
|
+
modelValue: l.model[(h = l.conf) == null ? void 0 : h.prop],
|
|
134
|
+
"onUpdate:modelValue": d[0] || (d[0] = (p) => {
|
|
135
|
+
var w;
|
|
136
|
+
return l.model[(w = l.conf) == null ? void 0 : w.prop] = p;
|
|
137
|
+
})
|
|
138
|
+
}, (b = l.conf) == null ? void 0 : b.config), {
|
|
139
|
+
default: T(() => {
|
|
140
|
+
var p, w, v;
|
|
141
|
+
return [
|
|
142
|
+
l.conf.renderType === "select" ? (_(!0), N(L, { key: 0 }, q((v = (w = (p = l.conf) == null ? void 0 : p.config) == null ? void 0 : w.options) != null ? v : [], (C) => (_(), F(j("el-option"), {
|
|
143
|
+
key: C.value,
|
|
144
|
+
label: C.label,
|
|
145
|
+
value: C.value
|
|
146
|
+
}, null, 8, ["label", "value"]))), 128)) : B("", !0)
|
|
147
|
+
];
|
|
148
|
+
}),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 16, ["modelValue"]);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
function Ie(n) {
|
|
155
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !ce(n);
|
|
156
|
+
}
|
|
157
|
+
const Te = /* @__PURE__ */ P({
|
|
158
|
+
name: "YxTable",
|
|
159
|
+
__name: "index",
|
|
160
|
+
props: {
|
|
161
|
+
tableData: {},
|
|
162
|
+
rowKey: {},
|
|
163
|
+
columns: {},
|
|
164
|
+
pageInfo: {},
|
|
165
|
+
sort: {
|
|
166
|
+
type: Boolean
|
|
167
|
+
},
|
|
168
|
+
sortHandle: {},
|
|
169
|
+
load: {
|
|
170
|
+
type: Function
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
emits: ["operate-handle", "sort-end", "update-page", "size-change"],
|
|
174
|
+
setup(n, {
|
|
175
|
+
expose: o,
|
|
176
|
+
emit: t
|
|
177
|
+
}) {
|
|
178
|
+
const s = n, l = ne(), d = oe(), S = O(), h = t;
|
|
179
|
+
_e(() => {
|
|
180
|
+
ye(() => {
|
|
181
|
+
b();
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
const b = () => {
|
|
185
|
+
if (!s.sort)
|
|
186
|
+
return;
|
|
187
|
+
const w = document.querySelector(".el-table__body tbody");
|
|
188
|
+
$e.create(w, {
|
|
189
|
+
animation: 200,
|
|
190
|
+
// group: "el-table__row table-row",
|
|
191
|
+
sort: !0,
|
|
192
|
+
handle: s.sortHandle ? `.${s.sortHandle}` : null,
|
|
193
|
+
onEnd: ({
|
|
194
|
+
oldIndex: v,
|
|
195
|
+
newIndex: C
|
|
196
|
+
}) => {
|
|
197
|
+
h("sort-end", v, C);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}, p = (w) => {
|
|
201
|
+
let v;
|
|
202
|
+
const {
|
|
203
|
+
columns: C,
|
|
204
|
+
rowKey: R,
|
|
205
|
+
tableData: m,
|
|
206
|
+
pageInfo: g
|
|
207
|
+
} = w, u = (x, e) => {
|
|
208
|
+
var a;
|
|
209
|
+
return x.slotName && ((a = l[x.slotName]) == null ? void 0 : a.call(l, e));
|
|
210
|
+
}, r = (x) => x.filter((e) => !e.show || e.show(e)).map((e) => {
|
|
211
|
+
const i = e, {
|
|
212
|
+
children: a
|
|
213
|
+
} = i, y = A(i, [
|
|
214
|
+
"children"
|
|
215
|
+
]);
|
|
216
|
+
return f(k("el-table-column"), y, {
|
|
217
|
+
default: ($) => {
|
|
218
|
+
if ((e == null ? void 0 : e.renderType) === "operate")
|
|
219
|
+
return c(e, $);
|
|
220
|
+
if (e != null && e.renderType && (e == null ? void 0 : e.renderType) !== "operate") {
|
|
221
|
+
const Y = {
|
|
222
|
+
renderType: e.renderType,
|
|
223
|
+
prop: e.prop,
|
|
224
|
+
config: e.config
|
|
225
|
+
};
|
|
226
|
+
return f(de, {
|
|
227
|
+
conf: Y,
|
|
228
|
+
model: $.row,
|
|
229
|
+
onChange: e == null ? void 0 : e.change
|
|
230
|
+
}, null);
|
|
78
231
|
}
|
|
232
|
+
return e != null && e.render ? e == null ? void 0 : e.render($.row) : a && (a == null ? void 0 : a.length) > 0 ? r(a) : (e == null ? void 0 : e.slotName) && u(e, $);
|
|
79
233
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}, n.unix = function() {
|
|
99
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
100
|
-
}, n.valueOf = function() {
|
|
101
|
-
return this.$d.getTime();
|
|
102
|
-
}, n.startOf = function(t, r) {
|
|
103
|
-
var e = this, i = !!a.u(r) || r, u = a.p(t), o = function(S, l) {
|
|
104
|
-
var g = a.w(e.$u ? Date.UTC(e.$y, l, S) : new Date(e.$y, l, S), e);
|
|
105
|
-
return i ? g : g.endOf(M);
|
|
106
|
-
}, c = function(S, l) {
|
|
107
|
-
return a.w(e.toDate()[S].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(l)), e);
|
|
108
|
-
}, h = this.$W, d = this.$M, $ = this.$D, T = "set" + (this.$u ? "UTC" : "");
|
|
109
|
-
switch (u) {
|
|
110
|
-
case v:
|
|
111
|
-
return i ? o(1, 0) : o(31, 11);
|
|
112
|
-
case m:
|
|
113
|
-
return i ? o(1, d) : o(0, d + 1);
|
|
114
|
-
case x:
|
|
115
|
-
var D = this.$locale().weekStart || 0, H = (h < D ? h + 7 : h) - D;
|
|
116
|
-
return o(i ? $ - H : $ + (6 - H), d);
|
|
117
|
-
case M:
|
|
118
|
-
case O:
|
|
119
|
-
return c(T + "Hours", 0);
|
|
120
|
-
case _:
|
|
121
|
-
return c(T + "Minutes", 1);
|
|
122
|
-
case b:
|
|
123
|
-
return c(T + "Seconds", 2);
|
|
124
|
-
case w:
|
|
125
|
-
return c(T + "Milliseconds", 3);
|
|
126
|
-
default:
|
|
127
|
-
return this.clone();
|
|
128
|
-
}
|
|
129
|
-
}, n.endOf = function(t) {
|
|
130
|
-
return this.startOf(t, !1);
|
|
131
|
-
}, n.$set = function(t, r) {
|
|
132
|
-
var e, i = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[O] = u + "Date", e[m] = u + "Month", e[v] = u + "FullYear", e[_] = u + "Hours", e[b] = u + "Minutes", e[w] = u + "Seconds", e[I] = u + "Milliseconds", e)[i], c = i === M ? this.$D + (r - this.$W) : r;
|
|
133
|
-
if (i === m || i === v) {
|
|
134
|
-
var h = this.clone().set(O, 1);
|
|
135
|
-
h.$d[o](c), h.init(), this.$d = h.set(O, Math.min(this.$D, h.daysInMonth())).$d;
|
|
136
|
-
} else
|
|
137
|
-
o && this.$d[o](c);
|
|
138
|
-
return this.init(), this;
|
|
139
|
-
}, n.set = function(t, r) {
|
|
140
|
-
return this.clone().$set(t, r);
|
|
141
|
-
}, n.get = function(t) {
|
|
142
|
-
return this[a.p(t)]();
|
|
143
|
-
}, n.add = function(t, r) {
|
|
144
|
-
var e, i = this;
|
|
145
|
-
t = Number(t);
|
|
146
|
-
var u = a.p(r), o = function(d) {
|
|
147
|
-
var $ = f(i);
|
|
148
|
-
return a.w($.date($.date() + Math.round(d * t)), i);
|
|
234
|
+
});
|
|
235
|
+
}), c = (x, e) => {
|
|
236
|
+
var a;
|
|
237
|
+
return f("div", {
|
|
238
|
+
class: "flex justify-center items-center cursor-pointer"
|
|
239
|
+
}, [(a = x.operate) == null ? void 0 : a.filter((y) => !y.show || y.show(e.row)).map((y) => y != null && y.render ? y.render(e.row) : f("span", {
|
|
240
|
+
onClick: be(() => {
|
|
241
|
+
y != null && y.onClick && (y == null || y.onClick(e.row)), h("operate-handle", y.key, e.row);
|
|
242
|
+
}, ["stop"]),
|
|
243
|
+
class: "table-handle whitespace-nowrap"
|
|
244
|
+
}, [z(" "), y.label, z(" ")]))]);
|
|
245
|
+
}, U = () => {
|
|
246
|
+
if (!g)
|
|
247
|
+
return null;
|
|
248
|
+
const x = (a) => {
|
|
249
|
+
h("update-page", "pageSize", a);
|
|
250
|
+
}, e = (a) => {
|
|
251
|
+
h("update-page", "pageIndex", a);
|
|
149
252
|
};
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
253
|
+
return f("div", {
|
|
254
|
+
class: "pagination-wrap"
|
|
255
|
+
}, [f(k("el-pagination"), {
|
|
256
|
+
currentPage: g.pageIndex,
|
|
257
|
+
"onUpdate:currentPage": (a) => g.pageIndex = a,
|
|
258
|
+
pageSize: g.pageSize,
|
|
259
|
+
"onUpdate:pageSize": (a) => g.pageSize = a,
|
|
260
|
+
small: !1,
|
|
261
|
+
disabled: !1,
|
|
262
|
+
"page-sizes": [10, 20, 50, 100],
|
|
263
|
+
layout: "total,sizes,prev, pager, next",
|
|
264
|
+
background: !1,
|
|
265
|
+
total: g.total,
|
|
266
|
+
onSizeChange: x,
|
|
267
|
+
onCurrentChange: e
|
|
268
|
+
}, null)]);
|
|
269
|
+
};
|
|
270
|
+
return f(L, null, [f(k("el-table"), D({
|
|
271
|
+
ref: S
|
|
272
|
+
}, d, {
|
|
273
|
+
"row-key": R,
|
|
274
|
+
data: m
|
|
275
|
+
}), Ie(v = r(C)) ? v : {
|
|
276
|
+
default: () => [v]
|
|
277
|
+
}), U()]);
|
|
278
|
+
};
|
|
279
|
+
return o({
|
|
280
|
+
tableRef: S
|
|
281
|
+
}), (w, v) => (_(), F(j(p(s))));
|
|
282
|
+
}
|
|
283
|
+
}), ze = /* @__PURE__ */ P({
|
|
284
|
+
__name: "index",
|
|
285
|
+
props: {
|
|
286
|
+
searchColumns: {},
|
|
287
|
+
searchParams: {},
|
|
288
|
+
showSearchBtn: {
|
|
289
|
+
type: Boolean,
|
|
290
|
+
default: !0
|
|
291
|
+
},
|
|
292
|
+
showAddBtn: {
|
|
293
|
+
type: Boolean,
|
|
294
|
+
default: !0
|
|
295
|
+
},
|
|
296
|
+
style: {},
|
|
297
|
+
labelStyle: {},
|
|
298
|
+
className: {},
|
|
299
|
+
classLabelName: {}
|
|
300
|
+
},
|
|
301
|
+
emits: ["search", "add"],
|
|
302
|
+
setup(n, {
|
|
303
|
+
emit: o
|
|
304
|
+
}) {
|
|
305
|
+
const t = ne(), s = n, l = o, d = (S) => {
|
|
306
|
+
const {
|
|
307
|
+
searchColumns: h,
|
|
308
|
+
searchParams: b,
|
|
309
|
+
showSearchBtn: p,
|
|
310
|
+
showAddBtn: w,
|
|
311
|
+
style: v,
|
|
312
|
+
labelStyle: C,
|
|
313
|
+
className: R,
|
|
314
|
+
classLabelName: m
|
|
315
|
+
} = S;
|
|
316
|
+
return f(L, null, [f("div", {
|
|
317
|
+
class: "table-search flex gap-10"
|
|
318
|
+
}, [((u) => u.filter((r) => !r.show || r.show()).map((r) => {
|
|
319
|
+
var U, x;
|
|
320
|
+
const c = {
|
|
321
|
+
renderType: r.renderType,
|
|
322
|
+
prop: r.key,
|
|
323
|
+
config: r.config
|
|
173
324
|
};
|
|
174
|
-
return
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
325
|
+
return f("div", {
|
|
326
|
+
class: `flex items-center search-item ${R != null ? R : ""} ${(U = r.className) != null ? U : ""}`,
|
|
327
|
+
style: V(V({}, v), r.style)
|
|
328
|
+
}, [f("span", {
|
|
329
|
+
class: `whitespace-nowrap label ${m != null ? m : ""} ${(x = r.classLabelName) != null ? x : ""}`,
|
|
330
|
+
style: V(V({}, C), r.labelStyle)
|
|
331
|
+
}, [z(" "), r.label, z(" ")]), f(de, {
|
|
332
|
+
class: r.componentClassName,
|
|
333
|
+
style: r.componentStyle,
|
|
334
|
+
conf: c,
|
|
335
|
+
model: b,
|
|
336
|
+
onChange: r == null ? void 0 : r.change
|
|
337
|
+
}, null)]);
|
|
338
|
+
}))(h), p && f(k("el-button"), {
|
|
339
|
+
onClick: () => l("search"),
|
|
340
|
+
class: "search-item"
|
|
341
|
+
}, {
|
|
342
|
+
default: () => [z("搜索"), " "]
|
|
343
|
+
}), w && f(k("el-button"), {
|
|
344
|
+
class: "search-item",
|
|
345
|
+
onClick: () => l("add")
|
|
346
|
+
}, {
|
|
347
|
+
default: () => [z("添加")]
|
|
348
|
+
}), t.default && t.default()])]);
|
|
349
|
+
};
|
|
350
|
+
return (S, h) => (_(), F(j(d(s))));
|
|
351
|
+
}
|
|
352
|
+
}), Re = /* @__PURE__ */ Z(ze, [["__scopeId", "data-v-c70da20e"]]), Ue = {
|
|
353
|
+
required: Le,
|
|
354
|
+
isNumber: De,
|
|
355
|
+
isInt: Ee,
|
|
356
|
+
maxNumber: Oe,
|
|
357
|
+
minNumber: Pe,
|
|
358
|
+
reg: Be
|
|
359
|
+
};
|
|
360
|
+
function je(n, o, t) {
|
|
361
|
+
return Ue[o](n, t);
|
|
362
|
+
}
|
|
363
|
+
function Le(n) {
|
|
364
|
+
return { required: !0, message: `请输入${n}`, trigger: ["blur", "change"] };
|
|
365
|
+
}
|
|
366
|
+
function De(n) {
|
|
367
|
+
return {
|
|
368
|
+
validator: (o, t, s) => {
|
|
369
|
+
if (Number.isNaN(+t)) {
|
|
370
|
+
s(new Error(`${n}必须是数字类型`));
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
s();
|
|
374
|
+
},
|
|
375
|
+
trigger: "blur"
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
function Ee(n) {
|
|
379
|
+
return {
|
|
380
|
+
validator: (o, t, s) => {
|
|
381
|
+
if (t % 1 !== 0) {
|
|
382
|
+
s(new Error(`${n}必须是整数类型`));
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
s();
|
|
386
|
+
},
|
|
387
|
+
trigger: "blur"
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
function Oe(n, o) {
|
|
391
|
+
return {
|
|
392
|
+
validator: (t, s, l) => {
|
|
393
|
+
if (+s > +o) {
|
|
394
|
+
l(new Error(`${n}的值必须小于${o}`));
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
l();
|
|
398
|
+
},
|
|
399
|
+
trigger: "blur"
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
function Pe(n, o) {
|
|
403
|
+
return {
|
|
404
|
+
validator: (t, s, l) => {
|
|
405
|
+
if (+s < +o) {
|
|
406
|
+
l(new Error(`${n}的值必须大于${o}`));
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
l();
|
|
410
|
+
},
|
|
411
|
+
trigger: "blur"
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
function Be(n, o) {
|
|
415
|
+
return {
|
|
416
|
+
validator: (t, s, l) => {
|
|
417
|
+
if (!o.test(s)) {
|
|
418
|
+
l(new Error("校验不通过"));
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
l();
|
|
422
|
+
},
|
|
423
|
+
trigger: "blur"
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
const qe = {
|
|
427
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
428
|
+
width: "16",
|
|
429
|
+
height: "16",
|
|
430
|
+
class: "icon",
|
|
431
|
+
viewBox: "0 0 1024 1024"
|
|
432
|
+
}, Ae = /* @__PURE__ */ I("path", {
|
|
433
|
+
fill: "#707070",
|
|
434
|
+
d: "M511.666 64.673c-246.535 0-446.39 199.856-446.39 446.39 0 246.536 199.855 446.393 446.39 446.393s446.392-199.857 446.392-446.392S758.203 64.673 511.666 64.673m0 836.878c-215.66 0-390.487-174.827-390.487-390.488 0-215.66 174.827-390.487 390.487-390.487s390.488 174.827 390.488 390.487c0 215.661-174.828 390.488-390.488 390.488m-86.894-485.188s14.002-86.168 100.17-76.474c86.168 9.694 66.78 74.32 58.163 87.245-8.616 21.542-88.323 73.243-101.247 104.479-12.925 31.236-11.848 89.4-11.848 89.4h77.551s-4.308-61.395 38.776-87.246c43.084-25.85 116.326-101.247 84.014-173.413-51.701-82.937-102.324-91.554-168.028-89.4-65.703 2.155-134.638 34.468-157.257 134.639 53.855 7.538 79.706 10.77 79.706 10.77m44.16 233.73h80.783v88.311h-80.782v-88.31z"
|
|
435
|
+
}, null, -1), Ye = [
|
|
436
|
+
Ae
|
|
437
|
+
];
|
|
438
|
+
function Ke(n, o) {
|
|
439
|
+
return _(), N("svg", qe, Ye);
|
|
440
|
+
}
|
|
441
|
+
const Me = { render: Ke }, He = {
|
|
442
|
+
key: 0,
|
|
443
|
+
style: { "margin-left": "4px" }
|
|
444
|
+
}, We = ["slot"], Ge = /* @__PURE__ */ P({
|
|
445
|
+
__name: "form",
|
|
446
|
+
props: {
|
|
447
|
+
formConfig: {},
|
|
448
|
+
status: {},
|
|
449
|
+
formData: {}
|
|
450
|
+
},
|
|
451
|
+
setup(n, { expose: o }) {
|
|
452
|
+
const t = ["date-picker"], s = n, l = O(), d = O(b()), S = p(), h = ve(() => {
|
|
453
|
+
const u = s.formConfig.compList, r = {};
|
|
454
|
+
return u.forEach((c) => {
|
|
455
|
+
(typeof c.hidden == "function" ? !c.hidden(d.value, s.status) : !c.hidden) && c.name && (r[c.name] = d.value[c.name]);
|
|
456
|
+
}), r;
|
|
457
|
+
});
|
|
458
|
+
function b() {
|
|
459
|
+
return s.status === "ADD" ? v() : s.formData;
|
|
460
|
+
}
|
|
461
|
+
function p() {
|
|
462
|
+
return C();
|
|
463
|
+
}
|
|
464
|
+
function w() {
|
|
465
|
+
d.value = v();
|
|
466
|
+
}
|
|
467
|
+
function v() {
|
|
468
|
+
const u = s.formConfig.compList, r = {};
|
|
469
|
+
return u.forEach((c) => {
|
|
470
|
+
c.name && (r[c.name] = c.defaultValue);
|
|
471
|
+
}), r;
|
|
472
|
+
}
|
|
473
|
+
function C() {
|
|
474
|
+
const u = s.formConfig.compList, r = {};
|
|
475
|
+
return u.forEach((c) => {
|
|
476
|
+
var e, a, y;
|
|
477
|
+
const U = ((e = c.rule) == null ? void 0 : e.constructor) === Object && Object.keys(c.rule).length > 0, x = Array.isArray(c.customRules) && c.customRules.length > 0;
|
|
478
|
+
if ((U || x) && !r[c.name] && (r[c.name] = []), U)
|
|
479
|
+
for (const i in c.rule) {
|
|
480
|
+
if (c.rule[i] === !1)
|
|
481
|
+
break;
|
|
482
|
+
const $ = typeof c.label == "function" ? g(c.label) : c.label;
|
|
483
|
+
(a = r[c.name]) == null || a.push(je($, i, c.rule[i]));
|
|
484
|
+
}
|
|
485
|
+
x && ((y = c.customRules) == null || y.forEach((i) => {
|
|
486
|
+
var $;
|
|
487
|
+
($ = r[c.name]) == null || $.push(i);
|
|
488
|
+
}));
|
|
489
|
+
}), r;
|
|
490
|
+
}
|
|
491
|
+
function R() {
|
|
492
|
+
return new Promise((u, r) => {
|
|
493
|
+
l.value.validate((c) => {
|
|
494
|
+
c ? u("") : r();
|
|
228
495
|
});
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
function m(u) {
|
|
499
|
+
return u.filter((r) => !g(r.hidden));
|
|
500
|
+
}
|
|
501
|
+
function g(u) {
|
|
502
|
+
return typeof u == "function" ? u(d.value, s.status) : u;
|
|
503
|
+
}
|
|
504
|
+
return ie(
|
|
505
|
+
() => d,
|
|
506
|
+
() => {
|
|
507
|
+
v();
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
deep: !0
|
|
511
|
+
}
|
|
512
|
+
), o({
|
|
513
|
+
form: d,
|
|
514
|
+
formValue: h,
|
|
515
|
+
resetForm: w,
|
|
516
|
+
validateForm: R
|
|
517
|
+
}), (u, r) => {
|
|
518
|
+
const c = k("el-popover"), U = k("el-form-item"), x = k("el-form");
|
|
519
|
+
return _(), F(x, D({
|
|
520
|
+
ref_key: "formRef",
|
|
521
|
+
ref: l,
|
|
522
|
+
model: d.value
|
|
523
|
+
}, u.formConfig.formProps, { rules: X(S) }), {
|
|
524
|
+
default: T(() => [
|
|
525
|
+
I("div", {
|
|
526
|
+
class: "form-wrap",
|
|
527
|
+
style: Q(u.formConfig.wrapStyle)
|
|
528
|
+
}, [
|
|
529
|
+
(_(!0), N(L, null, q(m(u.formConfig.compList), (e) => (_(), N("div", {
|
|
530
|
+
class: "form-item",
|
|
531
|
+
key: e.name,
|
|
532
|
+
style: Q(V(V({}, u.formConfig.itemStyle), e.style))
|
|
533
|
+
}, [
|
|
534
|
+
f(U, D(V(V({}, u.formConfig.formItemProps), e.formItemProps), {
|
|
535
|
+
prop: e.name,
|
|
536
|
+
style: u.formConfig.formItemStyle,
|
|
537
|
+
class: u.formConfig.layout
|
|
538
|
+
}), {
|
|
539
|
+
label: T(() => [
|
|
540
|
+
I("span", {
|
|
541
|
+
style: Q(e.labelStyle)
|
|
542
|
+
}, E(g(e.label)), 5),
|
|
543
|
+
e.hint ? (_(), F(c, {
|
|
544
|
+
key: 0,
|
|
545
|
+
placement: "top-start",
|
|
546
|
+
trigger: "hover",
|
|
547
|
+
content: e.hint
|
|
548
|
+
}, {
|
|
549
|
+
reference: T(() => [
|
|
550
|
+
e.hint ? (_(), N("span", He, [
|
|
551
|
+
f(X(Me), { color: "#ccc" })
|
|
552
|
+
])) : B("", !0)
|
|
553
|
+
]),
|
|
554
|
+
_: 2
|
|
555
|
+
}, 1032, ["content"])) : B("", !0)
|
|
556
|
+
]),
|
|
557
|
+
default: T(() => [
|
|
558
|
+
e.slotName ? te(u.$slots, e.slotName, {
|
|
559
|
+
key: 0,
|
|
560
|
+
form: d.value
|
|
561
|
+
}, void 0, !0) : t.includes(e.ctype || "") ? (_(), F(j(`el-${e.ctype}`), D({ key: 1 }, e.config, {
|
|
562
|
+
modelValue: d.value[e.name],
|
|
563
|
+
"onUpdate:modelValue": (a) => d.value[e.name] = a
|
|
564
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (_(), F(j(`el-${e.ctype}`), D({ key: 2 }, e.config, {
|
|
565
|
+
disabled: g(e.disabled),
|
|
566
|
+
modelValue: d.value[e.name],
|
|
567
|
+
"onUpdate:modelValue": (a) => d.value[e.name] = a,
|
|
568
|
+
onKeyup: we((a) => g(e == null ? void 0 : e.enter), ["enter"])
|
|
569
|
+
}, Se(e.event)), {
|
|
570
|
+
default: T(() => [
|
|
571
|
+
e.ctype === "select" ? (_(!0), N(L, { key: 0 }, q(e.selectOptions, (a) => (_(), F(j("el-option"), {
|
|
572
|
+
key: a.value,
|
|
573
|
+
label: a.label,
|
|
574
|
+
value: a.value
|
|
575
|
+
}, null, 8, ["label", "value"]))), 128)) : B("", !0),
|
|
576
|
+
e.ctype === "radio-group" ? (_(!0), N(L, { key: 1 }, q(e.radioList, (a) => (_(), F(j("el-radio"), {
|
|
577
|
+
key: a.value,
|
|
578
|
+
label: a.value
|
|
579
|
+
}, {
|
|
580
|
+
default: T(() => [
|
|
581
|
+
z(E(a.label), 1)
|
|
582
|
+
]),
|
|
583
|
+
_: 2
|
|
584
|
+
}, 1032, ["label"]))), 128)) : B("", !0),
|
|
585
|
+
e.ctype === "checkbox-group" ? (_(!0), N(L, { key: 2 }, q(e.checkboxList, (a) => (_(), F(j("el-checkbox"), {
|
|
586
|
+
key: a,
|
|
587
|
+
label: a
|
|
588
|
+
}, null, 8, ["label"]))), 128)) : B("", !0),
|
|
589
|
+
e.ctype === "input" ? (_(!0), N(L, { key: 3 }, q((e.slots || []).filter((a) => a.type === "text"), (a) => (_(), N("div", {
|
|
590
|
+
slot: a.name,
|
|
591
|
+
key: a.name
|
|
592
|
+
}, E(a.inner), 9, We))), 128)) : B("", !0)
|
|
593
|
+
]),
|
|
594
|
+
_: 2
|
|
595
|
+
}, 1040, ["disabled", "modelValue", "onUpdate:modelValue", "onKeyup"]))
|
|
596
|
+
]),
|
|
597
|
+
_: 2
|
|
598
|
+
}, 1040, ["prop", "style", "class"])
|
|
599
|
+
], 4))), 128))
|
|
600
|
+
], 4)
|
|
601
|
+
]),
|
|
602
|
+
_: 3
|
|
603
|
+
}, 16, ["model", "rules"]);
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
}), Je = /* @__PURE__ */ Z(Ge, [["__scopeId", "data-v-a47302d3"]]);
|
|
607
|
+
let pe, fe, Qe;
|
|
608
|
+
const Xe = () => {
|
|
609
|
+
localStorage.setItem(pe, fe), window.location.reload(!0);
|
|
610
|
+
}, Ze = () => {
|
|
611
|
+
Qe.unmount(), document.body.removeChild(document.querySelector("#update")), localStorage.setItem(pe, fe);
|
|
612
|
+
}, et = (n) => (Ce("data-v-ebf4f18f"), n = n(), xe(), n), tt = { class: "update-wrap flex items-center justify-center" }, nt = { class: "relative update-content" }, ot = { class: "flex items-center justify-center" }, rt = { class: "flex flex-col gap-5 mt-10" }, at = { class: "update-title" }, st = { class: "update-item px-20" }, lt = { class: "text-end" }, ut = { class: "flex justify-end items-center mt-10" }, it = /* @__PURE__ */ et(() => /* @__PURE__ */ I("span", { class: "tips mt-10" }, "提示: 选择立即更新后,会立即刷新页面更新系统,当前页面缓存数据会消失选择暂不更新后,请稍后自行刷新页面更新系统。", -1)), ct = /* @__PURE__ */ P({
|
|
613
|
+
__name: "index",
|
|
614
|
+
props: {
|
|
615
|
+
title: {},
|
|
616
|
+
description: {},
|
|
617
|
+
content: {},
|
|
618
|
+
time: {}
|
|
619
|
+
},
|
|
620
|
+
setup(n) {
|
|
621
|
+
const o = n;
|
|
622
|
+
return console.log(o), (t, s) => {
|
|
623
|
+
const l = k("el-button");
|
|
624
|
+
return _(), N("div", tt, [
|
|
625
|
+
I("div", nt, [
|
|
626
|
+
I("div", ot, E(o == null ? void 0 : o.title), 1),
|
|
627
|
+
I("div", rt, [
|
|
628
|
+
I("div", at, E(o == null ? void 0 : o.description), 1),
|
|
629
|
+
(_(!0), N(L, null, q(o == null ? void 0 : o.content, (d, S) => (_(), N("div", st, [
|
|
630
|
+
I("span", null, E(S) + ":", 1),
|
|
631
|
+
z(),
|
|
632
|
+
I("span", null, E(d), 1)
|
|
633
|
+
]))), 256)),
|
|
634
|
+
I("div", lt, E(o.time) + " 软件专业部", 1),
|
|
635
|
+
I("div", ut, [
|
|
636
|
+
f(l, {
|
|
637
|
+
plain: "",
|
|
638
|
+
onClick: X(Ze)
|
|
639
|
+
}, {
|
|
640
|
+
default: T(() => [
|
|
641
|
+
z("暂不更新")
|
|
642
|
+
]),
|
|
643
|
+
_: 1
|
|
644
|
+
}, 8, ["onClick"]),
|
|
645
|
+
f(l, { onClick: X(Xe) }, {
|
|
646
|
+
default: T(() => [
|
|
647
|
+
z("立即更新")
|
|
648
|
+
]),
|
|
649
|
+
_: 1
|
|
650
|
+
}, 8, ["onClick"])
|
|
651
|
+
]),
|
|
652
|
+
it
|
|
653
|
+
])
|
|
654
|
+
])
|
|
655
|
+
]);
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
}), dt = /* @__PURE__ */ Z(ct, [["__scopeId", "data-v-ebf4f18f"]]), pt = {
|
|
659
|
+
props: {
|
|
660
|
+
color: {
|
|
661
|
+
type: String,
|
|
662
|
+
default: "inherit"
|
|
663
|
+
},
|
|
664
|
+
size: {
|
|
665
|
+
type: String,
|
|
666
|
+
default: "16"
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
};
|
|
670
|
+
function ft(n, o, t, s, l, d) {
|
|
671
|
+
return _(), N("i", {
|
|
672
|
+
class: "yx-icon",
|
|
673
|
+
style: Q([{ "--color": t.color, "font-size": t.size + "px" }])
|
|
674
|
+
}, [
|
|
675
|
+
te(n.$slots, "default", {}, void 0, !0)
|
|
676
|
+
], 4);
|
|
677
|
+
}
|
|
678
|
+
const mt = /* @__PURE__ */ Z(pt, [["render", ft], ["__scopeId", "data-v-75aef834"]]), ht = /* @__PURE__ */ P({
|
|
679
|
+
__name: "index",
|
|
680
|
+
props: {
|
|
681
|
+
uploadTips: {},
|
|
682
|
+
render: {
|
|
683
|
+
type: Function
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
emits: ["update:fileObsUrl"],
|
|
687
|
+
setup(n, {
|
|
688
|
+
emit: o
|
|
689
|
+
}) {
|
|
690
|
+
const t = oe(), s = O([]), l = n, d = O(""), S = o, h = (w) => J(this, [w], function* ({
|
|
691
|
+
file: p
|
|
692
|
+
}) {
|
|
693
|
+
const v = new FormData();
|
|
694
|
+
v.append("file", p);
|
|
695
|
+
const {
|
|
696
|
+
data: C
|
|
697
|
+
} = yield Ve(v);
|
|
698
|
+
d.value = C.fileUrl, S("update:fileObsUrl", d.value);
|
|
699
|
+
}), b = (p) => f(k("el-upload"), D({
|
|
700
|
+
class: "w-full h-full",
|
|
701
|
+
"http-request": h,
|
|
702
|
+
"file-list": s.value
|
|
703
|
+
}, t), {
|
|
704
|
+
trigger: () => p == null ? void 0 : p.render(d.value),
|
|
705
|
+
tip: () => f("div", {
|
|
706
|
+
class: "el-upload__tip"
|
|
707
|
+
}, [p == null ? void 0 : p.uploadTips])
|
|
708
|
+
});
|
|
709
|
+
return (p, w) => (_(), F(j(b(l)), {
|
|
710
|
+
"model-value": d.value
|
|
711
|
+
}, null, 8, ["model-value"]));
|
|
712
|
+
}
|
|
713
|
+
});
|
|
714
|
+
function ue(n) {
|
|
715
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !ce(n);
|
|
716
|
+
}
|
|
717
|
+
const gt = /* @__PURE__ */ P({
|
|
718
|
+
name: "YxForm",
|
|
719
|
+
__name: "index",
|
|
720
|
+
props: {
|
|
721
|
+
formParams: {},
|
|
722
|
+
formList: {},
|
|
723
|
+
formLayout: {
|
|
724
|
+
default: "horizontal"
|
|
725
|
+
},
|
|
726
|
+
formStyle: {
|
|
727
|
+
default: {
|
|
728
|
+
row: 3,
|
|
729
|
+
gap: "15px",
|
|
730
|
+
labelWidth: "100px",
|
|
731
|
+
"align-items": "start"
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
rules: {}
|
|
735
|
+
},
|
|
736
|
+
setup(n, {
|
|
737
|
+
expose: o
|
|
738
|
+
}) {
|
|
739
|
+
let t = O({});
|
|
740
|
+
const s = O({}), l = () => {
|
|
741
|
+
const {
|
|
742
|
+
formList: m,
|
|
743
|
+
formParams: g
|
|
744
|
+
} = h;
|
|
745
|
+
!g || Object.keys(g).length === 0 ? m.forEach((u) => t.value[u.prop] = "") : t.value = g, console.log("initForm", t);
|
|
746
|
+
}, d = ne(), S = oe(), h = n, b = () => {
|
|
747
|
+
let m = {};
|
|
748
|
+
const {
|
|
749
|
+
formList: g
|
|
750
|
+
} = h;
|
|
751
|
+
g.forEach((u) => {
|
|
752
|
+
if (u.children && u.children.length > 0 && u.children.forEach((r) => {
|
|
753
|
+
if (r.required) {
|
|
754
|
+
const c = {
|
|
755
|
+
required: !0,
|
|
756
|
+
message: `${r.label}不能为空`,
|
|
757
|
+
trigger: "blur"
|
|
758
|
+
};
|
|
759
|
+
m[r.prop] = [c], r.rules && (m[r.prop] = [...m[r.prop], ...r.rules]);
|
|
760
|
+
}
|
|
761
|
+
}), u.required) {
|
|
762
|
+
const r = {
|
|
763
|
+
required: !0,
|
|
764
|
+
message: `${u.label}不能为空`,
|
|
765
|
+
trigger: "blur"
|
|
766
|
+
};
|
|
767
|
+
m[u.prop] = [r], u.rules && (m[u.prop] = [...m[u.prop], ...u.rules]);
|
|
262
768
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
return
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
769
|
+
}), s.value = m;
|
|
770
|
+
}, p = O(), w = () => {
|
|
771
|
+
const {
|
|
772
|
+
formStyle: m
|
|
773
|
+
} = h, c = m, {
|
|
774
|
+
row: g,
|
|
775
|
+
gap: u
|
|
776
|
+
} = c, r = A(c, [
|
|
777
|
+
"row",
|
|
778
|
+
"gap"
|
|
779
|
+
]);
|
|
780
|
+
return V({
|
|
781
|
+
"grid-template-columns": `repeat(${g}, 1fr)`,
|
|
782
|
+
"grid-gap": u
|
|
783
|
+
}, r);
|
|
784
|
+
}, v = (m) => {
|
|
785
|
+
if (!m)
|
|
786
|
+
return {};
|
|
787
|
+
const c = m, {
|
|
788
|
+
row: g,
|
|
789
|
+
gap: u
|
|
790
|
+
} = c, r = A(c, [
|
|
791
|
+
"row",
|
|
792
|
+
"gap"
|
|
793
|
+
]);
|
|
794
|
+
return V({
|
|
795
|
+
"grid-template-columns": `repeat(${g}, 1fr)`,
|
|
796
|
+
"grid-gap": u
|
|
797
|
+
}, r);
|
|
798
|
+
};
|
|
799
|
+
l(), b();
|
|
800
|
+
const C = (m) => {
|
|
801
|
+
let g;
|
|
802
|
+
const {
|
|
803
|
+
formList: u,
|
|
804
|
+
formStyle: r,
|
|
805
|
+
formLayout: c
|
|
806
|
+
} = m, U = ({
|
|
807
|
+
renderType: a,
|
|
808
|
+
event: y,
|
|
809
|
+
prop: i,
|
|
810
|
+
label: $,
|
|
811
|
+
config: Y
|
|
812
|
+
}) => {
|
|
813
|
+
const re = k("el-" + a), K = () => {
|
|
814
|
+
if (a === "select")
|
|
815
|
+
return Y.options.map((W) => f(k("el-option"), {
|
|
816
|
+
label: W.label,
|
|
817
|
+
value: W.value
|
|
818
|
+
}, null));
|
|
819
|
+
}, H = Y || {}, {
|
|
820
|
+
options: ee
|
|
821
|
+
} = H, M = A(H, [
|
|
822
|
+
"options"
|
|
823
|
+
]);
|
|
824
|
+
return f(re, D(y, M, {
|
|
825
|
+
modelValue: t.value[i],
|
|
826
|
+
"onUpdate:modelValue": (W) => t.value[i] = W,
|
|
827
|
+
placeholder: `请输入${$}`
|
|
828
|
+
}), ue(K) ? K : {
|
|
829
|
+
default: () => [K]
|
|
830
|
+
});
|
|
831
|
+
}, x = (a, y) => {
|
|
832
|
+
var i;
|
|
833
|
+
return a.slotName && ((i = d[a.slotName]) == null ? void 0 : i.call(d, y));
|
|
834
|
+
}, e = (a) => {
|
|
835
|
+
const y = (i) => {
|
|
836
|
+
var M;
|
|
837
|
+
const ee = i, {
|
|
838
|
+
render: $,
|
|
839
|
+
config: Y,
|
|
840
|
+
renderType: re
|
|
841
|
+
} = ee, K = A(ee, [
|
|
842
|
+
"render",
|
|
843
|
+
"config",
|
|
844
|
+
"renderType"
|
|
845
|
+
]);
|
|
846
|
+
return f(k("el-form-item"), D({
|
|
847
|
+
class: `${c === "vertical" ? "flex flex-col " : ""} ${(M = i.className) != null ? M : ""}`
|
|
848
|
+
}, K, {
|
|
849
|
+
prop: i.prop,
|
|
850
|
+
labelWidth: r.labelWidth
|
|
851
|
+
}), {
|
|
852
|
+
default: (H) => i != null && i.render ? i == null ? void 0 : i.render(t.value) : i.renderType ? U(i) : (i == null ? void 0 : i.slotName) && x(i, H),
|
|
853
|
+
label: () => f("span", {
|
|
854
|
+
class: i.className,
|
|
855
|
+
style: V({}, i.style)
|
|
856
|
+
}, [i.label])
|
|
857
|
+
});
|
|
858
|
+
};
|
|
859
|
+
return a.filter((i) => !i.show || i.show(t.value)).map((i) => i.children && i.children.length > 0 ? f("div", {
|
|
860
|
+
class: "flex flex-col"
|
|
861
|
+
}, [f("span", null, [i.groupName]), f("div", {
|
|
862
|
+
class: "grid",
|
|
863
|
+
style: V({}, v(i == null ? void 0 : i.groupStyle))
|
|
864
|
+
}, [i.children.filter(($) => !$.show || $.show(t.value)).map(($) => y($))])]) : y(i));
|
|
288
865
|
};
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
},
|
|
866
|
+
return f(L, null, [f(k("el-form"), D({
|
|
867
|
+
"scroll-to-error": !0,
|
|
868
|
+
model: t.value,
|
|
869
|
+
rules: s.value,
|
|
870
|
+
class: "grid",
|
|
871
|
+
ref: p
|
|
872
|
+
}, S, {
|
|
873
|
+
style: V({}, w())
|
|
874
|
+
}), ue(g = e(u)) ? g : {
|
|
875
|
+
default: () => [g]
|
|
876
|
+
})]);
|
|
877
|
+
};
|
|
878
|
+
return o({
|
|
879
|
+
formData: t,
|
|
880
|
+
formValidate: () => J(this, null, function* () {
|
|
881
|
+
return yield p.value.validate((m) => !!m);
|
|
882
|
+
})
|
|
883
|
+
}), (m, g) => (_(), F(j(C(h))));
|
|
884
|
+
}
|
|
885
|
+
}), Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
307
886
|
__proto__: null,
|
|
308
|
-
|
|
887
|
+
Toolbar: ke,
|
|
888
|
+
Update: dt,
|
|
889
|
+
YxDialog: Fe,
|
|
890
|
+
YxForm: Je,
|
|
891
|
+
YxFormV2: gt,
|
|
892
|
+
YxIcon: mt,
|
|
893
|
+
YxSearchForm: Re,
|
|
894
|
+
YxTable: Te,
|
|
895
|
+
YxUpload: ht
|
|
309
896
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
310
897
|
export {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
898
|
+
dt as U,
|
|
899
|
+
Fe as _,
|
|
900
|
+
Te as a,
|
|
901
|
+
mt as b,
|
|
902
|
+
Ct as c,
|
|
903
|
+
ht as d,
|
|
904
|
+
gt as e,
|
|
905
|
+
Je as f,
|
|
906
|
+
Re as i
|
|
315
907
|
};
|