ling-yun-custom-components 0.0.51 → 0.0.52
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.BgLic7kd.js +600 -0
- package/lib/SearchBar.js +1 -1
- package/lib/UpdatePasswordDialog.js +1 -1
- package/lib/assets/layout3.css +1 -1
- package/lib/chunks/layout.Bn_I4pI8.js +1 -0
- package/package.json +4 -3
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.BgLic7kd.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-b5708f35]{grid-template-columns:repeat(2,1fr);gap:10px}.filter-preview-form[data-v-b5708f35]{display:flex}.filter-preview-form .el-form-item[data-v-b5708f35]{width:var(--v65f9c9b2);margin-right:10px}.search-bar-form[data-v-b5708f35]{grid-template-columns:repeat(auto-fit,minmax(var(--v65f9c9b2),1fr));gap:10px}.search-bar-form.el-form--inline .el-form-item[data-v-b5708f35]{margin-right:0;margin-bottom:10px}.search-bar-form.el-form--inline .el-form-item.el-form-item--label-left[data-v-b5708f35]{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-b5708f35] .el-form-item__content{justify-content:end}.search-bar-form.el-form--inline.el-form--label-top[data-v-b5708f35]{display:grid}.search-bar-item--wide[data-v-b5708f35]{grid-column:span 2}.is-collapsed[data-v-
|
|
1
|
+
.filter-form[data-v-b5708f35]{grid-template-columns:repeat(2,1fr);gap:10px}.filter-preview-form[data-v-b5708f35]{display:flex}.filter-preview-form .el-form-item[data-v-b5708f35]{width:var(--v65f9c9b2);margin-right:10px}.search-bar-form[data-v-b5708f35]{grid-template-columns:repeat(auto-fit,minmax(var(--v65f9c9b2),1fr));gap:10px}.search-bar-form.el-form--inline .el-form-item[data-v-b5708f35]{margin-right:0;margin-bottom:10px}.search-bar-form.el-form--inline .el-form-item.el-form-item--label-left[data-v-b5708f35]{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-b5708f35] .el-form-item__content{justify-content:end}.search-bar-form.el-form--inline.el-form--label-top[data-v-b5708f35]{display:grid}.search-bar-item--wide[data-v-b5708f35]{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}
|
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
import { renderSlot as k, 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 ke, normalizeClass as I, mergeProps as g, createCommentVNode as N, withKeys as be, 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 ? k(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
|
+
v65f9c9b2: 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] = ke(() => {
|
|
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
|
+
k(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: be((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
|
+
}, {
|
|
226
|
+
default: r(() => [
|
|
227
|
+
V(U(l.label), 1)
|
|
228
|
+
]),
|
|
229
|
+
_: 2
|
|
230
|
+
}, 1032, ["label", "value"]))), 128))
|
|
231
|
+
]),
|
|
232
|
+
_: 2
|
|
233
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).textarea ? (u(), c(t(Z), g({
|
|
234
|
+
key: 7,
|
|
235
|
+
modelValue: a.formData[e.key],
|
|
236
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
237
|
+
}, { ref_for: !0 }, e, {
|
|
238
|
+
class: "w-full",
|
|
239
|
+
type: "textarea",
|
|
240
|
+
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
241
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).upload ? (u(), c(ze, g({
|
|
242
|
+
key: 8,
|
|
243
|
+
modelValue: a.formData[e.key],
|
|
244
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
245
|
+
}, { ref_for: !0 }, e), null, 16, ["modelValue", "onUpdate:modelValue"])) : N("", !0)
|
|
246
|
+
], !0)
|
|
247
|
+
]),
|
|
248
|
+
_: 2
|
|
249
|
+
}, 1040, ["label", "prop", "show-label", "class"]))), 128)),
|
|
250
|
+
k(n.$slots, "default", {}, void 0, !0)
|
|
251
|
+
]),
|
|
252
|
+
_: 3
|
|
253
|
+
}, 8, ["model", "label-width", "label-position", "inline", "rules", "class"]));
|
|
254
|
+
}
|
|
255
|
+
}), G = /* @__PURE__ */ ne(je, [["__scopeId", "data-v-b5708f35"]]), 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({
|
|
256
|
+
name: "SearchBar"
|
|
257
|
+
}, {
|
|
258
|
+
__name: "layout",
|
|
259
|
+
props: {
|
|
260
|
+
// 搜索项配置
|
|
261
|
+
items: {
|
|
262
|
+
type: Array,
|
|
263
|
+
default: () => []
|
|
264
|
+
},
|
|
265
|
+
// 初始值
|
|
266
|
+
modelValue: {
|
|
267
|
+
type: Object,
|
|
268
|
+
default: () => ({})
|
|
269
|
+
},
|
|
270
|
+
// 标签宽度
|
|
271
|
+
labelWidth: {
|
|
272
|
+
type: [String, Number],
|
|
273
|
+
default: "auto"
|
|
274
|
+
},
|
|
275
|
+
// 标签位置
|
|
276
|
+
labelPosition: {
|
|
277
|
+
type: String,
|
|
278
|
+
default: B.right,
|
|
279
|
+
validator: (a) => [B.left, B.right, B.top].includes(a)
|
|
280
|
+
},
|
|
281
|
+
// 是否可以展开
|
|
282
|
+
isExpand: {
|
|
283
|
+
type: Boolean,
|
|
284
|
+
default: !0
|
|
285
|
+
},
|
|
286
|
+
// 最大的高度
|
|
287
|
+
maxHeight: {
|
|
288
|
+
type: Number,
|
|
289
|
+
default: 84
|
|
290
|
+
},
|
|
291
|
+
// 每项最小宽度
|
|
292
|
+
minWidth: {
|
|
293
|
+
type: Number,
|
|
294
|
+
default: re
|
|
295
|
+
},
|
|
296
|
+
operationList: {
|
|
297
|
+
type: Array,
|
|
298
|
+
default: Re
|
|
299
|
+
},
|
|
300
|
+
// 是否为筛选器模式
|
|
301
|
+
filterMode: {
|
|
302
|
+
type: Boolean,
|
|
303
|
+
default: !0
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
emits: [f.updateModelValue, f.operation, f.change],
|
|
307
|
+
setup(a, { expose: L, emit: E }) {
|
|
308
|
+
le((o) => ({
|
|
309
|
+
v6f32bb87: a.maxHeight + "px",
|
|
310
|
+
v8603bafe: A.value ? A.value + "px" : "100%"
|
|
311
|
+
}));
|
|
312
|
+
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(() => {
|
|
313
|
+
const o = {};
|
|
314
|
+
return d.items.forEach((i) => {
|
|
315
|
+
if (i.required) {
|
|
316
|
+
const s = [{ required: !0, message: `${i.label}不能为空`, trigger: "blur" }];
|
|
317
|
+
typeof i.validator == "function" && s.push({ validator: i.validator, trigger: "blur" }), o[i.key] = s;
|
|
318
|
+
}
|
|
319
|
+
}), o;
|
|
320
|
+
}), 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) => {
|
|
321
|
+
n.value = { ...o };
|
|
322
|
+
}, ie = () => {
|
|
323
|
+
v(f.updateModelValue, { ...n.value });
|
|
324
|
+
}, de = (o, i) => {
|
|
325
|
+
n.value[o] = i, T.value = !0, W(C.search), setTimeout(() => {
|
|
326
|
+
T.value = !1;
|
|
327
|
+
}, 200), R(o, i);
|
|
328
|
+
}, R = (o, i) => {
|
|
329
|
+
o && v(f.change, o, i);
|
|
330
|
+
}, se = () => n.value, j = (o, i) => {
|
|
331
|
+
T.value || v(f.operation, C.search, n.value);
|
|
332
|
+
}, W = (o) => {
|
|
333
|
+
ie(), v(f.operation, o, n.value), (o === C.search || o === C.reset) && (l.value = !1, P.value = !1);
|
|
334
|
+
}, fe = (o) => e.value.validate(o), A = p(0), me = (o) => {
|
|
335
|
+
A.value = o + 32;
|
|
336
|
+
}, ce = () => {
|
|
337
|
+
y.value = !y.value;
|
|
338
|
+
}, ye = () => {
|
|
339
|
+
l.value = !1, P.value = !0;
|
|
340
|
+
}, ve = () => {
|
|
341
|
+
P.value = !1, l.value = !0;
|
|
342
|
+
}, X = p(!1), Y = (o) => {
|
|
343
|
+
X.value = o > d.maxHeight;
|
|
344
|
+
}, he = x(() => d.filterMode || y.value ? "10px" : "0");
|
|
345
|
+
return ge(() => {
|
|
346
|
+
Q(d.modelValue), Y();
|
|
347
|
+
}), we(
|
|
348
|
+
() => d.modelValue,
|
|
349
|
+
(o) => {
|
|
350
|
+
Q(o);
|
|
351
|
+
},
|
|
352
|
+
{ immediate: !0, deep: !0 }
|
|
353
|
+
), L({
|
|
354
|
+
validate: fe,
|
|
355
|
+
getFormData: se,
|
|
356
|
+
// clearValidate,
|
|
357
|
+
// resetFields,
|
|
358
|
+
// scrollToField,
|
|
359
|
+
formRef: e
|
|
360
|
+
}), (o, i) => (u(), D("div", {
|
|
361
|
+
class: I(["relative overflow-hidden w-full", { flex: a.filterMode }])
|
|
362
|
+
}, [
|
|
363
|
+
w("div", {
|
|
364
|
+
class: I({
|
|
365
|
+
"is-collapsed overflow-hidden": !y.value
|
|
366
|
+
})
|
|
367
|
+
}, [
|
|
368
|
+
m(t(_), null, {
|
|
369
|
+
default: r(({ height: s }) => [
|
|
370
|
+
V(U(Y(s)) + " ", 1),
|
|
371
|
+
m(G, {
|
|
372
|
+
ref_key: "formRef",
|
|
373
|
+
ref: e,
|
|
374
|
+
items: J.value,
|
|
375
|
+
"form-data": n.value,
|
|
376
|
+
rules: ue.value,
|
|
377
|
+
"label-width": a.labelWidth,
|
|
378
|
+
"label-position": a.labelPosition,
|
|
379
|
+
inline: !0,
|
|
380
|
+
"show-label": !a.filterMode,
|
|
381
|
+
"min-width": a.minWidth,
|
|
382
|
+
"is-filter-preview": a.filterMode,
|
|
383
|
+
onChange: de,
|
|
384
|
+
onEnter: j
|
|
385
|
+
}, F({
|
|
386
|
+
default: r(() => [
|
|
387
|
+
a.isExpand && !a.filterMode ? (u(), c(t(oe), {
|
|
388
|
+
key: 0,
|
|
389
|
+
"label-width": "0"
|
|
390
|
+
}, {
|
|
391
|
+
default: r(() => [
|
|
392
|
+
w("div", Ae, [
|
|
393
|
+
m(t(_), null, {
|
|
394
|
+
default: r(({ width: b }) => [
|
|
395
|
+
V(U(me(b)), 1)
|
|
396
|
+
]),
|
|
397
|
+
_: 1
|
|
398
|
+
})
|
|
399
|
+
])
|
|
400
|
+
]),
|
|
401
|
+
_: 1
|
|
402
|
+
})) : N("", !0)
|
|
403
|
+
]),
|
|
404
|
+
_: 2
|
|
405
|
+
}, [
|
|
406
|
+
$(J.value, (b) => ({
|
|
407
|
+
name: b.key,
|
|
408
|
+
fn: r((pe) => [
|
|
409
|
+
k(o.$slots, b.key, H(K(pe)), void 0, !0)
|
|
410
|
+
])
|
|
411
|
+
}))
|
|
412
|
+
]), 1032, ["items", "form-data", "rules", "label-width", "label-position", "show-label", "min-width", "is-filter-preview"])
|
|
413
|
+
]),
|
|
414
|
+
_: 3
|
|
415
|
+
})
|
|
416
|
+
], 2),
|
|
417
|
+
w("div", {
|
|
418
|
+
class: I(["operation-buttons", {
|
|
419
|
+
"absolute right-0 bg-fff text-right": a.isExpand && !a.filterMode,
|
|
420
|
+
"text-left": a.filterMode
|
|
421
|
+
}]),
|
|
422
|
+
style: Ve({ bottom: he.value })
|
|
423
|
+
}, [
|
|
424
|
+
a.filterMode ? (u(), D(M, { key: 0 }, [
|
|
425
|
+
m(t(O), {
|
|
426
|
+
onClick: i[0] || (i[0] = (s) => W(t(C).reset)),
|
|
427
|
+
type: "default"
|
|
428
|
+
}, {
|
|
429
|
+
default: r(() => [...i[3] || (i[3] = [
|
|
430
|
+
V("重置", -1)
|
|
431
|
+
])]),
|
|
432
|
+
_: 1
|
|
433
|
+
}),
|
|
434
|
+
S.value?.length ? (u(), c(t(Le), {
|
|
435
|
+
key: 0,
|
|
436
|
+
visible: l.value,
|
|
437
|
+
placement: "bottom-start",
|
|
438
|
+
width: 628,
|
|
439
|
+
trigger: "click"
|
|
440
|
+
}, {
|
|
441
|
+
reference: r(() => [
|
|
442
|
+
m(t(O), {
|
|
443
|
+
onClick: i[1] || (i[1] = (s) => l.value = !l.value),
|
|
444
|
+
icon: t(We),
|
|
445
|
+
type: "default"
|
|
446
|
+
}, {
|
|
447
|
+
default: r(() => [...i[4] || (i[4] = [
|
|
448
|
+
V(" 筛选器 ", -1)
|
|
449
|
+
])]),
|
|
450
|
+
_: 1
|
|
451
|
+
}, 8, ["icon"])
|
|
452
|
+
]),
|
|
453
|
+
default: r(() => [
|
|
454
|
+
w("div", He, [
|
|
455
|
+
m(te, {
|
|
456
|
+
content: "筛选器",
|
|
457
|
+
fontSize: 16
|
|
458
|
+
}),
|
|
459
|
+
m(t(ee), {
|
|
460
|
+
size: 16,
|
|
461
|
+
onClick: ye
|
|
462
|
+
}, {
|
|
463
|
+
default: r(() => [
|
|
464
|
+
m(t(Se))
|
|
465
|
+
]),
|
|
466
|
+
_: 1
|
|
467
|
+
})
|
|
468
|
+
]),
|
|
469
|
+
m(G, {
|
|
470
|
+
items: S.value,
|
|
471
|
+
"form-data": n.value,
|
|
472
|
+
"label-width": "auto",
|
|
473
|
+
"label-position": "top",
|
|
474
|
+
inline: !1,
|
|
475
|
+
"show-label": !0,
|
|
476
|
+
"is-filter": !0,
|
|
477
|
+
"min-width": a.minWidth,
|
|
478
|
+
class: "filter-form-popover overflow-y-auto",
|
|
479
|
+
onChange: R,
|
|
480
|
+
onEnter: j
|
|
481
|
+
}, F({ _: 2 }, [
|
|
482
|
+
$(S.value, (s) => ({
|
|
483
|
+
name: s.key,
|
|
484
|
+
fn: r((b) => [
|
|
485
|
+
k(o.$slots, s.key, H(K(b)), void 0, !0)
|
|
486
|
+
])
|
|
487
|
+
}))
|
|
488
|
+
]), 1032, ["items", "form-data", "min-width"]),
|
|
489
|
+
w("div", Ke, [
|
|
490
|
+
m(q, {
|
|
491
|
+
"operation-list": a.operationList,
|
|
492
|
+
onOperation: W
|
|
493
|
+
}, F({ _: 2 }, [
|
|
494
|
+
o.$slots.operation ? {
|
|
495
|
+
name: "operation",
|
|
496
|
+
fn: r(({ operationList: s }) => [
|
|
497
|
+
k(o.$slots, "operation", { operationList: s }, void 0, !0)
|
|
498
|
+
]),
|
|
499
|
+
key: "0"
|
|
500
|
+
} : void 0
|
|
501
|
+
]), 1032, ["operation-list"])
|
|
502
|
+
])
|
|
503
|
+
]),
|
|
504
|
+
_: 3
|
|
505
|
+
}, 8, ["visible"])) : N("", !0)
|
|
506
|
+
], 64)) : (u(), D(M, { key: 1 }, [
|
|
507
|
+
X.value && a.isExpand ? (u(), c(t(O), {
|
|
508
|
+
key: 0,
|
|
509
|
+
icon: y.value ? t(Be) : t(Ie),
|
|
510
|
+
text: "",
|
|
511
|
+
onClick: ce
|
|
512
|
+
}, {
|
|
513
|
+
default: r(() => [
|
|
514
|
+
V(U(y.value ? "收起" : "展开"), 1)
|
|
515
|
+
]),
|
|
516
|
+
_: 1
|
|
517
|
+
}, 8, ["icon"])) : N("", !0),
|
|
518
|
+
m(q, {
|
|
519
|
+
"operation-list": a.operationList,
|
|
520
|
+
onOperation: W
|
|
521
|
+
}, F({ _: 2 }, [
|
|
522
|
+
o.$slots.operation ? {
|
|
523
|
+
name: "operation",
|
|
524
|
+
fn: r(({ operationList: s }) => [
|
|
525
|
+
k(o.$slots, "operation", { operationList: s }, void 0, !0)
|
|
526
|
+
]),
|
|
527
|
+
key: "0"
|
|
528
|
+
} : void 0
|
|
529
|
+
]), 1032, ["operation-list"])
|
|
530
|
+
], 64))
|
|
531
|
+
], 6),
|
|
532
|
+
m(t(Pe), {
|
|
533
|
+
modelValue: P.value,
|
|
534
|
+
"onUpdate:modelValue": i[2] || (i[2] = (s) => P.value = s),
|
|
535
|
+
size: "628",
|
|
536
|
+
"show-close": !1
|
|
537
|
+
}, {
|
|
538
|
+
header: r(() => [
|
|
539
|
+
w("div", qe, [
|
|
540
|
+
m(te, {
|
|
541
|
+
content: "筛选器",
|
|
542
|
+
fontSize: 16
|
|
543
|
+
}),
|
|
544
|
+
m(t(ee), {
|
|
545
|
+
size: 16,
|
|
546
|
+
onClick: ve,
|
|
547
|
+
class: "shrink-button"
|
|
548
|
+
}, {
|
|
549
|
+
default: r(() => [
|
|
550
|
+
m(t(Ne))
|
|
551
|
+
]),
|
|
552
|
+
_: 1
|
|
553
|
+
})
|
|
554
|
+
])
|
|
555
|
+
]),
|
|
556
|
+
default: r(() => [
|
|
557
|
+
w("div", Ge, [
|
|
558
|
+
m(G, {
|
|
559
|
+
items: S.value,
|
|
560
|
+
"form-data": n.value,
|
|
561
|
+
"label-width": "auto",
|
|
562
|
+
"label-position": "top",
|
|
563
|
+
inline: !1,
|
|
564
|
+
"show-label": !0,
|
|
565
|
+
"is-filter": !0,
|
|
566
|
+
"min-width": a.minWidth,
|
|
567
|
+
onChange: R,
|
|
568
|
+
onEnter: j
|
|
569
|
+
}, F({ _: 2 }, [
|
|
570
|
+
$(S.value, (s) => ({
|
|
571
|
+
name: s.key,
|
|
572
|
+
fn: r((b) => [
|
|
573
|
+
k(o.$slots, s.key, H(K(b)), void 0, !0)
|
|
574
|
+
])
|
|
575
|
+
}))
|
|
576
|
+
]), 1032, ["items", "form-data", "min-width"])
|
|
577
|
+
]),
|
|
578
|
+
w("div", Je, [
|
|
579
|
+
m(q, {
|
|
580
|
+
"operation-list": a.operationList,
|
|
581
|
+
onOperation: W
|
|
582
|
+
}, F({ _: 2 }, [
|
|
583
|
+
o.$slots.operation ? {
|
|
584
|
+
name: "operation",
|
|
585
|
+
fn: r(({ operationList: s }) => [
|
|
586
|
+
k(o.$slots, "operation", { operationList: s }, void 0, !0)
|
|
587
|
+
]),
|
|
588
|
+
key: "0"
|
|
589
|
+
} : void 0
|
|
590
|
+
]), 1032, ["operation-list"])
|
|
591
|
+
])
|
|
592
|
+
]),
|
|
593
|
+
_: 3
|
|
594
|
+
}, 8, ["modelValue"])
|
|
595
|
+
], 2));
|
|
596
|
+
}
|
|
597
|
+
}), oa = /* @__PURE__ */ ne(Qe, [["__scopeId", "data-v-663b89dc"]]);
|
|
598
|
+
export {
|
|
599
|
+
oa as S
|
|
600
|
+
};
|
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.Bn_I4pI8.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.Bn_I4pI8.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-b5708f35]{grid-template-columns:repeat(2,1fr);gap:10px}.filter-preview-form[data-v-b5708f35]{display:flex}.filter-preview-form .el-form-item[data-v-b5708f35]{width:var(--v65f9c9b2);margin-right:10px}.search-bar-form[data-v-b5708f35]{grid-template-columns:repeat(auto-fit,minmax(var(--v65f9c9b2),1fr));gap:10px}.search-bar-form.el-form--inline .el-form-item[data-v-b5708f35]{margin-right:0;margin-bottom:10px}.search-bar-form.el-form--inline .el-form-item.el-form-item--label-left[data-v-b5708f35]{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-b5708f35] .el-form-item__content{justify-content:end}.search-bar-form.el-form--inline.el-form--label-top[data-v-b5708f35]{display:grid}.search-bar-item--wide[data-v-b5708f35]{grid-column:span 2}.is-collapsed[data-v-
|
|
1
|
+
.filter-form[data-v-b5708f35]{grid-template-columns:repeat(2,1fr);gap:10px}.filter-preview-form[data-v-b5708f35]{display:flex}.filter-preview-form .el-form-item[data-v-b5708f35]{width:var(--v65f9c9b2);margin-right:10px}.search-bar-form[data-v-b5708f35]{grid-template-columns:repeat(auto-fit,minmax(var(--v65f9c9b2),1fr));gap:10px}.search-bar-form.el-form--inline .el-form-item[data-v-b5708f35]{margin-right:0;margin-bottom:10px}.search-bar-form.el-form--inline .el-form-item.el-form-item--label-left[data-v-b5708f35]{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-b5708f35] .el-form-item__content{justify-content:end}.search-bar-form.el-form--inline.el-form--label-top[data-v-b5708f35]{display:grid}.search-bar-item--wide[data-v-b5708f35]{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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require('../assets/layout3.css');const e=require("vue"),u=require("element-plus"),g=require("color-message-lingyun-vue"),o=require("ling-yun-methods"),H=require("./layout.BQdjwrgQ.js"),K=require("./layout.CciuUKii.js"),P=require("./_plugin-vue_export-helper.BHFhmbuH.js"),S=require("./layout.B-T_NE6r.js"),G=[{type:"primary",label:"查询",value:o.operationConfigMap.search},{type:"default",label:"重置",value:o.operationConfigMap.reset}],F=320,x={__name:"OperationButtons",props:{operationList:{type:Array,default:()=>[]}},emits:[o.emitsMap.operation],setup(a,{emit:y}){const p=y,d=c=>{p(o.emitsMap.operation,c)};return(c,n)=>c.$slots.operation?e.renderSlot(c.$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:t=>d(f.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.label),1)]),_:2},1032,["type","icon","onClick"]))),128))}},Y=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:o.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:F}},emits:[o.emitsMap.change,o.emitsMap.enter],setup(a,{expose:y}){e.useCssVars(n=>({v65f9c9b2:a.minWidth+"px"}));const p=a,d=e.ref(null),c=e.computed(()=>p.isFilter?"filter-form":p.isFilterPreview?"filter-preview-form":"search-bar-form");return y({validate:n=>d.value?d.value.validate(n):Promise.resolve(!0),resetFields:()=>{d.value&&d.value.resetFields()},clearValidate:n=>{d.value&&d.value.clearValidate(n)},scrollToField:n=>{d.value&&d.value.scrollToField(n)}}),(n,f)=>(e.openBlock(),e.createBlock(e.unref(u.ElForm),{ref_key:"formRef",ref:d,model:a.formData,"label-width":a.labelWidth,"label-position":a.labelPosition,inline:a.inline,rules:a.rules,class:e.normalizeClass({[c.value]:!0,"items-end display-grid":!a.isFilterPreview}),onSubmit:f[0]||(f[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(o.componentType).text?(e.openBlock(),e.createBlock(e.unref(u.ElInput),e.mergeProps({key:0,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{class:"w-full",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key]),onKeyup:e.withKeys(l=>n.$emit(e.unref(o.emitsMap).enter,t.key,a.formData[t.key]),["enter"])}),null,16,["modelValue","onUpdate:modelValue","onChange","onKeyup"])):t.type===e.unref(o.componentType).select?(e.openBlock(),e.createBlock(H._sfc_main,e.mergeProps({key:1,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l,"static-options":t.options},{ref_for:!0},t,{onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key]),class:"w-full"}),null,16,["modelValue","onUpdate:modelValue","static-options","onChange"])):t.type===e.unref(o.componentType).date?(e.openBlock(),e.createBlock(e.unref(u.ElDatePicker),e.mergeProps({key:2,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},{...t,...e.unref(o.dateParamsMap)[t.dateType]},{type:t.dateType,format:t.format||e.unref(o.dateFormat).date,"value-format":t.valueFormat||e.unref(o.dateFormat).dateTime,class:"w-full",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","type","format","value-format","onChange"])):t.type===e.unref(o.componentType).inputNumber?(e.openBlock(),e.createBlock(e.unref(u.ElInputNumber),e.mergeProps({key:3,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{class:"w-full",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).switch?(e.openBlock(),e.createBlock(e.unref(u.ElSwitch),e.mergeProps({key:4,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).radio?(e.openBlock(),e.createBlock(e.unref(u.ElRadioGroup),{key:5,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l,onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(e.unref(u.ElRadio),{key:l.value,label:l.value,value:l.value,disabled:l.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["label","value","disabled"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).checkbox?(e.openBlock(),e.createBlock(e.unref(u.ElCheckboxGroup),{key:6,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l,onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,l=>(e.openBlock(),e.createBlock(e.unref(u.ElCheckbox),{key:l.value,label:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).textarea?(e.openBlock(),e.createBlock(e.unref(u.ElInput),e.mergeProps({key:7,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{ref_for:!0},t,{class:"w-full",type:"textarea",onChange:l=>n.$emit(e.unref(o.emitsMap).change,t.key,a.formData[t.key])}),null,16,["modelValue","onUpdate:modelValue","onChange"])):t.type===e.unref(o.componentType).upload?(e.openBlock(),e.createBlock(K._layout,e.mergeProps({key:8,modelValue:a.formData[t.key],"onUpdate:modelValue":l=>a.formData[t.key]=l},{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"]))}}),E=P._export_sfc(Y,[["__scopeId","data-v-b5708f35"]]),J={class:"h-32 w-full"},Q={class:"flex items-center justify-between pd-b-20"},X={class:"text-right"},Z={class:"drawer-header"},_={class:"flex-1 pd-l-16 pd-r-16 overflow-y-auto"},ee={class:"text-right border-top pd-t-16 pd-l-16 pd-r-16"},te=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:o.labelPositionMap.right,validator:a=>[o.labelPositionMap.left,o.labelPositionMap.right,o.labelPositionMap.top].includes(a)},isExpand:{type:Boolean,default:!0},maxHeight:{type:Number,default:84},minWidth:{type:Number,default:F},operationList:{type:Array,default:G},filterMode:{type:Boolean,default:!0}},emits:[o.emitsMap.updateModelValue,o.emitsMap.operation,o.emitsMap.change],setup(a,{expose:y,emit:p}){e.useCssVars(r=>({v6f32bb87:a.maxHeight+"px",v8603bafe:B.value?B.value+"px":"100%"}));const d=a,c=p,n=e.ref({}),f=e.ref(!d.isExpand),t=e.ref(null),l=e.ref(!1),h=e.ref(!1),b=e.ref(!1),T=e.computed(()=>{const r={};return d.items.forEach(i=>{if(i.required){const s=[{required:!0,message:`${i.label}不能为空`,trigger:"blur"}];typeof i.validator=="function"&&s.push({validator:i.validator,trigger:"blur"}),r[i.key]=s}}),r}),V=e.computed(()=>d.items?.filter(r=>!r.hidden)||[]),M=e.computed(()=>d.filterMode?V.value?.slice(0,2)||[]:V.value),k=e.computed(()=>d.filterMode?V.value.slice(2):[]),D=r=>{n.value={...r}},L=()=>{c(o.emitsMap.updateModelValue,{...n.value})},U=(r,i)=>{n.value[r]=i,b.value=!0,v(o.operationConfigMap.search),setTimeout(()=>{b.value=!1},200),w(r,i)},w=(r,i)=>{r&&c(o.emitsMap.change,r,i)},I=()=>n.value,C=(r,i)=>{b.value||c(o.emitsMap.operation,o.operationConfigMap.search,n.value)},v=r=>{L(),c(o.emitsMap.operation,r,n.value),(r===o.operationConfigMap.search||r===o.operationConfigMap.reset)&&(l.value=!1,h.value=!1)},W=r=>t.value.validate(r),B=e.ref(0),z=r=>{B.value=r+32},R=()=>{f.value=!f.value},O=()=>{l.value=!1,h.value=!0},q=()=>{h.value=!1,l.value=!0},N=e.ref(!1),$=r=>{N.value=r>d.maxHeight},j=e.computed(()=>d.filterMode||f.value?"10px":"0");return e.onMounted(()=>{D(d.modelValue),$()}),e.watch(()=>d.modelValue,r=>{D(r)},{immediate:!0,deep:!0}),y({validate:W,getFormData:I,formRef:t}),(r,i)=>(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:s})=>[e.createTextVNode(e.toDisplayString($(s))+" ",1),e.createVNode(E,{ref_key:"formRef",ref:t,items:M.value,"form-data":n.value,rules:T.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:U,onEnter:C},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",J,[e.createVNode(e.unref(u.ElAutoResizer),null,{default:e.withCtx(({width:m})=>[e.createTextVNode(e.toDisplayString(z(m)),1)]),_:1})])]),_:1})):e.createCommentVNode("",!0)]),_:2},[e.renderList(M.value,m=>({name:m.key,fn:e.withCtx(A=>[e.renderSlot(r.$slots,m.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:j.value})},[a.filterMode?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(u.ElButton),{onClick:i[0]||(i[0]=s=>v(e.unref(o.operationConfigMap).reset)),type:"default"},{default:e.withCtx(()=>[...i[3]||(i[3]=[e.createTextVNode("重置",-1)])]),_:1}),k.value?.length?(e.openBlock(),e.createBlock(e.unref(u.ElPopover),{key:0,visible:l.value,placement:"bottom-start",width:628,trigger:"click"},{reference:e.withCtx(()=>[e.createVNode(e.unref(u.ElButton),{onClick:i[1]||(i[1]=s=>l.value=!l.value),icon:e.unref(g.IconCheck),type:"default"},{default:e.withCtx(()=>[...i[4]||(i[4]=[e.createTextVNode(" 筛选器 ",-1)])]),_:1},8,["icon"])]),default:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createVNode(S.CustomTitle,{content:"筛选器",fontSize:16}),e.createVNode(e.unref(u.ElIcon),{size:16,onClick:O},{default:e.withCtx(()=>[e.createVNode(e.unref(g.IconMagnify))]),_:1})]),e.createVNode(E,{items:k.value,"form-data":n.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",onChange:w,onEnter:C},e.createSlots({_:2},[e.renderList(k.value,s=>({name:s.key,fn:e.withCtx(m=>[e.renderSlot(r.$slots,s.key,e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)])}))]),1032,["items","form-data","min-width"]),e.createElementVNode("div",X,[e.createVNode(x,{"operation-list":a.operationList,onOperation:v},e.createSlots({_:2},[r.$slots.operation?{name:"operation",fn:e.withCtx(({operationList:s})=>[e.renderSlot(r.$slots,"operation",{operationList:s},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(g.IconUp):e.unref(g.IconDown),text:"",onClick:R},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.value?"收起":"展开"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0),e.createVNode(x,{"operation-list":a.operationList,onOperation:v},e.createSlots({_:2},[r.$slots.operation?{name:"operation",fn:e.withCtx(({operationList:s})=>[e.renderSlot(r.$slots,"operation",{operationList:s},void 0,!0)]),key:"0"}:void 0]),1032,["operation-list"])],64))],6),e.createVNode(e.unref(u.ElDrawer),{modelValue:h.value,"onUpdate:modelValue":i[2]||(i[2]=s=>h.value=s),size:"628","show-close":!1},{header:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createVNode(S.CustomTitle,{content:"筛选器",fontSize:16}),e.createVNode(e.unref(u.ElIcon),{size:16,onClick:q,class:"shrink-button"},{default:e.withCtx(()=>[e.createVNode(e.unref(g.IconShrink))]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(E,{items:k.value,"form-data":n.value,"label-width":"auto","label-position":"top",inline:!1,"show-label":!0,"is-filter":!0,"min-width":a.minWidth,onChange:w,onEnter:C},e.createSlots({_:2},[e.renderList(k.value,s=>({name:s.key,fn:e.withCtx(m=>[e.renderSlot(r.$slots,s.key,e.normalizeProps(e.guardReactiveProps(m)),void 0,!0)])}))]),1032,["items","form-data","min-width"])]),e.createElementVNode("div",ee,[e.createVNode(x,{"operation-list":a.operationList,onOperation:v},e.createSlots({_:2},[r.$slots.operation?{name:"operation",fn:e.withCtx(({operationList:s})=>[e.renderSlot(r.$slots,"operation",{operationList:s},void 0,!0)]),key:"0"}:void 0]),1032,["operation-list"])])]),_:3},8,["modelValue"])],2))}}),ae=P._export_sfc(te,[["__scopeId","data-v-663b89dc"]]);exports.SearchBar=ae;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ling-yun-custom-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.52",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"component library",
|
|
6
6
|
"ui framework",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"element-plus": "^2.11.8",
|
|
141
141
|
"element-tree-line": "^0.2.1",
|
|
142
142
|
"js-cookie": "^3.0.5",
|
|
143
|
-
"ling-yun-methods": "^0.0.
|
|
143
|
+
"ling-yun-methods": "^0.0.40",
|
|
144
144
|
"color-star-custom-methods": "^0.0.4",
|
|
145
145
|
"lodash.debounce": "^4.0.8",
|
|
146
146
|
"lottie-web": "^5.13.0",
|
|
@@ -188,7 +188,8 @@
|
|
|
188
188
|
"axios": "^1.8.2",
|
|
189
189
|
"vue": "^3.5.13",
|
|
190
190
|
"color-message-lingyun-vue": "0.0.20",
|
|
191
|
-
"color-message-aibox-vue": "0.0.41"
|
|
191
|
+
"color-message-aibox-vue": "0.0.41",
|
|
192
|
+
"color-star-atom-style": "0.0.2"
|
|
192
193
|
},
|
|
193
194
|
"optionalDependencies": {
|
|
194
195
|
"@ast-grep/napi-linux-x64-musl": "^0.39.6",
|