ling-yun-custom-components 0.0.56 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/IconRenderer.mjs +1 -1
- package/es/IconSelect.mjs +1 -1
- package/es/SearchBar.mjs +1 -1
- package/es/UpdatePasswordDialog.mjs +1 -1
- package/es/assets/layout3.css +1 -1
- package/es/chunks/{global.C1Iy_saH.js → global.BN3x8LRV.js} +1348 -729
- package/es/chunks/global.E_yR-3k3.js +9854 -0
- package/es/chunks/layout.ChN1xJHg.js +601 -0
- package/lib/IconRenderer.js +1 -1
- package/lib/IconSelect.js +1 -1
- package/lib/SearchBar.js +1 -1
- package/lib/UpdatePasswordDialog.js +1 -1
- package/lib/assets/layout3.css +1 -1
- package/lib/chunks/global.D0m66zzb.js +1 -0
- package/lib/chunks/global.DH9s3Z8E.js +1 -0
- package/lib/chunks/layout.CTTLDiMA.js +1 -0
- package/package.json +3 -3
- package/lib/chunks/global.XouT1lGG.js +0 -1
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
import { renderSlot as b, createElementBlock as D, openBlock as u, Fragment as M, renderList as $, createBlock as c, unref as t, withCtx as r, createTextVNode as V, toDisplayString as U, useCssVars as le, ref as p, computed as x, withModifiers as be, normalizeClass as I, mergeProps as g, createCommentVNode as N, withKeys as ke, onMounted as ge, watch as we, createElementVNode as w, createVNode as m, createSlots as F, normalizeProps as H, guardReactiveProps as K, normalizeStyle as Ve } from "vue";
|
|
2
|
+
import { ElButton as O, ElForm as Ce, ElFormItem as oe, ElInput as Z, ElDatePicker as De, ElInputNumber as $e, ElSwitch as Ee, ElRadioGroup as Fe, ElRadio as xe, ElCheckboxGroup as Me, ElCheckbox as Ue, ElAutoResizer as _, ElPopover as Le, ElIcon as ee, ElDrawer as Pe } from "element-plus";
|
|
3
|
+
import { IconMagnify as Se, IconCheck as We, IconUp as Be, IconDown as Ie, IconShrink as Ne } from "color-message-lingyun-vue";
|
|
4
|
+
import { operationConfigMap as C, emitsMap as f, labelPositionMap as B, componentType as h, dateParamsMap as Oe, dateFormat as ae } from "ling-yun-methods";
|
|
5
|
+
import { _ as Te } from "./layout.wck_IDgd.js";
|
|
6
|
+
import { _ as ze } from "./layout.BaJd1PXA.js";
|
|
7
|
+
import { _ as ne } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
8
|
+
import { C as te } from "./layout.BKJPyxR8.js";
|
|
9
|
+
import '../assets/layout3.css';const Re = [
|
|
10
|
+
{
|
|
11
|
+
type: "primary",
|
|
12
|
+
label: "查询",
|
|
13
|
+
value: C.search
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: "default",
|
|
17
|
+
label: "重置",
|
|
18
|
+
value: C.reset
|
|
19
|
+
}
|
|
20
|
+
], re = 320, q = {
|
|
21
|
+
__name: "OperationButtons",
|
|
22
|
+
props: {
|
|
23
|
+
operationList: {
|
|
24
|
+
type: Array,
|
|
25
|
+
default: () => []
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
emits: [f.operation],
|
|
29
|
+
setup(a, { emit: L }) {
|
|
30
|
+
const E = L, d = (v) => {
|
|
31
|
+
E(f.operation, v);
|
|
32
|
+
};
|
|
33
|
+
return (v, n) => v.$slots.operation ? b(v.$slots, "operation", {
|
|
34
|
+
key: 0,
|
|
35
|
+
operationList: a.operationList
|
|
36
|
+
}) : (u(!0), D(M, { key: 1 }, $(a.operationList, (y) => (u(), c(t(O), {
|
|
37
|
+
key: y.value,
|
|
38
|
+
type: y.type,
|
|
39
|
+
icon: y.icon,
|
|
40
|
+
onClick: (e) => d(y.value)
|
|
41
|
+
}, {
|
|
42
|
+
default: r(() => [
|
|
43
|
+
V(U(y.label), 1)
|
|
44
|
+
]),
|
|
45
|
+
_: 2
|
|
46
|
+
}, 1032, ["type", "icon", "onClick"]))), 128));
|
|
47
|
+
}
|
|
48
|
+
}, je = /* @__PURE__ */ Object.assign({
|
|
49
|
+
name: "FormWrapper"
|
|
50
|
+
}, {
|
|
51
|
+
__name: "FormWrapper",
|
|
52
|
+
props: {
|
|
53
|
+
// 表单项配置
|
|
54
|
+
items: {
|
|
55
|
+
type: Array,
|
|
56
|
+
default: () => []
|
|
57
|
+
},
|
|
58
|
+
// 表单数据
|
|
59
|
+
formData: {
|
|
60
|
+
type: Object,
|
|
61
|
+
default: () => ({})
|
|
62
|
+
},
|
|
63
|
+
// 表单验证规则
|
|
64
|
+
rules: {
|
|
65
|
+
type: Object,
|
|
66
|
+
default: () => ({})
|
|
67
|
+
},
|
|
68
|
+
// 标签宽度
|
|
69
|
+
labelWidth: {
|
|
70
|
+
type: [String, Number],
|
|
71
|
+
default: "auto"
|
|
72
|
+
},
|
|
73
|
+
// 标签位置
|
|
74
|
+
labelPosition: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: B.right
|
|
77
|
+
},
|
|
78
|
+
// 是否显示标签
|
|
79
|
+
showLabel: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: !0
|
|
82
|
+
},
|
|
83
|
+
// 是否内联布局
|
|
84
|
+
inline: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: !1
|
|
87
|
+
},
|
|
88
|
+
// 是否为筛选器模式
|
|
89
|
+
isFilter: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: !1
|
|
92
|
+
},
|
|
93
|
+
// 是否为筛选器预览模式
|
|
94
|
+
isFilterPreview: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: !1
|
|
97
|
+
},
|
|
98
|
+
minWidth: {
|
|
99
|
+
type: Number,
|
|
100
|
+
default: re
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
emits: [f.change, f.enter],
|
|
104
|
+
setup(a, { expose: L }) {
|
|
105
|
+
le((n) => ({
|
|
106
|
+
v4b15a536: a.minWidth + "px"
|
|
107
|
+
}));
|
|
108
|
+
const E = a, d = p(null), v = x(() => E.isFilter ? "filter-form" : E.isFilterPreview ? "filter-preview-form" : "search-bar-form");
|
|
109
|
+
return L({
|
|
110
|
+
validate: (n) => d.value ? d.value.validate(n) : Promise.resolve(!0),
|
|
111
|
+
resetFields: () => {
|
|
112
|
+
d.value && d.value.resetFields();
|
|
113
|
+
},
|
|
114
|
+
clearValidate: (n) => {
|
|
115
|
+
d.value && d.value.clearValidate(n);
|
|
116
|
+
},
|
|
117
|
+
scrollToField: (n) => {
|
|
118
|
+
d.value && d.value.scrollToField(n);
|
|
119
|
+
}
|
|
120
|
+
}), (n, y) => (u(), c(t(Ce), {
|
|
121
|
+
ref_key: "formRef",
|
|
122
|
+
ref: d,
|
|
123
|
+
model: a.formData,
|
|
124
|
+
"label-width": a.labelWidth,
|
|
125
|
+
"label-position": a.labelPosition,
|
|
126
|
+
inline: a.inline,
|
|
127
|
+
rules: a.rules,
|
|
128
|
+
class: I({
|
|
129
|
+
[v.value]: !0,
|
|
130
|
+
"items-end display-grid": !a.isFilterPreview
|
|
131
|
+
}),
|
|
132
|
+
onSubmit: y[0] || (y[0] = be(() => {
|
|
133
|
+
}, ["prevent", "stop"]))
|
|
134
|
+
}, {
|
|
135
|
+
default: r(() => [
|
|
136
|
+
(u(!0), D(M, null, $(a.items, (e) => (u(), c(t(oe), g({
|
|
137
|
+
key: e.key,
|
|
138
|
+
label: a.showLabel ? e.label : "",
|
|
139
|
+
prop: e.key,
|
|
140
|
+
"show-label": a.showLabel,
|
|
141
|
+
class: [
|
|
142
|
+
{
|
|
143
|
+
"search-bar-item--wide": e.wide
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}, { ref_for: !0 }, e), {
|
|
147
|
+
default: r(() => [
|
|
148
|
+
b(n.$slots, e.key, {
|
|
149
|
+
item: e,
|
|
150
|
+
formData: a.formData
|
|
151
|
+
}, () => [
|
|
152
|
+
e.type === t(h).text ? (u(), c(t(Z), g({
|
|
153
|
+
key: 0,
|
|
154
|
+
modelValue: a.formData[e.key],
|
|
155
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
156
|
+
}, { ref_for: !0 }, e, {
|
|
157
|
+
class: "w-full",
|
|
158
|
+
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key]),
|
|
159
|
+
onKeyup: ke((l) => n.$emit(t(f).enter, e.key, a.formData[e.key]), ["enter"])
|
|
160
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange", "onKeyup"])) : e.type === t(h).select ? (u(), c(Te, g({
|
|
161
|
+
key: 1,
|
|
162
|
+
modelValue: a.formData[e.key],
|
|
163
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l,
|
|
164
|
+
"static-options": e.options
|
|
165
|
+
}, { ref_for: !0 }, e, {
|
|
166
|
+
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key]),
|
|
167
|
+
class: "w-full"
|
|
168
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "static-options", "onChange"])) : e.type === t(h).date ? (u(), c(t(De), g({
|
|
169
|
+
key: 2,
|
|
170
|
+
modelValue: a.formData[e.key],
|
|
171
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
172
|
+
}, { ref_for: !0 }, {
|
|
173
|
+
...e,
|
|
174
|
+
...t(Oe)[e.dateType]
|
|
175
|
+
}, {
|
|
176
|
+
type: e.dateType,
|
|
177
|
+
format: e.format || t(ae).date,
|
|
178
|
+
"value-format": e.valueFormat || t(ae).dateTime,
|
|
179
|
+
class: "w-full",
|
|
180
|
+
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
181
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "type", "format", "value-format", "onChange"])) : e.type === t(h).inputNumber ? (u(), c(t($e), g({
|
|
182
|
+
key: 3,
|
|
183
|
+
modelValue: a.formData[e.key],
|
|
184
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
185
|
+
}, { ref_for: !0 }, e, {
|
|
186
|
+
class: "w-full",
|
|
187
|
+
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
188
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).switch ? (u(), c(t(Ee), g({
|
|
189
|
+
key: 4,
|
|
190
|
+
modelValue: a.formData[e.key],
|
|
191
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
192
|
+
}, { ref_for: !0 }, e, {
|
|
193
|
+
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
194
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).radio ? (u(), c(t(Fe), {
|
|
195
|
+
key: 5,
|
|
196
|
+
modelValue: a.formData[e.key],
|
|
197
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l,
|
|
198
|
+
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
199
|
+
}, {
|
|
200
|
+
default: r(() => [
|
|
201
|
+
(u(!0), D(M, null, $(e.options, (l) => (u(), c(t(xe), {
|
|
202
|
+
key: l.value,
|
|
203
|
+
label: l.value,
|
|
204
|
+
value: l.value,
|
|
205
|
+
disabled: l.disabled
|
|
206
|
+
}, {
|
|
207
|
+
default: r(() => [
|
|
208
|
+
V(U(l.label), 1)
|
|
209
|
+
]),
|
|
210
|
+
_: 2
|
|
211
|
+
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
212
|
+
]),
|
|
213
|
+
_: 2
|
|
214
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).checkbox ? (u(), c(t(Me), {
|
|
215
|
+
key: 6,
|
|
216
|
+
modelValue: a.formData[e.key],
|
|
217
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l,
|
|
218
|
+
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
219
|
+
}, {
|
|
220
|
+
default: r(() => [
|
|
221
|
+
(u(!0), D(M, null, $(e.options, (l) => (u(), c(t(Ue), {
|
|
222
|
+
key: l.value,
|
|
223
|
+
label: l.value,
|
|
224
|
+
value: l.value,
|
|
225
|
+
disabled: l.disabled
|
|
226
|
+
}, {
|
|
227
|
+
default: r(() => [
|
|
228
|
+
V(U(l.label), 1)
|
|
229
|
+
]),
|
|
230
|
+
_: 2
|
|
231
|
+
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
232
|
+
]),
|
|
233
|
+
_: 2
|
|
234
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).textarea ? (u(), c(t(Z), g({
|
|
235
|
+
key: 7,
|
|
236
|
+
modelValue: a.formData[e.key],
|
|
237
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
238
|
+
}, { ref_for: !0 }, e, {
|
|
239
|
+
class: "w-full",
|
|
240
|
+
type: "textarea",
|
|
241
|
+
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
242
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).upload ? (u(), c(ze, g({
|
|
243
|
+
key: 8,
|
|
244
|
+
modelValue: a.formData[e.key],
|
|
245
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
246
|
+
}, { ref_for: !0 }, e), null, 16, ["modelValue", "onUpdate:modelValue"])) : N("", !0)
|
|
247
|
+
], !0)
|
|
248
|
+
]),
|
|
249
|
+
_: 2
|
|
250
|
+
}, 1040, ["label", "prop", "show-label", "class"]))), 128)),
|
|
251
|
+
b(n.$slots, "default", {}, void 0, !0)
|
|
252
|
+
]),
|
|
253
|
+
_: 3
|
|
254
|
+
}, 8, ["model", "label-width", "label-position", "inline", "rules", "class"]));
|
|
255
|
+
}
|
|
256
|
+
}), G = /* @__PURE__ */ ne(je, [["__scopeId", "data-v-125bfab7"]]), Ae = { class: "h-32 w-full" }, He = { class: "flex items-center justify-between pd-b-20" }, Ke = { class: "text-right" }, qe = { class: "drawer-header" }, Ge = { class: "flex-1 pd-l-16 pd-r-16 overflow-y-auto" }, Je = { class: "text-right border-top pd-t-16 pd-l-16 pd-r-16" }, Qe = /* @__PURE__ */ Object.assign({
|
|
257
|
+
name: "SearchBar"
|
|
258
|
+
}, {
|
|
259
|
+
__name: "layout",
|
|
260
|
+
props: {
|
|
261
|
+
// 搜索项配置
|
|
262
|
+
items: {
|
|
263
|
+
type: Array,
|
|
264
|
+
default: () => []
|
|
265
|
+
},
|
|
266
|
+
// 初始值
|
|
267
|
+
modelValue: {
|
|
268
|
+
type: Object,
|
|
269
|
+
default: () => ({})
|
|
270
|
+
},
|
|
271
|
+
// 标签宽度
|
|
272
|
+
labelWidth: {
|
|
273
|
+
type: [String, Number],
|
|
274
|
+
default: "auto"
|
|
275
|
+
},
|
|
276
|
+
// 标签位置
|
|
277
|
+
labelPosition: {
|
|
278
|
+
type: String,
|
|
279
|
+
default: B.right,
|
|
280
|
+
validator: (a) => [B.left, B.right, B.top].includes(a)
|
|
281
|
+
},
|
|
282
|
+
// 是否可以展开
|
|
283
|
+
isExpand: {
|
|
284
|
+
type: Boolean,
|
|
285
|
+
default: !0
|
|
286
|
+
},
|
|
287
|
+
// 最大的高度
|
|
288
|
+
maxHeight: {
|
|
289
|
+
type: Number,
|
|
290
|
+
default: 84
|
|
291
|
+
},
|
|
292
|
+
// 每项最小宽度
|
|
293
|
+
minWidth: {
|
|
294
|
+
type: Number,
|
|
295
|
+
default: re
|
|
296
|
+
},
|
|
297
|
+
operationList: {
|
|
298
|
+
type: Array,
|
|
299
|
+
default: Re
|
|
300
|
+
},
|
|
301
|
+
// 是否为筛选器模式
|
|
302
|
+
filterMode: {
|
|
303
|
+
type: Boolean,
|
|
304
|
+
default: !0
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
emits: [f.updateModelValue, f.operation, f.change],
|
|
308
|
+
setup(a, { expose: L, emit: E }) {
|
|
309
|
+
le((o) => ({
|
|
310
|
+
v6f32bb87: a.maxHeight + "px",
|
|
311
|
+
v8603bafe: A.value ? A.value + "px" : "100%"
|
|
312
|
+
}));
|
|
313
|
+
const d = a, v = E, n = p({}), y = p(!d.isExpand), e = p(null), l = p(!1), P = p(!1), T = p(!1), ue = x(() => {
|
|
314
|
+
const o = {};
|
|
315
|
+
return d.items.forEach((i) => {
|
|
316
|
+
if (i.required) {
|
|
317
|
+
const s = [{ required: !0, message: `${i.label}不能为空`, trigger: "blur" }];
|
|
318
|
+
typeof i.validator == "function" && s.push({ validator: i.validator, trigger: "blur" }), o[i.key] = s;
|
|
319
|
+
}
|
|
320
|
+
}), o;
|
|
321
|
+
}), z = x(() => d.items?.filter((o) => !o.hidden) || []), J = x(() => d.filterMode ? z.value?.slice(0, 2) || [] : z.value), S = x(() => d.filterMode ? z.value.slice(2) : []), Q = (o) => {
|
|
322
|
+
n.value = { ...o };
|
|
323
|
+
}, ie = () => {
|
|
324
|
+
v(f.updateModelValue, { ...n.value });
|
|
325
|
+
}, de = (o, i) => {
|
|
326
|
+
n.value[o] = i, T.value = !0, W(C.search), setTimeout(() => {
|
|
327
|
+
T.value = !1;
|
|
328
|
+
}, 200), R(o, i);
|
|
329
|
+
}, R = (o, i) => {
|
|
330
|
+
o && v(f.change, o, i);
|
|
331
|
+
}, se = () => n.value, j = (o, i) => {
|
|
332
|
+
T.value || v(f.operation, C.search, n.value);
|
|
333
|
+
}, W = (o) => {
|
|
334
|
+
ie(), v(f.operation, o, n.value), (o === C.search || o === C.reset) && (l.value = !1, P.value = !1);
|
|
335
|
+
}, fe = (o) => e.value.validate(o), A = p(0), me = (o) => {
|
|
336
|
+
A.value = o + 32;
|
|
337
|
+
}, ce = () => {
|
|
338
|
+
y.value = !y.value;
|
|
339
|
+
}, ye = () => {
|
|
340
|
+
l.value = !1, P.value = !0;
|
|
341
|
+
}, ve = () => {
|
|
342
|
+
P.value = !1, l.value = !0;
|
|
343
|
+
}, X = p(!1), Y = (o) => {
|
|
344
|
+
X.value = o > d.maxHeight;
|
|
345
|
+
}, he = x(() => d.filterMode || y.value ? "10px" : "0");
|
|
346
|
+
return ge(() => {
|
|
347
|
+
Q(d.modelValue), Y();
|
|
348
|
+
}), we(
|
|
349
|
+
() => d.modelValue,
|
|
350
|
+
(o) => {
|
|
351
|
+
Q(o);
|
|
352
|
+
},
|
|
353
|
+
{ immediate: !0, deep: !0 }
|
|
354
|
+
), L({
|
|
355
|
+
validate: fe,
|
|
356
|
+
getFormData: se,
|
|
357
|
+
// clearValidate,
|
|
358
|
+
// resetFields,
|
|
359
|
+
// scrollToField,
|
|
360
|
+
formRef: e
|
|
361
|
+
}), (o, i) => (u(), D("div", {
|
|
362
|
+
class: I(["relative overflow-hidden w-full", { flex: a.filterMode }])
|
|
363
|
+
}, [
|
|
364
|
+
w("div", {
|
|
365
|
+
class: I({
|
|
366
|
+
"is-collapsed overflow-hidden": !y.value
|
|
367
|
+
})
|
|
368
|
+
}, [
|
|
369
|
+
m(t(_), null, {
|
|
370
|
+
default: r(({ height: s }) => [
|
|
371
|
+
V(U(Y(s)) + " ", 1),
|
|
372
|
+
m(G, {
|
|
373
|
+
ref_key: "formRef",
|
|
374
|
+
ref: e,
|
|
375
|
+
items: J.value,
|
|
376
|
+
"form-data": n.value,
|
|
377
|
+
rules: ue.value,
|
|
378
|
+
"label-width": a.labelWidth,
|
|
379
|
+
"label-position": a.labelPosition,
|
|
380
|
+
inline: !0,
|
|
381
|
+
"show-label": !a.filterMode,
|
|
382
|
+
"min-width": a.minWidth,
|
|
383
|
+
"is-filter-preview": a.filterMode,
|
|
384
|
+
onChange: de,
|
|
385
|
+
onEnter: j
|
|
386
|
+
}, F({
|
|
387
|
+
default: r(() => [
|
|
388
|
+
a.isExpand && !a.filterMode ? (u(), c(t(oe), {
|
|
389
|
+
key: 0,
|
|
390
|
+
"label-width": "0"
|
|
391
|
+
}, {
|
|
392
|
+
default: r(() => [
|
|
393
|
+
w("div", Ae, [
|
|
394
|
+
m(t(_), null, {
|
|
395
|
+
default: r(({ width: k }) => [
|
|
396
|
+
V(U(me(k)), 1)
|
|
397
|
+
]),
|
|
398
|
+
_: 1
|
|
399
|
+
})
|
|
400
|
+
])
|
|
401
|
+
]),
|
|
402
|
+
_: 1
|
|
403
|
+
})) : N("", !0)
|
|
404
|
+
]),
|
|
405
|
+
_: 2
|
|
406
|
+
}, [
|
|
407
|
+
$(J.value, (k) => ({
|
|
408
|
+
name: k.key,
|
|
409
|
+
fn: r((pe) => [
|
|
410
|
+
b(o.$slots, k.key, H(K(pe)), void 0, !0)
|
|
411
|
+
])
|
|
412
|
+
}))
|
|
413
|
+
]), 1032, ["items", "form-data", "rules", "label-width", "label-position", "show-label", "min-width", "is-filter-preview"])
|
|
414
|
+
]),
|
|
415
|
+
_: 3
|
|
416
|
+
})
|
|
417
|
+
], 2),
|
|
418
|
+
w("div", {
|
|
419
|
+
class: I(["operation-buttons", {
|
|
420
|
+
"absolute right-0 bg-fff text-right": a.isExpand && !a.filterMode,
|
|
421
|
+
"text-left": a.filterMode
|
|
422
|
+
}]),
|
|
423
|
+
style: Ve({ bottom: he.value })
|
|
424
|
+
}, [
|
|
425
|
+
a.filterMode ? (u(), D(M, { key: 0 }, [
|
|
426
|
+
m(t(O), {
|
|
427
|
+
onClick: i[0] || (i[0] = (s) => W(t(C).reset)),
|
|
428
|
+
type: "default"
|
|
429
|
+
}, {
|
|
430
|
+
default: r(() => [...i[3] || (i[3] = [
|
|
431
|
+
V("重置", -1)
|
|
432
|
+
])]),
|
|
433
|
+
_: 1
|
|
434
|
+
}),
|
|
435
|
+
S.value?.length ? (u(), c(t(Le), {
|
|
436
|
+
key: 0,
|
|
437
|
+
visible: l.value,
|
|
438
|
+
placement: "bottom-start",
|
|
439
|
+
width: 628,
|
|
440
|
+
trigger: "click"
|
|
441
|
+
}, {
|
|
442
|
+
reference: r(() => [
|
|
443
|
+
m(t(O), {
|
|
444
|
+
onClick: i[1] || (i[1] = (s) => l.value = !l.value),
|
|
445
|
+
icon: t(We),
|
|
446
|
+
type: "default"
|
|
447
|
+
}, {
|
|
448
|
+
default: r(() => [...i[4] || (i[4] = [
|
|
449
|
+
V(" 筛选器 ", -1)
|
|
450
|
+
])]),
|
|
451
|
+
_: 1
|
|
452
|
+
}, 8, ["icon"])
|
|
453
|
+
]),
|
|
454
|
+
default: r(() => [
|
|
455
|
+
w("div", He, [
|
|
456
|
+
m(te, {
|
|
457
|
+
content: "筛选器",
|
|
458
|
+
fontSize: 16
|
|
459
|
+
}),
|
|
460
|
+
m(t(ee), {
|
|
461
|
+
size: 16,
|
|
462
|
+
onClick: ye
|
|
463
|
+
}, {
|
|
464
|
+
default: r(() => [
|
|
465
|
+
m(t(Se))
|
|
466
|
+
]),
|
|
467
|
+
_: 1
|
|
468
|
+
})
|
|
469
|
+
]),
|
|
470
|
+
m(G, {
|
|
471
|
+
items: S.value,
|
|
472
|
+
"form-data": n.value,
|
|
473
|
+
"label-width": "auto",
|
|
474
|
+
"label-position": "top",
|
|
475
|
+
inline: !1,
|
|
476
|
+
"show-label": !0,
|
|
477
|
+
"is-filter": !0,
|
|
478
|
+
"min-width": a.minWidth,
|
|
479
|
+
class: "filter-form-popover overflow-y-auto",
|
|
480
|
+
onChange: R,
|
|
481
|
+
onEnter: j
|
|
482
|
+
}, F({ _: 2 }, [
|
|
483
|
+
$(S.value, (s) => ({
|
|
484
|
+
name: s.key,
|
|
485
|
+
fn: r((k) => [
|
|
486
|
+
b(o.$slots, s.key, H(K(k)), void 0, !0)
|
|
487
|
+
])
|
|
488
|
+
}))
|
|
489
|
+
]), 1032, ["items", "form-data", "min-width"]),
|
|
490
|
+
w("div", Ke, [
|
|
491
|
+
m(q, {
|
|
492
|
+
"operation-list": a.operationList,
|
|
493
|
+
onOperation: W
|
|
494
|
+
}, F({ _: 2 }, [
|
|
495
|
+
o.$slots.operation ? {
|
|
496
|
+
name: "operation",
|
|
497
|
+
fn: r(({ operationList: s }) => [
|
|
498
|
+
b(o.$slots, "operation", { operationList: s }, void 0, !0)
|
|
499
|
+
]),
|
|
500
|
+
key: "0"
|
|
501
|
+
} : void 0
|
|
502
|
+
]), 1032, ["operation-list"])
|
|
503
|
+
])
|
|
504
|
+
]),
|
|
505
|
+
_: 3
|
|
506
|
+
}, 8, ["visible"])) : N("", !0)
|
|
507
|
+
], 64)) : (u(), D(M, { key: 1 }, [
|
|
508
|
+
X.value && a.isExpand ? (u(), c(t(O), {
|
|
509
|
+
key: 0,
|
|
510
|
+
icon: y.value ? t(Be) : t(Ie),
|
|
511
|
+
text: "",
|
|
512
|
+
onClick: ce
|
|
513
|
+
}, {
|
|
514
|
+
default: r(() => [
|
|
515
|
+
V(U(y.value ? "收起" : "展开"), 1)
|
|
516
|
+
]),
|
|
517
|
+
_: 1
|
|
518
|
+
}, 8, ["icon"])) : N("", !0),
|
|
519
|
+
m(q, {
|
|
520
|
+
"operation-list": a.operationList,
|
|
521
|
+
onOperation: W
|
|
522
|
+
}, F({ _: 2 }, [
|
|
523
|
+
o.$slots.operation ? {
|
|
524
|
+
name: "operation",
|
|
525
|
+
fn: r(({ operationList: s }) => [
|
|
526
|
+
b(o.$slots, "operation", { operationList: s }, void 0, !0)
|
|
527
|
+
]),
|
|
528
|
+
key: "0"
|
|
529
|
+
} : void 0
|
|
530
|
+
]), 1032, ["operation-list"])
|
|
531
|
+
], 64))
|
|
532
|
+
], 6),
|
|
533
|
+
m(t(Pe), {
|
|
534
|
+
modelValue: P.value,
|
|
535
|
+
"onUpdate:modelValue": i[2] || (i[2] = (s) => P.value = s),
|
|
536
|
+
size: "628",
|
|
537
|
+
"show-close": !1
|
|
538
|
+
}, {
|
|
539
|
+
header: r(() => [
|
|
540
|
+
w("div", qe, [
|
|
541
|
+
m(te, {
|
|
542
|
+
content: "筛选器",
|
|
543
|
+
fontSize: 16
|
|
544
|
+
}),
|
|
545
|
+
m(t(ee), {
|
|
546
|
+
size: 16,
|
|
547
|
+
onClick: ve,
|
|
548
|
+
class: "shrink-button"
|
|
549
|
+
}, {
|
|
550
|
+
default: r(() => [
|
|
551
|
+
m(t(Ne))
|
|
552
|
+
]),
|
|
553
|
+
_: 1
|
|
554
|
+
})
|
|
555
|
+
])
|
|
556
|
+
]),
|
|
557
|
+
default: r(() => [
|
|
558
|
+
w("div", Ge, [
|
|
559
|
+
m(G, {
|
|
560
|
+
items: S.value,
|
|
561
|
+
"form-data": n.value,
|
|
562
|
+
"label-width": "auto",
|
|
563
|
+
"label-position": "top",
|
|
564
|
+
inline: !1,
|
|
565
|
+
"show-label": !0,
|
|
566
|
+
"is-filter": !0,
|
|
567
|
+
"min-width": a.minWidth,
|
|
568
|
+
onChange: R,
|
|
569
|
+
onEnter: j
|
|
570
|
+
}, F({ _: 2 }, [
|
|
571
|
+
$(S.value, (s) => ({
|
|
572
|
+
name: s.key,
|
|
573
|
+
fn: r((k) => [
|
|
574
|
+
b(o.$slots, s.key, H(K(k)), void 0, !0)
|
|
575
|
+
])
|
|
576
|
+
}))
|
|
577
|
+
]), 1032, ["items", "form-data", "min-width"])
|
|
578
|
+
]),
|
|
579
|
+
w("div", Je, [
|
|
580
|
+
m(q, {
|
|
581
|
+
"operation-list": a.operationList,
|
|
582
|
+
onOperation: W
|
|
583
|
+
}, F({ _: 2 }, [
|
|
584
|
+
o.$slots.operation ? {
|
|
585
|
+
name: "operation",
|
|
586
|
+
fn: r(({ operationList: s }) => [
|
|
587
|
+
b(o.$slots, "operation", { operationList: s }, void 0, !0)
|
|
588
|
+
]),
|
|
589
|
+
key: "0"
|
|
590
|
+
} : void 0
|
|
591
|
+
]), 1032, ["operation-list"])
|
|
592
|
+
])
|
|
593
|
+
]),
|
|
594
|
+
_: 3
|
|
595
|
+
}, 8, ["modelValue"])
|
|
596
|
+
], 2));
|
|
597
|
+
}
|
|
598
|
+
}), oa = /* @__PURE__ */ ne(Qe, [["__scopeId", "data-v-663b89dc"]]);
|
|
599
|
+
export {
|
|
600
|
+
oa as S
|
|
601
|
+
};
|
package/lib/IconRenderer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./chunks/index.CkihWzK6.js"),e=require("vue"),s=require("element-plus"),a={lingyun:"lingyun",aibox:"aibox"},d=async(o,n)=>{if(!n)return null;try{switch(o){case a.lingyun:const{icons:r}=await Promise.resolve().then(()=>require("./chunks/global.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./chunks/index.CkihWzK6.js"),e=require("vue"),s=require("element-plus"),a={lingyun:"lingyun",aibox:"aibox"},d=async(o,n)=>{if(!n)return null;try{switch(o){case a.lingyun:const{icons:r}=await Promise.resolve().then(()=>require("./chunks/global.D0m66zzb.js"));return r[n]||null;case a.aibox:const{icons:t}=await Promise.resolve().then(()=>require("./chunks/global.DIPtiMPx.js"));return t[n]||null}}catch(r){return console.warn(`Failed to load icon ${n} from ${o} library:`,r),null}},m=Object.assign({name:"IconRenderer"},{__name:"layout",props:{iconName:{type:String,default:""},iconLibrary:{type:String,default:a.lingyun,validator:o=>Object.values(a).includes(o)},size:{type:Number,default:16},color:{type:String,default:""}},setup(o){const n=o,r=e.shallowRef(null),t=e.ref(!1),c=async()=>{if(!n.iconName){r.value=null;return}if(!t.value){t.value=!0;try{const l=await d(n.iconLibrary,n.iconName);r.value=l}catch(l){console.error("Failed to load icon component:",l),r.value=null}finally{t.value=!1}}};return e.watch(()=>[n.iconLibrary,n.iconName],()=>{c()},{immediate:!1}),e.onMounted(()=>{c()}),(l,y)=>o.iconName&&r.value?(e.openBlock(),e.createBlock(e.unref(s.ElIcon),e.mergeProps({key:0,size:o.size,color:o.color},l.$attrs),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value)))]),_:1},16,["size","color"])):e.createCommentVNode("",!0)}}),i=u.withInstall(m);exports.IconRenderer=i;exports.default=i;exports.iconLibraryMap=a;
|
package/lib/IconSelect.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/IconSelect.css');const g=require("./chunks/index.CkihWzK6.js"),e=require("vue"),c=require("element-plus"),f=require("color-message-lingyun-vue"),p=require("./chunks/global.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/IconSelect.css');const g=require("./chunks/index.CkihWzK6.js"),e=require("vue"),c=require("element-plus"),f=require("color-message-lingyun-vue"),p=require("./chunks/global.D0m66zzb.js"),h=require("./chunks/layout.B8d4J538.js"),v=require("ling-yun-methods"),w=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),_={class:"icon-select-content flex flex-col overflow-hidden"},b={class:"icon-select-grid overflow-y-auto display-grid"},B=["title","onClick"],I={key:0,class:"no-data"},C=Object.assign({name:"IconSelect"},{__name:"layout",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"请选择图标"},width:{type:Number,default:520},iconSize:{type:Number,default:62}},emits:[v.emitsMap.updateModelValue],setup(a,{emit:x}){const u=a,V=x,i=e.ref(!1),r=e.ref(""),n=e.ref(u.modelValue),d=e.computed(()=>Object.entries(p.icons).filter(([t])=>t.toLowerCase().includes("menu")).map(([t,o])=>({name:t,component:o}))),m=e.computed(()=>r.value?d.value.filter(t=>t.name.toLowerCase().includes(r.value.toLowerCase())):d.value),s=e.computed(()=>n.value&&p.icons[n.value]||null),y=t=>{n.value=t.name,V(v.emitsMap.updateModelValue,t.name),i.value=!1};return e.watch(()=>u.modelValue,t=>{n.value=t}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(c.ElPopover),{visible:i.value,"onUpdate:visible":o[1]||(o[1]=l=>i.value=l),placement:"bottom-start",width:a.width,trigger:"click"},{reference:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center pointer radius-16 justify-center w-icon-item",{"select-icon-box bg-fcfdff text-202434 fz-14 flex-col":!s.value,"icon-item":n.value}])},[s.value?(e.openBlock(),e.createBlock(e.unref(c.ElIcon),{key:0,size:a.iconSize},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1},8,["size"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(c.ElIcon),{size:16},{default:e.withCtx(()=>[e.createVNode(e.unref(f.IconAdd))]),_:1}),o[2]||(o[2]=e.createTextVNode(" 上传 ",-1))],64))],2)]),default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(e.unref(c.ElInput),{class:"mg-b-12",modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=l=>r.value=l),placeholder:"搜索图标","prefix-icon":e.unref(f.IconSearch),clearable:""},null,8,["modelValue","prefix-icon"]),e.createElementVNode("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.name,class:e.normalizeClass(["icon-item radius-8 justify-center items-center pointer flex w-icon-item",{active:n.value===l.name}]),title:l.name,onClick:N=>y(l)},[e.createVNode(e.unref(c.ElIcon),{size:50},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component)))]),_:2},1024)],10,B))),128))]),m.value.length===0?(e.openBlock(),e.createElementBlock("div",I,[e.createVNode(h.IconEmpty,{text:"未找到相关图标"})])):e.createCommentVNode("",!0)])]),_:1},8,["visible","width"]))}}),E=w._export_sfc(C,[["__scopeId","data-v-92e76646"]]),k=g.withInstall(E);exports.IconSelect=k;exports.default=k;
|
package/lib/SearchBar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./chunks/index.CkihWzK6.js"),t=require("./chunks/layout.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./chunks/index.CkihWzK6.js"),t=require("./chunks/layout.CTTLDiMA.js"),e=r.withInstall(t.SearchBar);exports.SearchBar=e;exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/UpdatePasswordDialog.css');const P=require("./chunks/index.CkihWzK6.js"),e=require("vue"),_=require("./chunks/layout.B9EVVV-O.js"),M=require("./chunks/layout.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./assets/UpdatePasswordDialog.css');const P=require("./chunks/index.CkihWzK6.js"),e=require("vue"),_=require("./chunks/layout.B9EVVV-O.js"),M=require("./chunks/layout.CTTLDiMA.js"),o=require("ling-yun-methods"),V=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),h=()=>{const u=e.ref({password:"",confirmPassword:""}),p=e.computed(()=>[{label:"请输入新密码",key:"password",type:o.componentType.text,placeholder:"请输入6-20位,需包含大小写字母、数字",wide:!0,required:!0,showPassword:!0,validator:d},{label:"请再次输入新密码",key:"confirmPassword",type:o.componentType.text,placeholder:"请输入6-20位,需包含大小写字母、数字",wide:!0,required:!0,showPassword:!0,validator:i}]),d=(l,s,t)=>{!s||!/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/.test(s)?t(new Error("请输入6-20位,需包含大小写字母、数字")):t()},i=(l,s,t)=>{s===""?t(new Error("两次密码不一致")):s!==u.value.password?t(new Error("两次密码不一致")):t()};return{formData:u,userFromItems:p}},x={__name:"layout",props:{modelValue:{type:Boolean,default:!1},nowUserData:{type:Object,default:()=>{}},apiConfig:{type:Object,default:()=>{}}},emits:[o.emitsMap.updateModelValue,o.emitsMap.change],setup(u,{emit:p}){const d=u,i=p,l=e.computed({get:()=>d.modelValue,set:r=>i(o.emitsMap.updateModelValue,r)}),s=e.ref(null),{formData:t,userFromItems:y}=h(),g=async()=>{const r=await d.apiConfig.getSecretKeyApi();if(r.code!==o.codeMap.success)return{};const{key:a,iv:n,keyId:c}=r.data,{password:f}=s.value.getFormData(),m=o.AESCrypto.encrypt(f,a,n);return{keyId:c,encryptedPassword:m}},v=async()=>{let r=!1;return await s.value.validate(async a=>{if(!a)return;const{keyId:n,encryptedPassword:c}=await g();if(!n||!c)return;const f={userId:d.nowUserData.id,newPassword:c,aesKeyId:n};(await d.apiConfig.updatePasswordApi(f)).code===o.codeMap.success&&(o.messageSuccess("修改成功"),l.value=!1,r=!0,i(o.emitsMap.change))}),r};return(r,a)=>(e.openBlock(),e.createBlock(_.CustomDialog,{modelValue:l.value,"onUpdate:modelValue":a[1]||(a[1]=n=>l.value=n),title:"修改密码",buttons:{confirmText:"确定",onConfirm:v},top:"30vh",width:"568px","destroy-on-close":""},{default:e.withCtx(()=>[e.createVNode(M.SearchBar,{modelValue:e.unref(t),"onUpdate:modelValue":a[0]||(a[0]=n=>e.isRef(t)?t.value=n:null),ref_key:"formRef",ref:s,items:e.unref(y),isExpand:!1,operationList:[],filterMode:!1,labelPosition:"top"},null,8,["modelValue","items"])]),_:1},8,["modelValue","buttons"]))}},b=V._export_sfc(x,[["__scopeId","data-v-0088227a"]]),w=P.withInstall(b);exports.UpdatePasswordDialog=w;exports.default=w;
|
package/lib/assets/layout3.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.filter-form[data-v-
|
|
1
|
+
.filter-form[data-v-125bfab7]{grid-template-columns:repeat(2,1fr);gap:10px}.filter-preview-form[data-v-125bfab7]{display:flex}.filter-preview-form .el-form-item[data-v-125bfab7]{width:var(--v4b15a536);margin-right:10px}.search-bar-form[data-v-125bfab7]{grid-template-columns:repeat(auto-fit,minmax(var(--v4b15a536),1fr));gap:10px}.search-bar-form.el-form--inline .el-form-item[data-v-125bfab7]{margin-right:0;margin-bottom:10px}.search-bar-form.el-form--inline .el-form-item.el-form-item--label-left[data-v-125bfab7]{display:flex;padding:0 14px;background:var(--neutral-color-18);border-radius:8px;border:1px solid var(--parting-line)}.search-bar-form.el-form--inline .el-form-item.el-form-item--label-left[data-v-125bfab7] .el-form-item__content{justify-content:end}.search-bar-form.el-form--inline.el-form--label-top[data-v-125bfab7]{display:grid}.search-bar-item--wide[data-v-125bfab7]{grid-column:span 2}.is-collapsed[data-v-663b89dc]{max-height:var(--v6f32bb87)}.operation-buttons[data-v-663b89dc]{width:var(--v8603bafe);z-index:1}.h-32[data-v-663b89dc]{height:32px}.drawer-header[data-v-663b89dc]{display:flex;justify-content:space-between;align-items:center;width:100%}.drawer-header .shrink-button[data-v-663b89dc]{margin-left:auto}.border-top[data-v-663b89dc]{border-top:1px solid var(--parting-line)}[data-v-663b89dc] .el-drawer__body{padding:16px 0;display:flex;flex-direction:column;overflow:hidden}.filter-form-popover[data-v-663b89dc]{max-height:400px}[data-v-663b89dc] .el-drawer__header{margin-bottom:0;padding:16px 16px 0}
|