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