ling-yun-custom-components 0.0.10
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/BatchImport.mjs +208 -0
- package/es/BuildComponents.mjs +190 -0
- package/es/CustomDialog.mjs +7 -0
- package/es/CustomDropdown.mjs +145 -0
- package/es/CustomPagination.mjs +7 -0
- package/es/CustomSelect.mjs +7 -0
- package/es/CustomTab.mjs +33 -0
- package/es/CustomTitle.mjs +7 -0
- package/es/FileList.mjs +7 -0
- package/es/GradientButton.mjs +120 -0
- package/es/IconEmpty.mjs +7 -0
- package/es/IconRenderer.mjs +42 -0
- package/es/IconSelect.mjs +120 -0
- package/es/PaginationTable.mjs +407 -0
- package/es/SearchBar.mjs +7 -0
- package/es/TreeSelect.mjs +406 -0
- package/es/TreeShowSelect.mjs +82 -0
- package/es/UpdatePasswordDialog.mjs +119 -0
- package/es/UploadFile.mjs +7 -0
- package/es/assets/BuildComponents.css +1 -0
- package/es/assets/CustomDropdown.css +1 -0
- package/es/assets/CustomTab.css +1 -0
- package/es/assets/GradientButton.css +1 -0
- package/es/assets/IconSelect.css +1 -0
- package/es/assets/PaginationTable.css +1 -0
- package/es/assets/TreeSelect.css +1 -0
- package/es/assets/TreeShowSelect.css +1 -0
- package/es/assets/UpdatePasswordDialog.css +1 -0
- package/es/assets/layout.css +0 -0
- package/es/assets/layout2.css +1 -0
- package/es/assets/layout3.css +1 -0
- package/es/assets/layout4.css +1 -0
- package/es/assets/layout5.css +1 -0
- package/es/assets/layout6.css +1 -0
- package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +9 -0
- package/es/chunks/global.DVwnOczb.js +7828 -0
- package/es/chunks/index.D4Kbv-m1.js +8991 -0
- package/es/chunks/index.DfOANPhX.js +1729 -0
- package/es/chunks/index.DlooXR0t.js +9576 -0
- package/es/chunks/index.bCzIhWFw.js +7 -0
- package/es/chunks/layout.1y3OJ-ea.js +230 -0
- package/es/chunks/layout.2Mabaug0.js +121 -0
- package/es/chunks/layout.6MxjcpGc.js +584 -0
- package/es/chunks/layout.BJE8rMzK.js +230 -0
- package/es/chunks/layout.BKJPyxR8.js +39 -0
- package/es/chunks/layout.C0UEMbnF.js +98 -0
- package/es/chunks/layout.CTQtuC78.js +584 -0
- package/es/chunks/layout.CUOtHOHG.js +66 -0
- package/es/chunks/layout.CiNI5oQK.js +149 -0
- package/es/chunks/layout.CnANFnM1.js +584 -0
- package/es/chunks/layout.CtWHo87D.js +121 -0
- package/es/chunks/layout.Day1LJyl.js +234 -0
- package/es/chunks/layout.DeAFov0o.js +234 -0
- package/es/chunks/layout.Dvw3u-s5.js +234 -0
- package/es/chunks/layout.LCKaV7EX.js +230 -0
- package/es/chunks/layout.ZxPdKhRp.js +149 -0
- package/es/chunks/layout._A_rHZM7.js +149 -0
- package/es/chunks/layout.f58eO4Hr.js +98 -0
- package/es/chunks/layout.t3qD0LTW.js +121 -0
- package/es/chunks/layout.ypvwQzq5.js +98 -0
- package/es/index.mjs +81 -0
- package/lib/BatchImport.js +1 -0
- package/lib/BuildComponents.js +1 -0
- package/lib/CustomDialog.js +1 -0
- package/lib/CustomDropdown.js +1 -0
- package/lib/CustomPagination.js +1 -0
- package/lib/CustomSelect.js +1 -0
- package/lib/CustomTab.js +1 -0
- package/lib/CustomTitle.js +1 -0
- package/lib/FileList.js +1 -0
- package/lib/GradientButton.js +1 -0
- package/lib/IconEmpty.js +1 -0
- package/lib/IconRenderer.js +1 -0
- package/lib/IconSelect.js +1 -0
- package/lib/PaginationTable.js +1 -0
- package/lib/SearchBar.js +1 -0
- package/lib/TreeSelect.js +1 -0
- package/lib/TreeShowSelect.js +1 -0
- package/lib/UpdatePasswordDialog.js +1 -0
- package/lib/UploadFile.js +1 -0
- package/lib/assets/BuildComponents.css +1 -0
- package/lib/assets/CustomDropdown.css +1 -0
- package/lib/assets/CustomTab.css +1 -0
- package/lib/assets/GradientButton.css +1 -0
- package/lib/assets/IconSelect.css +1 -0
- package/lib/assets/PaginationTable.css +1 -0
- package/lib/assets/TreeSelect.css +1 -0
- package/lib/assets/TreeShowSelect.css +1 -0
- package/lib/assets/UpdatePasswordDialog.css +1 -0
- package/lib/assets/layout.css +0 -0
- package/lib/assets/layout2.css +1 -0
- package/lib/assets/layout3.css +1 -0
- package/lib/assets/layout4.css +1 -0
- package/lib/assets/layout5.css +1 -0
- package/lib/assets/layout6.css +1 -0
- package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +1 -0
- package/lib/chunks/global.Cv8u--Cy.js +1 -0
- package/lib/chunks/index.Bixsw9fA.js +23 -0
- package/lib/chunks/index.CkihWzK6.js +1 -0
- package/lib/chunks/index.CrvqvcN9.js +23 -0
- package/lib/chunks/index.DJKAT9lI.js +1 -0
- package/lib/chunks/layout.-yZzrp74.js +1 -0
- package/lib/chunks/layout.2PAIPzYY.js +1 -0
- package/lib/chunks/layout.5iOiFlVu.js +1 -0
- package/lib/chunks/layout.B-T_NE6r.js +1 -0
- package/lib/chunks/layout.BBNd1hLQ.js +1 -0
- package/lib/chunks/layout.BNJsxQ2g.js +1 -0
- package/lib/chunks/layout.BSF3ruxz.js +1 -0
- package/lib/chunks/layout.BXdjRFbn.js +1 -0
- package/lib/chunks/layout.BhL14Rqh.js +1 -0
- package/lib/chunks/layout.BmQYiD_b.js +1 -0
- package/lib/chunks/layout.CDg3sCTi.js +1 -0
- package/lib/chunks/layout.CeVldGUL.js +1 -0
- package/lib/chunks/layout.CjJiAY0w.js +1 -0
- package/lib/chunks/layout.CoSBrO12.js +1 -0
- package/lib/chunks/layout.CwA4IJ1g.js +1 -0
- package/lib/chunks/layout.DDTIwGYp.js +1 -0
- package/lib/chunks/layout.DOS2ezSW.js +1 -0
- package/lib/chunks/layout.D_TxPvRy.js +1 -0
- package/lib/chunks/layout.DfiLurg1.js +1 -0
- package/lib/chunks/layout.gqpUcAHO.js +1 -0
- package/lib/index.js +1 -0
- package/package.json +205 -0
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
import { renderSlot as k, createElementBlock as $, openBlock as r, Fragment as U, renderList as E, createBlock as m, unref as t, withCtx as n, createTextVNode as V, toDisplayString as L, useCssVars as le, defineAsyncComponent as Y, ref as w, computed as x, normalizeClass as O, mergeProps as b, createCommentVNode as I, withKeys as ke, onMounted as pe, watch as be, createElementVNode as g, createVNode as f, createSlots as F, normalizeProps as A, guardReactiveProps as H, normalizeStyle as ge } from "vue";
|
|
2
|
+
import { ElButton as z, ElForm as we, ElFormItem as oe, ElInput as Z, ElDatePicker as Ve, ElInputNumber as De, ElSwitch as Ce, ElRadioGroup as $e, ElRadio as Ee, ElCheckboxGroup as Fe, ElCheckbox as xe, ElAutoResizer as _, ElPopover as Ue, ElIcon as ee, ElDrawer as Le } from "element-plus";
|
|
3
|
+
import { l as Se, m as We, n as Be, a as Me, o as Pe } from "./index.DfOANPhX.js";
|
|
4
|
+
import { r as C, d as N, n as h, s as Ne, o as ae, b as P } from "./index.D4Kbv-m1.js";
|
|
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 Oe = [
|
|
8
|
+
{
|
|
9
|
+
type: "primary",
|
|
10
|
+
label: "查询",
|
|
11
|
+
value: C.search
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
type: "default",
|
|
15
|
+
label: "重置",
|
|
16
|
+
value: C.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 W = S, y = (v) => {
|
|
29
|
+
W("operation", v);
|
|
30
|
+
};
|
|
31
|
+
return (v, i) => v.$slots.operation ? k(v.$slots, "operation", {
|
|
32
|
+
key: 0,
|
|
33
|
+
operationList: a.operationList
|
|
34
|
+
}) : (r(!0), $(U, { key: 1 }, E(a.operationList, (c) => (r(), m(t(z), {
|
|
35
|
+
key: c.value,
|
|
36
|
+
type: c.type,
|
|
37
|
+
icon: c.icon,
|
|
38
|
+
onClick: (u) => y(c.value)
|
|
39
|
+
}, {
|
|
40
|
+
default: n(() => [
|
|
41
|
+
V(L(c.label), 1)
|
|
42
|
+
]),
|
|
43
|
+
_: 2
|
|
44
|
+
}, 1032, ["type", "icon", "onClick"]))), 128));
|
|
45
|
+
}
|
|
46
|
+
}, Ie = /* @__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: N.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
|
+
v5a659130: a.minWidth + "px"
|
|
105
|
+
}));
|
|
106
|
+
const W = Y(() => import("./layout.CtWHo87D.js")), y = Y(() => import("./layout.1y3OJ-ea.js")), v = a, i = w(null), c = x(() => 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, D) => (r(), m(t(we), {
|
|
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: O({
|
|
127
|
+
[c.value]: !0,
|
|
128
|
+
"items-end display-grid": !a.isFilterPreview
|
|
129
|
+
})
|
|
130
|
+
}, {
|
|
131
|
+
default: n(() => [
|
|
132
|
+
(r(!0), $(U, null, E(a.items, (e) => (r(), m(t(oe), b({
|
|
133
|
+
key: e.key,
|
|
134
|
+
label: a.showLabel ? e.label : "",
|
|
135
|
+
prop: e.key,
|
|
136
|
+
"show-label": a.showLabel,
|
|
137
|
+
class: [
|
|
138
|
+
{
|
|
139
|
+
"search-bar-item--wide": e.wide
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}, { ref_for: !0 }, e), {
|
|
143
|
+
default: n(() => [
|
|
144
|
+
k(u.$slots, e.key, {
|
|
145
|
+
item: e,
|
|
146
|
+
formData: a.formData
|
|
147
|
+
}, () => [
|
|
148
|
+
e.type === t(h).text ? (r(), m(t(Z), b({
|
|
149
|
+
key: 0,
|
|
150
|
+
modelValue: a.formData[e.key],
|
|
151
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
152
|
+
}, { ref_for: !0 }, e, {
|
|
153
|
+
class: "w-full",
|
|
154
|
+
onChange: (l) => u.$emit("change", e.key, a.formData[e.key]),
|
|
155
|
+
onKeyup: ke((l) => u.$emit("enter", e.key, a.formData[e.key]), ["enter"])
|
|
156
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange", "onKeyup"])) : e.type === t(h).select ? (r(), m(t(W), b({
|
|
157
|
+
key: 1,
|
|
158
|
+
modelValue: a.formData[e.key],
|
|
159
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l,
|
|
160
|
+
"static-options": e.options
|
|
161
|
+
}, { ref_for: !0 }, e, {
|
|
162
|
+
onChange: (l) => u.$emit("change", e.key, a.formData[e.key]),
|
|
163
|
+
class: "w-full"
|
|
164
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "static-options", "onChange"])) : e.type === t(h).date ? (r(), m(t(Ve), b({
|
|
165
|
+
key: 2,
|
|
166
|
+
modelValue: a.formData[e.key],
|
|
167
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
168
|
+
}, { ref_for: !0 }, {
|
|
169
|
+
...e,
|
|
170
|
+
...t(Ne)[e.dateType]
|
|
171
|
+
}, {
|
|
172
|
+
type: e.dateType,
|
|
173
|
+
format: e.format || t(ae).date,
|
|
174
|
+
"value-format": e.valueFormat || t(ae).dateTime,
|
|
175
|
+
class: "w-full",
|
|
176
|
+
onChange: (l) => u.$emit("change", e.key, a.formData[e.key])
|
|
177
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "type", "format", "value-format", "onChange"])) : e.type === t(h).inputNumber ? (r(), m(t(De), b({
|
|
178
|
+
key: 3,
|
|
179
|
+
modelValue: a.formData[e.key],
|
|
180
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
181
|
+
}, { ref_for: !0 }, e, {
|
|
182
|
+
class: "w-full",
|
|
183
|
+
onChange: (l) => u.$emit("change", e.key, a.formData[e.key])
|
|
184
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).switch ? (r(), m(t(Ce), b({
|
|
185
|
+
key: 4,
|
|
186
|
+
modelValue: a.formData[e.key],
|
|
187
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
188
|
+
}, { ref_for: !0 }, e, {
|
|
189
|
+
onChange: (l) => u.$emit("change", e.key, a.formData[e.key])
|
|
190
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).radio ? (r(), m(t($e), {
|
|
191
|
+
key: 5,
|
|
192
|
+
modelValue: a.formData[e.key],
|
|
193
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l,
|
|
194
|
+
onChange: (l) => u.$emit("change", e.key, a.formData[e.key])
|
|
195
|
+
}, {
|
|
196
|
+
default: n(() => [
|
|
197
|
+
(r(!0), $(U, null, E(e.options, (l) => (r(), m(t(Ee), {
|
|
198
|
+
key: l.value,
|
|
199
|
+
label: l.value
|
|
200
|
+
}, {
|
|
201
|
+
default: n(() => [
|
|
202
|
+
V(L(l.label), 1)
|
|
203
|
+
]),
|
|
204
|
+
_: 2
|
|
205
|
+
}, 1032, ["label"]))), 128))
|
|
206
|
+
]),
|
|
207
|
+
_: 2
|
|
208
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).checkbox ? (r(), m(t(Fe), {
|
|
209
|
+
key: 6,
|
|
210
|
+
modelValue: a.formData[e.key],
|
|
211
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l,
|
|
212
|
+
onChange: (l) => u.$emit("change", e.key, a.formData[e.key])
|
|
213
|
+
}, {
|
|
214
|
+
default: n(() => [
|
|
215
|
+
(r(!0), $(U, null, E(e.options, (l) => (r(), m(t(xe), {
|
|
216
|
+
key: l.value,
|
|
217
|
+
label: l.value
|
|
218
|
+
}, {
|
|
219
|
+
default: n(() => [
|
|
220
|
+
V(L(l.label), 1)
|
|
221
|
+
]),
|
|
222
|
+
_: 2
|
|
223
|
+
}, 1032, ["label"]))), 128))
|
|
224
|
+
]),
|
|
225
|
+
_: 2
|
|
226
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).textarea ? (r(), m(t(Z), b({
|
|
227
|
+
key: 7,
|
|
228
|
+
modelValue: a.formData[e.key],
|
|
229
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
230
|
+
}, { ref_for: !0 }, e, {
|
|
231
|
+
class: "w-full",
|
|
232
|
+
type: "textarea",
|
|
233
|
+
onChange: (l) => u.$emit("change", e.key, a.formData[e.key])
|
|
234
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(h).upload ? (r(), m(t(y), b({
|
|
235
|
+
key: 8,
|
|
236
|
+
modelValue: a.formData[e.key],
|
|
237
|
+
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
238
|
+
}, { ref_for: !0 }, e), null, 16, ["modelValue", "onUpdate:modelValue"])) : I("", !0)
|
|
239
|
+
], !0)
|
|
240
|
+
]),
|
|
241
|
+
_: 2
|
|
242
|
+
}, 1040, ["label", "prop", "show-label", "class"]))), 128)),
|
|
243
|
+
k(u.$slots, "default", {}, void 0, !0)
|
|
244
|
+
]),
|
|
245
|
+
_: 3
|
|
246
|
+
}, 8, ["model", "label-width", "label-position", "inline", "rules", "class"]));
|
|
247
|
+
}
|
|
248
|
+
}), q = /* @__PURE__ */ ne(Ie, [["__scopeId", "data-v-a3300eb1"]]), ze = { class: "h-32 w-full" }, Re = { class: "flex items-center justify-between pd-b-20" }, Te = { class: "text-right" }, je = { class: "drawer-header" }, Ae = { class: "flex-1 pd-l-16 pd-r-16 overflow-y-auto" }, He = { class: "text-right border-top pd-t-16 pd-l-16 pd-r-16" }, Ke = /* @__PURE__ */ Object.assign({
|
|
249
|
+
name: "SearchBar"
|
|
250
|
+
}, {
|
|
251
|
+
__name: "layout",
|
|
252
|
+
props: {
|
|
253
|
+
// 搜索项配置
|
|
254
|
+
items: {
|
|
255
|
+
type: Array,
|
|
256
|
+
default: () => []
|
|
257
|
+
},
|
|
258
|
+
// 初始值
|
|
259
|
+
modelValue: {
|
|
260
|
+
type: Object,
|
|
261
|
+
default: () => ({})
|
|
262
|
+
},
|
|
263
|
+
// 标签宽度
|
|
264
|
+
labelWidth: {
|
|
265
|
+
type: [String, Number],
|
|
266
|
+
default: "auto"
|
|
267
|
+
},
|
|
268
|
+
// 标签位置
|
|
269
|
+
labelPosition: {
|
|
270
|
+
type: String,
|
|
271
|
+
default: N.right,
|
|
272
|
+
validator: (a) => [N.left, N.right, N.top].includes(a)
|
|
273
|
+
},
|
|
274
|
+
// 是否可以展开
|
|
275
|
+
isExpand: {
|
|
276
|
+
type: Boolean,
|
|
277
|
+
default: !0
|
|
278
|
+
},
|
|
279
|
+
// 最大的高度
|
|
280
|
+
maxHeight: {
|
|
281
|
+
type: Number,
|
|
282
|
+
default: 84
|
|
283
|
+
},
|
|
284
|
+
// 每项最小宽度
|
|
285
|
+
minWidth: {
|
|
286
|
+
type: Number,
|
|
287
|
+
default: re
|
|
288
|
+
},
|
|
289
|
+
operationList: {
|
|
290
|
+
type: Array,
|
|
291
|
+
default: Oe
|
|
292
|
+
},
|
|
293
|
+
// 是否为筛选器模式
|
|
294
|
+
filterMode: {
|
|
295
|
+
type: Boolean,
|
|
296
|
+
default: !0
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
emits: [P.updateModelValue, P.operation],
|
|
300
|
+
setup(a, { expose: S, emit: W }) {
|
|
301
|
+
le((o) => ({
|
|
302
|
+
fdcf2012: a.maxHeight + "px",
|
|
303
|
+
v307de011: j.value ? j.value + "px" : "100%"
|
|
304
|
+
}));
|
|
305
|
+
const y = a, v = W, i = w({}), c = w(!y.isExpand), u = w(null), D = w(!1), e = w(!1), l = x(() => {
|
|
306
|
+
const o = {};
|
|
307
|
+
return y.items.forEach((s) => {
|
|
308
|
+
if (s.required) {
|
|
309
|
+
const d = [{ required: !0, message: `${s.label}不能为空`, trigger: "blur" }];
|
|
310
|
+
typeof s.validator == "function" && d.push({ validator: s.validator, trigger: "blur" }), o[s.key] = d;
|
|
311
|
+
}
|
|
312
|
+
}), o;
|
|
313
|
+
}), R = x(() => y.items?.filter((o) => !o.hidden) || []), G = x(() => y.filterMode ? R.value?.slice(0, 2) || [] : R.value), B = x(() => y.filterMode ? R.value.slice(2) : []), J = (o) => {
|
|
314
|
+
i.value = { ...o };
|
|
315
|
+
}, ue = () => {
|
|
316
|
+
v(P.updateModelValue, { ...i.value });
|
|
317
|
+
}, ie = (o, s) => {
|
|
318
|
+
i.value[o] = s, M(C.search);
|
|
319
|
+
}, de = () => i.value, T = (o, s) => {
|
|
320
|
+
v(P.operation, C.search, i.value);
|
|
321
|
+
}, M = (o) => {
|
|
322
|
+
ue(), v(P.operation, o, i.value), (o === C.search || o === C.reset) && (D.value = !1, e.value = !1);
|
|
323
|
+
}, se = (o) => u.value.validate(o), j = w(0), fe = (o) => {
|
|
324
|
+
j.value = o + 32;
|
|
325
|
+
}, me = () => {
|
|
326
|
+
c.value = !c.value;
|
|
327
|
+
}, ce = () => {
|
|
328
|
+
D.value = !1, e.value = !0;
|
|
329
|
+
}, ye = () => {
|
|
330
|
+
e.value = !1, D.value = !0;
|
|
331
|
+
}, Q = w(!1), X = (o) => {
|
|
332
|
+
Q.value = o > y.maxHeight;
|
|
333
|
+
}, ve = x(() => y.filterMode || c.value ? "10px" : "0");
|
|
334
|
+
return pe(() => {
|
|
335
|
+
J(y.modelValue), X();
|
|
336
|
+
}), be(
|
|
337
|
+
() => y.modelValue,
|
|
338
|
+
(o) => {
|
|
339
|
+
J(o);
|
|
340
|
+
},
|
|
341
|
+
{ immediate: !0, deep: !0 }
|
|
342
|
+
), S({
|
|
343
|
+
validate: se,
|
|
344
|
+
getFormData: de,
|
|
345
|
+
// clearValidate,
|
|
346
|
+
// resetFields,
|
|
347
|
+
// scrollToField,
|
|
348
|
+
formRef: u
|
|
349
|
+
}), (o, s) => (r(), $("div", {
|
|
350
|
+
class: O(["relative overflow-hidden w-full", { flex: a.filterMode }])
|
|
351
|
+
}, [
|
|
352
|
+
g("div", {
|
|
353
|
+
class: O({
|
|
354
|
+
"is-collapsed overflow-hidden": !c.value
|
|
355
|
+
})
|
|
356
|
+
}, [
|
|
357
|
+
f(t(_), null, {
|
|
358
|
+
default: n(({ height: d }) => [
|
|
359
|
+
V(L(X(d)) + " ", 1),
|
|
360
|
+
f(q, {
|
|
361
|
+
ref_key: "formRef",
|
|
362
|
+
ref: u,
|
|
363
|
+
items: G.value,
|
|
364
|
+
"form-data": i.value,
|
|
365
|
+
rules: l.value,
|
|
366
|
+
"label-width": a.labelWidth,
|
|
367
|
+
"label-position": a.labelPosition,
|
|
368
|
+
inline: !0,
|
|
369
|
+
"show-label": !a.filterMode,
|
|
370
|
+
"min-width": a.minWidth,
|
|
371
|
+
"is-filter-preview": a.filterMode,
|
|
372
|
+
onChange: ie,
|
|
373
|
+
onEnter: T
|
|
374
|
+
}, F({
|
|
375
|
+
default: n(() => [
|
|
376
|
+
a.isExpand && !a.filterMode ? (r(), m(t(oe), { key: 0 }, {
|
|
377
|
+
default: n(() => [
|
|
378
|
+
g("div", ze, [
|
|
379
|
+
f(t(_), null, {
|
|
380
|
+
default: n(({ width: p }) => [
|
|
381
|
+
V(L(fe(p)), 1)
|
|
382
|
+
]),
|
|
383
|
+
_: 1
|
|
384
|
+
})
|
|
385
|
+
])
|
|
386
|
+
]),
|
|
387
|
+
_: 1
|
|
388
|
+
})) : I("", !0)
|
|
389
|
+
]),
|
|
390
|
+
_: 2
|
|
391
|
+
}, [
|
|
392
|
+
E(G.value, (p) => ({
|
|
393
|
+
name: p.key,
|
|
394
|
+
fn: n((he) => [
|
|
395
|
+
k(o.$slots, p.key, A(H(he)), void 0, !0)
|
|
396
|
+
])
|
|
397
|
+
}))
|
|
398
|
+
]), 1032, ["items", "form-data", "rules", "label-width", "label-position", "show-label", "min-width", "is-filter-preview"])
|
|
399
|
+
]),
|
|
400
|
+
_: 3
|
|
401
|
+
})
|
|
402
|
+
], 2),
|
|
403
|
+
g("div", {
|
|
404
|
+
class: O(["operation-buttons", {
|
|
405
|
+
"absolute right-0 bg-fff text-right": a.isExpand && !a.filterMode,
|
|
406
|
+
"text-left": a.filterMode
|
|
407
|
+
}]),
|
|
408
|
+
style: ge({ bottom: ve.value })
|
|
409
|
+
}, [
|
|
410
|
+
a.filterMode ? (r(), $(U, { key: 0 }, [
|
|
411
|
+
f(t(z), {
|
|
412
|
+
onClick: s[0] || (s[0] = (d) => M(t(C).reset)),
|
|
413
|
+
type: "default"
|
|
414
|
+
}, {
|
|
415
|
+
default: n(() => [...s[3] || (s[3] = [
|
|
416
|
+
V("重置", -1)
|
|
417
|
+
])]),
|
|
418
|
+
_: 1
|
|
419
|
+
}),
|
|
420
|
+
f(t(Ue), {
|
|
421
|
+
visible: D.value,
|
|
422
|
+
placement: "bottom-start",
|
|
423
|
+
width: 628,
|
|
424
|
+
trigger: "click"
|
|
425
|
+
}, {
|
|
426
|
+
reference: n(() => [
|
|
427
|
+
B.value?.length ? (r(), m(t(z), {
|
|
428
|
+
key: 0,
|
|
429
|
+
onClick: s[1] || (s[1] = (d) => D.value = !D.value),
|
|
430
|
+
icon: t(We),
|
|
431
|
+
type: "default"
|
|
432
|
+
}, {
|
|
433
|
+
default: n(() => [...s[4] || (s[4] = [
|
|
434
|
+
V(" 筛选器 ", -1)
|
|
435
|
+
])]),
|
|
436
|
+
_: 1
|
|
437
|
+
}, 8, ["icon"])) : I("", !0)
|
|
438
|
+
]),
|
|
439
|
+
default: n(() => [
|
|
440
|
+
g("div", Re, [
|
|
441
|
+
f(te, {
|
|
442
|
+
content: "筛选器",
|
|
443
|
+
fontSize: 16
|
|
444
|
+
}),
|
|
445
|
+
f(t(ee), {
|
|
446
|
+
size: 16,
|
|
447
|
+
onClick: ce
|
|
448
|
+
}, {
|
|
449
|
+
default: n(() => [
|
|
450
|
+
f(t(Se))
|
|
451
|
+
]),
|
|
452
|
+
_: 1
|
|
453
|
+
})
|
|
454
|
+
]),
|
|
455
|
+
f(q, {
|
|
456
|
+
items: B.value,
|
|
457
|
+
"form-data": i.value,
|
|
458
|
+
"label-width": "auto",
|
|
459
|
+
"label-position": "top",
|
|
460
|
+
inline: !1,
|
|
461
|
+
"show-label": !0,
|
|
462
|
+
"is-filter": !0,
|
|
463
|
+
"min-width": a.minWidth,
|
|
464
|
+
class: "filter-form-popover overflow-y-auto",
|
|
465
|
+
onEnter: T
|
|
466
|
+
}, F({ _: 2 }, [
|
|
467
|
+
E(B.value, (d) => ({
|
|
468
|
+
name: d.key,
|
|
469
|
+
fn: n((p) => [
|
|
470
|
+
k(o.$slots, d.key, A(H(p)), void 0, !0)
|
|
471
|
+
])
|
|
472
|
+
}))
|
|
473
|
+
]), 1032, ["items", "form-data", "min-width"]),
|
|
474
|
+
g("div", Te, [
|
|
475
|
+
f(K, {
|
|
476
|
+
"operation-list": a.operationList,
|
|
477
|
+
onOperation: M
|
|
478
|
+
}, F({ _: 2 }, [
|
|
479
|
+
o.$slots.operation ? {
|
|
480
|
+
name: "operation",
|
|
481
|
+
fn: n(({ operationList: d }) => [
|
|
482
|
+
k(o.$slots, "operation", { operationList: d }, void 0, !0)
|
|
483
|
+
]),
|
|
484
|
+
key: "0"
|
|
485
|
+
} : void 0
|
|
486
|
+
]), 1032, ["operation-list"])
|
|
487
|
+
])
|
|
488
|
+
]),
|
|
489
|
+
_: 3
|
|
490
|
+
}, 8, ["visible"])
|
|
491
|
+
], 64)) : (r(), $(U, { key: 1 }, [
|
|
492
|
+
Q.value && a.isExpand ? (r(), m(t(z), {
|
|
493
|
+
key: 0,
|
|
494
|
+
icon: c.value ? t(Be) : t(Me),
|
|
495
|
+
type: "text",
|
|
496
|
+
onClick: me
|
|
497
|
+
}, {
|
|
498
|
+
default: n(() => [
|
|
499
|
+
V(L(c.value ? "收起" : "展开"), 1)
|
|
500
|
+
]),
|
|
501
|
+
_: 1
|
|
502
|
+
}, 8, ["icon"])) : I("", !0),
|
|
503
|
+
f(K, {
|
|
504
|
+
"operation-list": a.operationList,
|
|
505
|
+
onOperation: M
|
|
506
|
+
}, F({ _: 2 }, [
|
|
507
|
+
o.$slots.operation ? {
|
|
508
|
+
name: "operation",
|
|
509
|
+
fn: n(({ operationList: d }) => [
|
|
510
|
+
k(o.$slots, "operation", { operationList: d }, void 0, !0)
|
|
511
|
+
]),
|
|
512
|
+
key: "0"
|
|
513
|
+
} : void 0
|
|
514
|
+
]), 1032, ["operation-list"])
|
|
515
|
+
], 64))
|
|
516
|
+
], 6),
|
|
517
|
+
f(t(Le), {
|
|
518
|
+
modelValue: e.value,
|
|
519
|
+
"onUpdate:modelValue": s[2] || (s[2] = (d) => e.value = d),
|
|
520
|
+
size: "628",
|
|
521
|
+
"show-close": !1
|
|
522
|
+
}, {
|
|
523
|
+
header: n(() => [
|
|
524
|
+
g("div", je, [
|
|
525
|
+
f(te, {
|
|
526
|
+
content: "筛选器",
|
|
527
|
+
fontSize: 16
|
|
528
|
+
}),
|
|
529
|
+
f(t(ee), {
|
|
530
|
+
size: 16,
|
|
531
|
+
onClick: ye,
|
|
532
|
+
class: "shrink-button"
|
|
533
|
+
}, {
|
|
534
|
+
default: n(() => [
|
|
535
|
+
f(t(Pe))
|
|
536
|
+
]),
|
|
537
|
+
_: 1
|
|
538
|
+
})
|
|
539
|
+
])
|
|
540
|
+
]),
|
|
541
|
+
default: n(() => [
|
|
542
|
+
g("div", Ae, [
|
|
543
|
+
f(q, {
|
|
544
|
+
items: B.value,
|
|
545
|
+
"form-data": i.value,
|
|
546
|
+
"label-width": "auto",
|
|
547
|
+
"label-position": "top",
|
|
548
|
+
inline: !1,
|
|
549
|
+
"show-label": !0,
|
|
550
|
+
"is-filter": !0,
|
|
551
|
+
"min-width": a.minWidth,
|
|
552
|
+
onEnter: T
|
|
553
|
+
}, F({ _: 2 }, [
|
|
554
|
+
E(B.value, (d) => ({
|
|
555
|
+
name: d.key,
|
|
556
|
+
fn: n((p) => [
|
|
557
|
+
k(o.$slots, d.key, A(H(p)), void 0, !0)
|
|
558
|
+
])
|
|
559
|
+
}))
|
|
560
|
+
]), 1032, ["items", "form-data", "min-width"])
|
|
561
|
+
]),
|
|
562
|
+
g("div", He, [
|
|
563
|
+
f(K, {
|
|
564
|
+
"operation-list": a.operationList,
|
|
565
|
+
onOperation: M
|
|
566
|
+
}, F({ _: 2 }, [
|
|
567
|
+
o.$slots.operation ? {
|
|
568
|
+
name: "operation",
|
|
569
|
+
fn: n(({ operationList: d }) => [
|
|
570
|
+
k(o.$slots, "operation", { operationList: d }, void 0, !0)
|
|
571
|
+
]),
|
|
572
|
+
key: "0"
|
|
573
|
+
} : void 0
|
|
574
|
+
]), 1032, ["operation-list"])
|
|
575
|
+
])
|
|
576
|
+
]),
|
|
577
|
+
_: 3
|
|
578
|
+
}, 8, ["modelValue"])
|
|
579
|
+
], 2));
|
|
580
|
+
}
|
|
581
|
+
}), Ze = /* @__PURE__ */ ne(Ke, [["__scopeId", "data-v-ab52a69e"]]);
|
|
582
|
+
export {
|
|
583
|
+
Ze as S
|
|
584
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { computed as n, createElementBlock as i, openBlock as o, createVNode as r, createElementVNode as l, unref as a, withCtx as m, createBlock as s, resolveDynamicComponent as p, normalizeStyle as f, toDisplayString as u } from "vue";
|
|
2
|
+
import { h as y } from "./index.DfOANPhX.js";
|
|
3
|
+
import { ElIcon as d } from "element-plus";
|
|
4
|
+
import { _ as x } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
|
+
import '../assets/layout.css';const S = { class: "icon-empty flex flex-col items-center justify-center" }, z = /* @__PURE__ */ Object.assign({
|
|
6
|
+
name: "IconEmpty"
|
|
7
|
+
}, {
|
|
8
|
+
__name: "layout",
|
|
9
|
+
props: {
|
|
10
|
+
// 图标组件
|
|
11
|
+
icon: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: y
|
|
14
|
+
},
|
|
15
|
+
// 图标大小
|
|
16
|
+
iconSize: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 64
|
|
19
|
+
},
|
|
20
|
+
// 图标颜色
|
|
21
|
+
iconColor: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "#c0c4cc"
|
|
24
|
+
},
|
|
25
|
+
// 显示文字
|
|
26
|
+
text: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "暂无数据"
|
|
29
|
+
},
|
|
30
|
+
// 文字颜色
|
|
31
|
+
textColor: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "#909399"
|
|
34
|
+
},
|
|
35
|
+
// 文字字号
|
|
36
|
+
textSize: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 14
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
setup(e) {
|
|
42
|
+
const t = e, c = n(() => ({
|
|
43
|
+
color: t.textColor,
|
|
44
|
+
fontSize: `${t.textSize}px`
|
|
45
|
+
}));
|
|
46
|
+
return (_, C) => (o(), i("div", S, [
|
|
47
|
+
r(a(d), {
|
|
48
|
+
size: e.iconSize,
|
|
49
|
+
color: e.iconColor,
|
|
50
|
+
class: "icon-empty-icon"
|
|
51
|
+
}, {
|
|
52
|
+
default: m(() => [
|
|
53
|
+
(o(), s(p(e.icon)))
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["size", "color"]),
|
|
57
|
+
l("div", {
|
|
58
|
+
class: "icon-empty-text",
|
|
59
|
+
style: f(c.value)
|
|
60
|
+
}, u(e.text), 5)
|
|
61
|
+
]));
|
|
62
|
+
}
|
|
63
|
+
}), b = /* @__PURE__ */ x(z, [["__scopeId", "data-v-c69a2cce"]]);
|
|
64
|
+
export {
|
|
65
|
+
b as I
|
|
66
|
+
};
|