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