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