color-star-custom-components 0.0.5 → 0.0.8
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 +1 -1
- package/es/FileList.mjs +1 -1
- package/es/IconRenderer.mjs +1 -1
- package/es/IconSelect.mjs +1 -1
- package/es/SearchBar.mjs +154 -131
- package/es/TreeSelect.mjs +7 -0
- package/es/TreeShowSelect.mjs +82 -0
- package/es/UploadFile.mjs +1 -1
- package/es/assets/SearchBar.css +1 -1
- package/es/assets/TreeShowSelect.css +1 -0
- package/es/assets/layout2.css +1 -1
- package/es/assets/layout3.css +1 -1
- package/es/assets/layout4.css +1 -0
- package/es/chunks/{config.DH2xMnlY.js → config.ERg0IgVD.js} +1 -1
- package/es/chunks/{global.DV6e9_12.js → global.BZl4v5js.js} +1182 -1158
- package/es/chunks/{layout.CyhEs923.js → layout.8QJjTbpS.js} +2 -2
- package/es/chunks/layout.8gJfLTP4.js +404 -0
- package/es/chunks/{layout.sb1tpZ1W.js → layout.CI0rHTkg.js} +1 -1
- package/es/chunks/layout.DQ1xjWEm.js +406 -0
- package/es/index.mjs +36 -30
- package/lib/BatchImport.js +1 -1
- package/lib/FileList.js +1 -1
- package/lib/IconRenderer.js +1 -1
- package/lib/IconSelect.js +1 -1
- package/lib/SearchBar.js +1 -1
- package/lib/TreeSelect.js +1 -0
- package/lib/TreeShowSelect.js +1 -0
- package/lib/UploadFile.js +1 -1
- package/lib/assets/SearchBar.css +1 -1
- package/lib/assets/TreeShowSelect.css +1 -0
- package/lib/assets/layout2.css +1 -1
- package/lib/assets/layout3.css +1 -1
- package/lib/assets/layout4.css +1 -0
- package/lib/chunks/{config.DPp4ti8p.js → config.B0eqERf5.js} +1 -1
- package/lib/chunks/global.BeZ3Ue5-.js +1 -0
- package/lib/chunks/{layout.CacUgLUZ.js → layout.BaKyR150.js} +1 -1
- package/lib/chunks/layout.BhOA_UzD.js +1 -0
- package/lib/chunks/layout.C_5ri7PW.js +1 -0
- package/lib/chunks/{layout.C8IKkahl.js → layout.whToBh0O.js} +1 -1
- package/lib/index.js +1 -1
- package/package.json +10 -9
- package/es/chunks/layout.BLCGmWdA.js +0 -149
- package/es/chunks/layout.BaKXshGh.js +0 -149
- package/es/chunks/layout.BqkEUrff.js +0 -230
- package/es/chunks/layout.D5DtDgGV.js +0 -230
- package/es/chunks/layout.wck_IDgd.js +0 -121
- package/lib/chunks/global.BwF3T7mN.js +0 -1
- package/lib/chunks/layout.BQdjwrgQ.js +0 -1
- package/lib/chunks/layout.ChIHPtyu.js +0 -1
- package/lib/chunks/layout.DTs74_a_.js +0 -1
- package/lib/chunks/layout.sSLT3tUN.js +0 -1
- package/lib/chunks/layout.ttM1z00z.js +0 -1
package/es/SearchBar.mjs
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { w as ke } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
-
import { renderSlot as k, createElementBlock as
|
|
3
|
-
import { ElButton as
|
|
4
|
-
import { IconMagnify as
|
|
5
|
-
import { operationConfigMap as
|
|
2
|
+
import { renderSlot as k, createElementBlock as $, openBlock as i, Fragment as F, renderList as E, createBlock as c, unref as t, withCtx as r, createTextVNode as V, toDisplayString as M, useCssVars as le, ref as p, computed as W, withModifiers as be, normalizeClass as N, mergeProps as g, createCommentVNode as O, withKeys as ge, onMounted as we, watch as Ve, createElementVNode as w, createVNode as m, createSlots as x, normalizeProps as H, guardReactiveProps as K, normalizeStyle as Ce } from "vue";
|
|
3
|
+
import { ElButton as T, ElForm as De, ElFormItem as oe, ElInput as Z, ElDatePicker as $e, ElInputNumber as Ee, ElSwitch as xe, ElRadioGroup as We, ElRadio as Fe, ElCheckboxGroup as Me, ElCheckbox as Be, ElAutoResizer as _, ElPopover as Ue, ElIcon as ee, ElDrawer as Ie } from "element-plus";
|
|
4
|
+
import { IconMagnify as Le, IconCheck as Pe, IconUp as Se, IconDown as Ne, IconShrink as Oe } from "color-message-lingyun-vue";
|
|
5
|
+
import { operationConfigMap as D, emitsMap as f, labelPositionMap as P, componentType as v, dateParamsMap as Te, dateFormat as ae } from "color-star-custom-methods";
|
|
6
6
|
import { _ as ze } from "./chunks/layout.CR6q_HFP.js";
|
|
7
|
-
import { _ as Re } from "./chunks/layout.
|
|
7
|
+
import { _ as Re } from "./chunks/layout.8QJjTbpS.js";
|
|
8
8
|
import { _ as ne } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
9
9
|
import { C as te } from "./chunks/layout.DBrUEnal.js";
|
|
10
10
|
import './assets/SearchBar.css';const je = [
|
|
11
11
|
{
|
|
12
12
|
type: "primary",
|
|
13
13
|
label: "查询",
|
|
14
|
-
value:
|
|
14
|
+
value: D.search
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
type: "default",
|
|
18
18
|
label: "重置",
|
|
19
|
-
value:
|
|
19
|
+
value: D.reset,
|
|
20
|
+
plain: !0
|
|
20
21
|
}
|
|
21
22
|
], re = 320, q = {
|
|
22
23
|
__name: "OperationButtons",
|
|
@@ -27,24 +28,25 @@ import './assets/SearchBar.css';const je = [
|
|
|
27
28
|
}
|
|
28
29
|
},
|
|
29
30
|
emits: [f.operation],
|
|
30
|
-
setup(a, { emit:
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
setup(a, { emit: B }) {
|
|
32
|
+
const C = B, u = (h) => {
|
|
33
|
+
C(f.operation, h);
|
|
33
34
|
};
|
|
34
|
-
return (
|
|
35
|
+
return (h, n) => h.$slots.operation ? k(h.$slots, "operation", {
|
|
35
36
|
key: 0,
|
|
36
37
|
operationList: a.operationList
|
|
37
|
-
}) : (
|
|
38
|
+
}) : (i(!0), $(F, { key: 1 }, E(a.operationList, (y) => (i(), c(t(T), {
|
|
38
39
|
key: y.value,
|
|
39
40
|
type: y.type,
|
|
40
41
|
icon: y.icon,
|
|
41
|
-
|
|
42
|
+
plain: y.plain,
|
|
43
|
+
onClick: (e) => u(y.value)
|
|
42
44
|
}, {
|
|
43
45
|
default: r(() => [
|
|
44
|
-
V(
|
|
46
|
+
V(M(y.label), 1)
|
|
45
47
|
]),
|
|
46
48
|
_: 2
|
|
47
|
-
}, 1032, ["type", "icon", "onClick"]))), 128));
|
|
49
|
+
}, 1032, ["type", "icon", "plain", "onClick"]))), 128));
|
|
48
50
|
}
|
|
49
51
|
}, Ae = /* @__PURE__ */ Object.assign({
|
|
50
52
|
name: "FormWrapper"
|
|
@@ -74,7 +76,7 @@ import './assets/SearchBar.css';const je = [
|
|
|
74
76
|
// 标签位置
|
|
75
77
|
labelPosition: {
|
|
76
78
|
type: String,
|
|
77
|
-
default:
|
|
79
|
+
default: P.right
|
|
78
80
|
},
|
|
79
81
|
// 是否显示标签
|
|
80
82
|
showLabel: {
|
|
@@ -99,42 +101,47 @@ import './assets/SearchBar.css';const je = [
|
|
|
99
101
|
minWidth: {
|
|
100
102
|
type: Number,
|
|
101
103
|
default: re
|
|
104
|
+
},
|
|
105
|
+
// 是否固定的宽度
|
|
106
|
+
fixedWidth: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: !1
|
|
102
109
|
}
|
|
103
110
|
},
|
|
104
111
|
emits: [f.change, f.enter],
|
|
105
|
-
setup(a, { expose:
|
|
112
|
+
setup(a, { expose: B }) {
|
|
106
113
|
le((n) => ({
|
|
107
|
-
|
|
114
|
+
v38755745: a.minWidth + "px"
|
|
108
115
|
}));
|
|
109
|
-
const
|
|
110
|
-
return
|
|
111
|
-
validate: (n) =>
|
|
116
|
+
const C = a, u = p(null), h = W(() => C.isFilter ? "filter-form" : C.isFilterPreview ? "filter-preview-form" : C.fixedWidth ? "search-bar-form search-bar-form-fixed" : "search-bar-form");
|
|
117
|
+
return B({
|
|
118
|
+
validate: (n) => u.value ? u.value.validate(n) : Promise.resolve(!0),
|
|
112
119
|
resetFields: () => {
|
|
113
|
-
|
|
120
|
+
u.value && u.value.resetFields();
|
|
114
121
|
},
|
|
115
122
|
clearValidate: (n) => {
|
|
116
|
-
|
|
123
|
+
u.value && u.value.clearValidate(n);
|
|
117
124
|
},
|
|
118
125
|
scrollToField: (n) => {
|
|
119
|
-
|
|
126
|
+
u.value && u.value.scrollToField(n);
|
|
120
127
|
}
|
|
121
|
-
}), (n, y) => (
|
|
128
|
+
}), (n, y) => (i(), c(t(De), {
|
|
122
129
|
ref_key: "formRef",
|
|
123
|
-
ref:
|
|
130
|
+
ref: u,
|
|
124
131
|
model: a.formData,
|
|
125
132
|
"label-width": a.labelWidth,
|
|
126
133
|
"label-position": a.labelPosition,
|
|
127
134
|
inline: a.inline,
|
|
128
135
|
rules: a.rules,
|
|
129
|
-
class:
|
|
130
|
-
[
|
|
136
|
+
class: N({
|
|
137
|
+
[h.value]: !0,
|
|
131
138
|
"items-end display-grid": !a.isFilterPreview
|
|
132
139
|
}),
|
|
133
140
|
onSubmit: y[0] || (y[0] = be(() => {
|
|
134
141
|
}, ["prevent", "stop"]))
|
|
135
142
|
}, {
|
|
136
143
|
default: r(() => [
|
|
137
|
-
(
|
|
144
|
+
(i(!0), $(F, null, E(a.items, (e) => (i(), c(t(oe), g({
|
|
138
145
|
key: e.key,
|
|
139
146
|
label: a.showLabel ? e.label : "",
|
|
140
147
|
prop: e.key,
|
|
@@ -150,7 +157,7 @@ import './assets/SearchBar.css';const je = [
|
|
|
150
157
|
item: e,
|
|
151
158
|
formData: a.formData
|
|
152
159
|
}, () => [
|
|
153
|
-
e.type === t(
|
|
160
|
+
e.type === t(v).text ? (i(), c(t(Z), g({
|
|
154
161
|
key: 0,
|
|
155
162
|
modelValue: a.formData[e.key],
|
|
156
163
|
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
@@ -158,7 +165,7 @@ import './assets/SearchBar.css';const je = [
|
|
|
158
165
|
class: "w-full",
|
|
159
166
|
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key]),
|
|
160
167
|
onKeyup: ge((l) => n.$emit(t(f).enter, e.key, a.formData[e.key]), ["enter"])
|
|
161
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange", "onKeyup"])) : e.type === t(
|
|
168
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange", "onKeyup"])) : e.type === t(v).select ? (i(), c(ze, g({
|
|
162
169
|
key: 1,
|
|
163
170
|
modelValue: a.formData[e.key],
|
|
164
171
|
"onUpdate:modelValue": (l) => a.formData[e.key] = l,
|
|
@@ -166,7 +173,7 @@ import './assets/SearchBar.css';const je = [
|
|
|
166
173
|
}, { ref_for: !0 }, e, {
|
|
167
174
|
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key]),
|
|
168
175
|
class: "w-full"
|
|
169
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "static-options", "onChange"])) : e.type === t(
|
|
176
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "static-options", "onChange"])) : e.type === t(v).date ? (i(), c(t($e), g({
|
|
170
177
|
key: 2,
|
|
171
178
|
modelValue: a.formData[e.key],
|
|
172
179
|
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
@@ -179,60 +186,60 @@ import './assets/SearchBar.css';const je = [
|
|
|
179
186
|
"value-format": e.valueFormat || t(ae).dateTime,
|
|
180
187
|
class: "w-full",
|
|
181
188
|
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
182
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "type", "format", "value-format", "onChange"])) : e.type === t(
|
|
189
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "type", "format", "value-format", "onChange"])) : e.type === t(v).inputNumber ? (i(), c(t(Ee), g({
|
|
183
190
|
key: 3,
|
|
184
191
|
modelValue: a.formData[e.key],
|
|
185
192
|
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
186
193
|
}, { ref_for: !0 }, e, {
|
|
187
194
|
class: "w-full",
|
|
188
195
|
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
189
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(
|
|
196
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(v).switch ? (i(), c(t(xe), g({
|
|
190
197
|
key: 4,
|
|
191
198
|
modelValue: a.formData[e.key],
|
|
192
199
|
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
193
200
|
}, { ref_for: !0 }, e, {
|
|
194
201
|
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
195
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(
|
|
202
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(v).radio ? (i(), c(t(We), {
|
|
196
203
|
key: 5,
|
|
197
204
|
modelValue: a.formData[e.key],
|
|
198
205
|
"onUpdate:modelValue": (l) => a.formData[e.key] = l,
|
|
199
206
|
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
200
207
|
}, {
|
|
201
208
|
default: r(() => [
|
|
202
|
-
(
|
|
209
|
+
(i(!0), $(F, null, E(e.options, (l) => (i(), c(t(Fe), {
|
|
203
210
|
key: l.value,
|
|
204
211
|
label: l.value,
|
|
205
212
|
value: l.value,
|
|
206
213
|
disabled: l.disabled
|
|
207
214
|
}, {
|
|
208
215
|
default: r(() => [
|
|
209
|
-
V(
|
|
216
|
+
V(M(l.label), 1)
|
|
210
217
|
]),
|
|
211
218
|
_: 2
|
|
212
219
|
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
213
220
|
]),
|
|
214
221
|
_: 2
|
|
215
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(
|
|
222
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(v).checkbox ? (i(), c(t(Me), {
|
|
216
223
|
key: 6,
|
|
217
224
|
modelValue: a.formData[e.key],
|
|
218
225
|
"onUpdate:modelValue": (l) => a.formData[e.key] = l,
|
|
219
226
|
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
220
227
|
}, {
|
|
221
228
|
default: r(() => [
|
|
222
|
-
(
|
|
229
|
+
(i(!0), $(F, null, E(e.options, (l) => (i(), c(t(Be), {
|
|
223
230
|
key: l.value,
|
|
224
231
|
label: l.value,
|
|
225
232
|
value: l.value,
|
|
226
233
|
disabled: l.disabled
|
|
227
234
|
}, {
|
|
228
235
|
default: r(() => [
|
|
229
|
-
V(
|
|
236
|
+
V(M(l.label), 1)
|
|
230
237
|
]),
|
|
231
238
|
_: 2
|
|
232
239
|
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
233
240
|
]),
|
|
234
241
|
_: 2
|
|
235
|
-
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(
|
|
242
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(v).textarea ? (i(), c(t(Z), g({
|
|
236
243
|
key: 7,
|
|
237
244
|
modelValue: a.formData[e.key],
|
|
238
245
|
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
@@ -240,11 +247,11 @@ import './assets/SearchBar.css';const je = [
|
|
|
240
247
|
class: "w-full",
|
|
241
248
|
type: "textarea",
|
|
242
249
|
onChange: (l) => n.$emit(t(f).change, e.key, a.formData[e.key])
|
|
243
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(
|
|
250
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onChange"])) : e.type === t(v).upload ? (i(), c(Re, g({
|
|
244
251
|
key: 8,
|
|
245
252
|
modelValue: a.formData[e.key],
|
|
246
253
|
"onUpdate:modelValue": (l) => a.formData[e.key] = l
|
|
247
|
-
}, { ref_for: !0 }, e), null, 16, ["modelValue", "onUpdate:modelValue"])) :
|
|
254
|
+
}, { ref_for: !0 }, e), null, 16, ["modelValue", "onUpdate:modelValue"])) : O("", !0)
|
|
248
255
|
], !0)
|
|
249
256
|
]),
|
|
250
257
|
_: 2
|
|
@@ -254,7 +261,7 @@ import './assets/SearchBar.css';const je = [
|
|
|
254
261
|
_: 3
|
|
255
262
|
}, 8, ["model", "label-width", "label-position", "inline", "rules", "class"]));
|
|
256
263
|
}
|
|
257
|
-
}), G = /* @__PURE__ */ ne(Ae, [["__scopeId", "data-v-
|
|
264
|
+
}), G = /* @__PURE__ */ ne(Ae, [["__scopeId", "data-v-8adcd08b"]]), He = { class: "h-32 w-full" }, Ke = { class: "flex items-center justify-between pd-b-20" }, qe = { class: "text-right" }, Ge = { class: "drawer-header" }, Je = { 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" }, Xe = /* @__PURE__ */ Object.assign({
|
|
258
265
|
name: "SearchBar"
|
|
259
266
|
}, {
|
|
260
267
|
__name: "layout",
|
|
@@ -277,8 +284,8 @@ import './assets/SearchBar.css';const je = [
|
|
|
277
284
|
// 标签位置
|
|
278
285
|
labelPosition: {
|
|
279
286
|
type: String,
|
|
280
|
-
default:
|
|
281
|
-
validator: (a) => [
|
|
287
|
+
default: P.right,
|
|
288
|
+
validator: (a) => [P.left, P.right, P.top].includes(a)
|
|
282
289
|
},
|
|
283
290
|
// 是否可以展开
|
|
284
291
|
isExpand: {
|
|
@@ -303,90 +310,105 @@ import './assets/SearchBar.css';const je = [
|
|
|
303
310
|
filterMode: {
|
|
304
311
|
type: Boolean,
|
|
305
312
|
default: !0
|
|
313
|
+
},
|
|
314
|
+
// 不显示 展开 收起 按钮
|
|
315
|
+
hideExpandButton: {
|
|
316
|
+
type: Boolean,
|
|
317
|
+
default: !0
|
|
318
|
+
},
|
|
319
|
+
// 是否固定的宽度
|
|
320
|
+
fixedWidth: {
|
|
321
|
+
type: Boolean,
|
|
322
|
+
default: !1
|
|
306
323
|
}
|
|
307
324
|
},
|
|
308
325
|
emits: [f.updateModelValue, f.operation, f.change],
|
|
309
|
-
setup(a, { expose:
|
|
326
|
+
setup(a, { expose: B, emit: C }) {
|
|
310
327
|
le((o) => ({
|
|
311
|
-
|
|
312
|
-
|
|
328
|
+
c43334b4: a.maxHeight + "px",
|
|
329
|
+
v002cf482: S.value ? S.value + "px" : "100%"
|
|
313
330
|
}));
|
|
314
|
-
const
|
|
331
|
+
const u = a, h = C, n = p({}), y = p(!u.isExpand), e = p(null), l = p(!1), U = p(!1), z = p(!1), ie = W(() => {
|
|
315
332
|
const o = {};
|
|
316
|
-
return
|
|
317
|
-
if (
|
|
318
|
-
const s = [{ required: !0, message: `${
|
|
319
|
-
typeof
|
|
333
|
+
return u.items.forEach((d) => {
|
|
334
|
+
if (d.required) {
|
|
335
|
+
const s = [{ required: !0, message: `${d.label}不能为空`, trigger: "blur" }];
|
|
336
|
+
typeof d.validator == "function" && s.push({ validator: d.validator, trigger: "blur" }), o[d.key] = s;
|
|
320
337
|
}
|
|
321
338
|
}), o;
|
|
322
|
-
}),
|
|
339
|
+
}), R = W(() => u.items?.filter((o) => !o.hidden) || []), J = W(() => u.filterMode ? R.value?.slice(0, 2) || [] : R.value), I = W(() => u.filterMode ? R.value.slice(2) : []), Q = (o) => {
|
|
323
340
|
n.value = { ...o };
|
|
324
|
-
},
|
|
325
|
-
|
|
326
|
-
}, de = (o,
|
|
327
|
-
n.value[o] =
|
|
328
|
-
|
|
329
|
-
}, 200),
|
|
330
|
-
},
|
|
331
|
-
o &&
|
|
332
|
-
}, se = () => n.value,
|
|
333
|
-
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
}, fe = (o) => e.value.validate(o),
|
|
337
|
-
|
|
341
|
+
}, ue = () => {
|
|
342
|
+
h(f.updateModelValue, { ...n.value });
|
|
343
|
+
}, de = (o, d) => {
|
|
344
|
+
n.value[o] = d, z.value = !0, L(D.search), setTimeout(() => {
|
|
345
|
+
z.value = !1;
|
|
346
|
+
}, 200), j(o, d);
|
|
347
|
+
}, j = (o, d) => {
|
|
348
|
+
o && h(f.change, o, d);
|
|
349
|
+
}, se = () => n.value, A = (o, d) => {
|
|
350
|
+
z.value || h(f.operation, D.search, n.value);
|
|
351
|
+
}, L = (o) => {
|
|
352
|
+
ue(), h(f.operation, o, n.value), (o === D.search || o === D.reset) && (l.value = !1, U.value = !1);
|
|
353
|
+
}, fe = (o) => e.value.validate(o), S = p(0), me = (o) => {
|
|
354
|
+
if (u.fixedWidth) {
|
|
355
|
+
S.value = 132;
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
S.value = o + 32;
|
|
338
359
|
}, ce = () => {
|
|
339
360
|
y.value = !y.value;
|
|
340
361
|
}, ye = () => {
|
|
341
|
-
l.value = !1,
|
|
342
|
-
},
|
|
343
|
-
|
|
362
|
+
l.value = !1, U.value = !0;
|
|
363
|
+
}, he = () => {
|
|
364
|
+
U.value = !1, l.value = !0;
|
|
344
365
|
}, X = p(!1), Y = (o) => {
|
|
345
|
-
X.value = o >
|
|
346
|
-
},
|
|
366
|
+
X.value = o > u.maxHeight;
|
|
367
|
+
}, ve = W(() => u.filterMode || y.value ? "10px" : "0");
|
|
347
368
|
return we(() => {
|
|
348
|
-
Q(
|
|
369
|
+
Q(u.modelValue), Y();
|
|
349
370
|
}), Ve(
|
|
350
|
-
() =>
|
|
371
|
+
() => u.modelValue,
|
|
351
372
|
(o) => {
|
|
352
373
|
Q(o);
|
|
353
374
|
},
|
|
354
375
|
{ immediate: !0, deep: !0 }
|
|
355
|
-
),
|
|
376
|
+
), B({
|
|
356
377
|
validate: fe,
|
|
357
378
|
getFormData: se,
|
|
358
379
|
// clearValidate,
|
|
359
380
|
// resetFields,
|
|
360
381
|
// scrollToField,
|
|
361
382
|
formRef: e
|
|
362
|
-
}), (o,
|
|
363
|
-
class:
|
|
383
|
+
}), (o, d) => (i(), $("div", {
|
|
384
|
+
class: N(["relative overflow-hidden w-full", { flex: a.filterMode }])
|
|
364
385
|
}, [
|
|
365
386
|
w("div", {
|
|
366
|
-
class:
|
|
387
|
+
class: N({
|
|
367
388
|
"is-collapsed overflow-hidden": !y.value
|
|
368
389
|
})
|
|
369
390
|
}, [
|
|
370
391
|
m(t(_), null, {
|
|
371
392
|
default: r(({ height: s }) => [
|
|
372
|
-
V(
|
|
393
|
+
V(M(Y(s)) + " ", 1),
|
|
373
394
|
m(G, {
|
|
374
395
|
ref_key: "formRef",
|
|
375
396
|
ref: e,
|
|
376
397
|
items: J.value,
|
|
377
398
|
"form-data": n.value,
|
|
378
|
-
rules:
|
|
399
|
+
rules: ie.value,
|
|
379
400
|
"label-width": a.labelWidth,
|
|
380
401
|
"label-position": a.labelPosition,
|
|
381
402
|
inline: !0,
|
|
382
403
|
"show-label": !a.filterMode,
|
|
383
404
|
"min-width": a.minWidth,
|
|
384
405
|
"is-filter-preview": a.filterMode,
|
|
406
|
+
fixedWidth: a.fixedWidth,
|
|
385
407
|
onChange: de,
|
|
386
|
-
onEnter:
|
|
387
|
-
},
|
|
408
|
+
onEnter: A
|
|
409
|
+
}, x({
|
|
388
410
|
default: r(() => [
|
|
389
|
-
a.isExpand && !a.filterMode ? (
|
|
411
|
+
a.isExpand && !a.filterMode ? (i(), c(t(oe), {
|
|
390
412
|
key: 0,
|
|
391
413
|
"label-width": "0"
|
|
392
414
|
}, {
|
|
@@ -394,46 +416,47 @@ import './assets/SearchBar.css';const je = [
|
|
|
394
416
|
w("div", He, [
|
|
395
417
|
m(t(_), null, {
|
|
396
418
|
default: r(({ width: b }) => [
|
|
397
|
-
V(
|
|
419
|
+
V(M(me(b)), 1)
|
|
398
420
|
]),
|
|
399
421
|
_: 1
|
|
400
422
|
})
|
|
401
423
|
])
|
|
402
424
|
]),
|
|
403
425
|
_: 1
|
|
404
|
-
})) :
|
|
426
|
+
})) : O("", !0)
|
|
405
427
|
]),
|
|
406
428
|
_: 2
|
|
407
429
|
}, [
|
|
408
|
-
|
|
430
|
+
E(J.value, (b) => ({
|
|
409
431
|
name: b.key,
|
|
410
432
|
fn: r((pe) => [
|
|
411
433
|
k(o.$slots, b.key, H(K(pe)), void 0, !0)
|
|
412
434
|
])
|
|
413
435
|
}))
|
|
414
|
-
]), 1032, ["items", "form-data", "rules", "label-width", "label-position", "show-label", "min-width", "is-filter-preview"])
|
|
436
|
+
]), 1032, ["items", "form-data", "rules", "label-width", "label-position", "show-label", "min-width", "is-filter-preview", "fixedWidth"])
|
|
415
437
|
]),
|
|
416
438
|
_: 3
|
|
417
439
|
})
|
|
418
440
|
], 2),
|
|
419
441
|
w("div", {
|
|
420
|
-
class:
|
|
421
|
-
"absolute right-0
|
|
422
|
-
"text-left": a.filterMode
|
|
442
|
+
class: N(["operation-buttons", {
|
|
443
|
+
"absolute right-0 text-right": a.isExpand && !a.filterMode,
|
|
444
|
+
"text-left": a.filterMode,
|
|
445
|
+
"bg-fff": a.isExpand && !a.filterMode && !a.fixedWidth
|
|
423
446
|
}]),
|
|
424
|
-
style: Ce({ bottom:
|
|
447
|
+
style: Ce({ bottom: ve.value })
|
|
425
448
|
}, [
|
|
426
|
-
a.filterMode ? (
|
|
427
|
-
m(t(
|
|
428
|
-
onClick:
|
|
449
|
+
a.filterMode ? (i(), $(F, { key: 0 }, [
|
|
450
|
+
m(t(T), {
|
|
451
|
+
onClick: d[0] || (d[0] = (s) => L(t(D).reset)),
|
|
429
452
|
type: "default"
|
|
430
453
|
}, {
|
|
431
|
-
default: r(() => [...
|
|
454
|
+
default: r(() => [...d[3] || (d[3] = [
|
|
432
455
|
V("重置", -1)
|
|
433
456
|
])]),
|
|
434
457
|
_: 1
|
|
435
458
|
}),
|
|
436
|
-
|
|
459
|
+
I.value?.length ? (i(), c(t(Ue), {
|
|
437
460
|
key: 0,
|
|
438
461
|
visible: l.value,
|
|
439
462
|
placement: "bottom-start",
|
|
@@ -441,12 +464,12 @@ import './assets/SearchBar.css';const je = [
|
|
|
441
464
|
trigger: "click"
|
|
442
465
|
}, {
|
|
443
466
|
reference: r(() => [
|
|
444
|
-
m(t(
|
|
445
|
-
onClick:
|
|
446
|
-
icon: t(
|
|
467
|
+
m(t(T), {
|
|
468
|
+
onClick: d[1] || (d[1] = (s) => l.value = !l.value),
|
|
469
|
+
icon: t(Pe),
|
|
447
470
|
type: "default"
|
|
448
471
|
}, {
|
|
449
|
-
default: r(() => [...
|
|
472
|
+
default: r(() => [...d[4] || (d[4] = [
|
|
450
473
|
V(" 筛选器 ", -1)
|
|
451
474
|
])]),
|
|
452
475
|
_: 1
|
|
@@ -463,13 +486,13 @@ import './assets/SearchBar.css';const je = [
|
|
|
463
486
|
onClick: ye
|
|
464
487
|
}, {
|
|
465
488
|
default: r(() => [
|
|
466
|
-
m(t(
|
|
489
|
+
m(t(Le))
|
|
467
490
|
]),
|
|
468
491
|
_: 1
|
|
469
492
|
})
|
|
470
493
|
]),
|
|
471
494
|
m(G, {
|
|
472
|
-
items:
|
|
495
|
+
items: I.value,
|
|
473
496
|
"form-data": n.value,
|
|
474
497
|
"label-width": "auto",
|
|
475
498
|
"label-position": "top",
|
|
@@ -478,10 +501,10 @@ import './assets/SearchBar.css';const je = [
|
|
|
478
501
|
"is-filter": !0,
|
|
479
502
|
"min-width": a.minWidth,
|
|
480
503
|
class: "filter-form-popover overflow-y-auto",
|
|
481
|
-
onChange:
|
|
482
|
-
onEnter:
|
|
483
|
-
},
|
|
484
|
-
|
|
504
|
+
onChange: j,
|
|
505
|
+
onEnter: A
|
|
506
|
+
}, x({ _: 2 }, [
|
|
507
|
+
E(I.value, (s) => ({
|
|
485
508
|
name: s.key,
|
|
486
509
|
fn: r((b) => [
|
|
487
510
|
k(o.$slots, s.key, H(K(b)), void 0, !0)
|
|
@@ -491,8 +514,8 @@ import './assets/SearchBar.css';const je = [
|
|
|
491
514
|
w("div", qe, [
|
|
492
515
|
m(q, {
|
|
493
516
|
"operation-list": a.operationList,
|
|
494
|
-
onOperation:
|
|
495
|
-
},
|
|
517
|
+
onOperation: L
|
|
518
|
+
}, x({ _: 2 }, [
|
|
496
519
|
o.$slots.operation ? {
|
|
497
520
|
name: "operation",
|
|
498
521
|
fn: r(({ operationList: s }) => [
|
|
@@ -504,23 +527,23 @@ import './assets/SearchBar.css';const je = [
|
|
|
504
527
|
])
|
|
505
528
|
]),
|
|
506
529
|
_: 3
|
|
507
|
-
}, 8, ["visible"])) :
|
|
508
|
-
], 64)) : (
|
|
509
|
-
X.value && a.isExpand ? (
|
|
530
|
+
}, 8, ["visible"])) : O("", !0)
|
|
531
|
+
], 64)) : (i(), $(F, { key: 1 }, [
|
|
532
|
+
X.value && a.isExpand && a.hideExpandButton ? (i(), c(t(T), {
|
|
510
533
|
key: 0,
|
|
511
534
|
icon: y.value ? t(Se) : t(Ne),
|
|
512
535
|
text: "",
|
|
513
536
|
onClick: ce
|
|
514
537
|
}, {
|
|
515
538
|
default: r(() => [
|
|
516
|
-
V(
|
|
539
|
+
V(M(y.value ? "收起" : "展开"), 1)
|
|
517
540
|
]),
|
|
518
541
|
_: 1
|
|
519
|
-
}, 8, ["icon"])) :
|
|
542
|
+
}, 8, ["icon"])) : O("", !0),
|
|
520
543
|
m(q, {
|
|
521
544
|
"operation-list": a.operationList,
|
|
522
|
-
onOperation:
|
|
523
|
-
},
|
|
545
|
+
onOperation: L
|
|
546
|
+
}, x({ _: 2 }, [
|
|
524
547
|
o.$slots.operation ? {
|
|
525
548
|
name: "operation",
|
|
526
549
|
fn: r(({ operationList: s }) => [
|
|
@@ -531,9 +554,9 @@ import './assets/SearchBar.css';const je = [
|
|
|
531
554
|
]), 1032, ["operation-list"])
|
|
532
555
|
], 64))
|
|
533
556
|
], 6),
|
|
534
|
-
m(t(
|
|
535
|
-
modelValue:
|
|
536
|
-
"onUpdate:modelValue":
|
|
557
|
+
m(t(Ie), {
|
|
558
|
+
modelValue: U.value,
|
|
559
|
+
"onUpdate:modelValue": d[2] || (d[2] = (s) => U.value = s),
|
|
537
560
|
size: "628",
|
|
538
561
|
"show-close": !1
|
|
539
562
|
}, {
|
|
@@ -545,7 +568,7 @@ import './assets/SearchBar.css';const je = [
|
|
|
545
568
|
}),
|
|
546
569
|
m(t(ee), {
|
|
547
570
|
size: 16,
|
|
548
|
-
onClick:
|
|
571
|
+
onClick: he,
|
|
549
572
|
class: "shrink-button"
|
|
550
573
|
}, {
|
|
551
574
|
default: r(() => [
|
|
@@ -558,7 +581,7 @@ import './assets/SearchBar.css';const je = [
|
|
|
558
581
|
default: r(() => [
|
|
559
582
|
w("div", Je, [
|
|
560
583
|
m(G, {
|
|
561
|
-
items:
|
|
584
|
+
items: I.value,
|
|
562
585
|
"form-data": n.value,
|
|
563
586
|
"label-width": "auto",
|
|
564
587
|
"label-position": "top",
|
|
@@ -566,10 +589,10 @@ import './assets/SearchBar.css';const je = [
|
|
|
566
589
|
"show-label": !0,
|
|
567
590
|
"is-filter": !0,
|
|
568
591
|
"min-width": a.minWidth,
|
|
569
|
-
onChange:
|
|
570
|
-
onEnter:
|
|
571
|
-
},
|
|
572
|
-
|
|
592
|
+
onChange: j,
|
|
593
|
+
onEnter: A
|
|
594
|
+
}, x({ _: 2 }, [
|
|
595
|
+
E(I.value, (s) => ({
|
|
573
596
|
name: s.key,
|
|
574
597
|
fn: r((b) => [
|
|
575
598
|
k(o.$slots, s.key, H(K(b)), void 0, !0)
|
|
@@ -580,8 +603,8 @@ import './assets/SearchBar.css';const je = [
|
|
|
580
603
|
w("div", Qe, [
|
|
581
604
|
m(q, {
|
|
582
605
|
"operation-list": a.operationList,
|
|
583
|
-
onOperation:
|
|
584
|
-
},
|
|
606
|
+
onOperation: L
|
|
607
|
+
}, x({ _: 2 }, [
|
|
585
608
|
o.$slots.operation ? {
|
|
586
609
|
name: "operation",
|
|
587
610
|
fn: r(({ operationList: s }) => [
|
|
@@ -596,8 +619,8 @@ import './assets/SearchBar.css';const je = [
|
|
|
596
619
|
}, 8, ["modelValue"])
|
|
597
620
|
], 2));
|
|
598
621
|
}
|
|
599
|
-
}), Ye = /* @__PURE__ */ ne(Xe, [["__scopeId", "data-v-
|
|
622
|
+
}), Ye = /* @__PURE__ */ ne(Xe, [["__scopeId", "data-v-3877c183"]]), ia = ke(Ye);
|
|
600
623
|
export {
|
|
601
|
-
|
|
602
|
-
|
|
624
|
+
ia as SearchBar,
|
|
625
|
+
ia as default
|
|
603
626
|
};
|