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.
Files changed (52) hide show
  1. package/es/BatchImport.mjs +1 -1
  2. package/es/FileList.mjs +1 -1
  3. package/es/IconRenderer.mjs +1 -1
  4. package/es/IconSelect.mjs +1 -1
  5. package/es/SearchBar.mjs +154 -131
  6. package/es/TreeSelect.mjs +7 -0
  7. package/es/TreeShowSelect.mjs +82 -0
  8. package/es/UploadFile.mjs +1 -1
  9. package/es/assets/SearchBar.css +1 -1
  10. package/es/assets/TreeShowSelect.css +1 -0
  11. package/es/assets/layout2.css +1 -1
  12. package/es/assets/layout3.css +1 -1
  13. package/es/assets/layout4.css +1 -0
  14. package/es/chunks/{config.DH2xMnlY.js → config.ERg0IgVD.js} +1 -1
  15. package/es/chunks/{global.DV6e9_12.js → global.BZl4v5js.js} +1182 -1158
  16. package/es/chunks/{layout.CyhEs923.js → layout.8QJjTbpS.js} +2 -2
  17. package/es/chunks/layout.8gJfLTP4.js +404 -0
  18. package/es/chunks/{layout.sb1tpZ1W.js → layout.CI0rHTkg.js} +1 -1
  19. package/es/chunks/layout.DQ1xjWEm.js +406 -0
  20. package/es/index.mjs +36 -30
  21. package/lib/BatchImport.js +1 -1
  22. package/lib/FileList.js +1 -1
  23. package/lib/IconRenderer.js +1 -1
  24. package/lib/IconSelect.js +1 -1
  25. package/lib/SearchBar.js +1 -1
  26. package/lib/TreeSelect.js +1 -0
  27. package/lib/TreeShowSelect.js +1 -0
  28. package/lib/UploadFile.js +1 -1
  29. package/lib/assets/SearchBar.css +1 -1
  30. package/lib/assets/TreeShowSelect.css +1 -0
  31. package/lib/assets/layout2.css +1 -1
  32. package/lib/assets/layout3.css +1 -1
  33. package/lib/assets/layout4.css +1 -0
  34. package/lib/chunks/{config.DPp4ti8p.js → config.B0eqERf5.js} +1 -1
  35. package/lib/chunks/global.BeZ3Ue5-.js +1 -0
  36. package/lib/chunks/{layout.CacUgLUZ.js → layout.BaKyR150.js} +1 -1
  37. package/lib/chunks/layout.BhOA_UzD.js +1 -0
  38. package/lib/chunks/layout.C_5ri7PW.js +1 -0
  39. package/lib/chunks/{layout.C8IKkahl.js → layout.whToBh0O.js} +1 -1
  40. package/lib/index.js +1 -1
  41. package/package.json +10 -9
  42. package/es/chunks/layout.BLCGmWdA.js +0 -149
  43. package/es/chunks/layout.BaKXshGh.js +0 -149
  44. package/es/chunks/layout.BqkEUrff.js +0 -230
  45. package/es/chunks/layout.D5DtDgGV.js +0 -230
  46. package/es/chunks/layout.wck_IDgd.js +0 -121
  47. package/lib/chunks/global.BwF3T7mN.js +0 -1
  48. package/lib/chunks/layout.BQdjwrgQ.js +0 -1
  49. package/lib/chunks/layout.ChIHPtyu.js +0 -1
  50. package/lib/chunks/layout.DTs74_a_.js +0 -1
  51. package/lib/chunks/layout.sSLT3tUN.js +0 -1
  52. 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 D, openBlock as u, Fragment as M, renderList as $, createBlock as c, unref as t, withCtx as r, createTextVNode as V, toDisplayString as U, useCssVars as le, ref as p, computed as x, withModifiers as 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 F, 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 Fe, ElRadioGroup as xe, ElRadio as Me, ElCheckboxGroup as Ue, ElCheckbox as Ie, ElAutoResizer as _, ElPopover as Le, ElIcon as ee, ElDrawer as Pe } from "element-plus";
4
- import { IconMagnify as We, IconCheck as Be, IconUp as Se, IconDown as Ne, IconShrink as Oe } from "color-message-lingyun-vue";
5
- import { operationConfigMap as C, emitsMap as f, labelPositionMap as B, componentType as h, dateParamsMap as Te, dateFormat as ae } from "color-star-custom-methods";
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.CyhEs923.js";
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: C.search
14
+ value: D.search
15
15
  },
16
16
  {
17
17
  type: "default",
18
18
  label: "重置",
19
- value: C.reset
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: I }) {
31
- const E = I, d = (v) => {
32
- E(f.operation, v);
31
+ setup(a, { emit: B }) {
32
+ const C = B, u = (h) => {
33
+ C(f.operation, h);
33
34
  };
34
- return (v, n) => v.$slots.operation ? k(v.$slots, "operation", {
35
+ return (h, n) => h.$slots.operation ? k(h.$slots, "operation", {
35
36
  key: 0,
36
37
  operationList: a.operationList
37
- }) : (u(!0), D(M, { key: 1 }, $(a.operationList, (y) => (u(), c(t(O), {
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
- onClick: (e) => d(y.value)
42
+ plain: y.plain,
43
+ onClick: (e) => u(y.value)
42
44
  }, {
43
45
  default: r(() => [
44
- V(U(y.label), 1)
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: B.right
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: I }) {
112
+ setup(a, { expose: B }) {
106
113
  le((n) => ({
107
- b2949608: a.minWidth + "px"
114
+ v38755745: a.minWidth + "px"
108
115
  }));
109
- const E = a, d = p(null), v = x(() => E.isFilter ? "filter-form" : E.isFilterPreview ? "filter-preview-form" : "search-bar-form");
110
- return I({
111
- validate: (n) => d.value ? d.value.validate(n) : Promise.resolve(!0),
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
- d.value && d.value.resetFields();
120
+ u.value && u.value.resetFields();
114
121
  },
115
122
  clearValidate: (n) => {
116
- d.value && d.value.clearValidate(n);
123
+ u.value && u.value.clearValidate(n);
117
124
  },
118
125
  scrollToField: (n) => {
119
- d.value && d.value.scrollToField(n);
126
+ u.value && u.value.scrollToField(n);
120
127
  }
121
- }), (n, y) => (u(), c(t(De), {
128
+ }), (n, y) => (i(), c(t(De), {
122
129
  ref_key: "formRef",
123
- ref: d,
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: S({
130
- [v.value]: !0,
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
- (u(!0), D(M, null, $(a.items, (e) => (u(), c(t(oe), g({
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(h).text ? (u(), c(t(Z), g({
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(h).select ? (u(), c(ze, g({
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(h).date ? (u(), c(t($e), g({
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(h).inputNumber ? (u(), c(t(Ee), g({
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(h).switch ? (u(), c(t(Fe), g({
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(h).radio ? (u(), c(t(xe), {
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
- (u(!0), D(M, null, $(e.options, (l) => (u(), c(t(Me), {
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(U(l.label), 1)
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(h).checkbox ? (u(), c(t(Ue), {
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
- (u(!0), D(M, null, $(e.options, (l) => (u(), c(t(Ie), {
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(U(l.label), 1)
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(h).textarea ? (u(), c(t(Z), g({
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(h).upload ? (u(), c(Re, g({
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"])) : N("", !0)
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-d3b8ab89"]]), 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({
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: B.right,
281
- validator: (a) => [B.left, B.right, B.top].includes(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: I, emit: E }) {
326
+ setup(a, { expose: B, emit: C }) {
310
327
  le((o) => ({
311
- v47131aef: a.maxHeight + "px",
312
- v246bd619: A.value ? A.value + "px" : "100%"
328
+ c43334b4: a.maxHeight + "px",
329
+ v002cf482: S.value ? S.value + "px" : "100%"
313
330
  }));
314
- const d = a, v = E, n = p({}), y = p(!d.isExpand), e = p(null), l = p(!1), L = p(!1), T = p(!1), ue = x(() => {
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 d.items.forEach((i) => {
317
- if (i.required) {
318
- const s = [{ required: !0, message: `${i.label}不能为空`, trigger: "blur" }];
319
- typeof i.validator == "function" && s.push({ validator: i.validator, trigger: "blur" }), o[i.key] = s;
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
- }), z = x(() => d.items?.filter((o) => !o.hidden) || []), J = x(() => d.filterMode ? z.value?.slice(0, 2) || [] : z.value), P = x(() => d.filterMode ? z.value.slice(2) : []), Q = (o) => {
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
- }, ie = () => {
325
- v(f.updateModelValue, { ...n.value });
326
- }, de = (o, i) => {
327
- n.value[o] = i, T.value = !0, W(C.search), setTimeout(() => {
328
- T.value = !1;
329
- }, 200), R(o, i);
330
- }, R = (o, i) => {
331
- o && v(f.change, o, i);
332
- }, se = () => n.value, j = (o, i) => {
333
- T.value || v(f.operation, C.search, n.value);
334
- }, W = (o) => {
335
- ie(), v(f.operation, o, n.value), (o === C.search || o === C.reset) && (l.value = !1, L.value = !1);
336
- }, fe = (o) => e.value.validate(o), A = p(0), me = (o) => {
337
- A.value = o + 32;
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, L.value = !0;
342
- }, ve = () => {
343
- L.value = !1, l.value = !0;
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 > d.maxHeight;
346
- }, he = x(() => d.filterMode || y.value ? "10px" : "0");
366
+ X.value = o > u.maxHeight;
367
+ }, ve = W(() => u.filterMode || y.value ? "10px" : "0");
347
368
  return we(() => {
348
- Q(d.modelValue), Y();
369
+ Q(u.modelValue), Y();
349
370
  }), Ve(
350
- () => d.modelValue,
371
+ () => u.modelValue,
351
372
  (o) => {
352
373
  Q(o);
353
374
  },
354
375
  { immediate: !0, deep: !0 }
355
- ), I({
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, i) => (u(), D("div", {
363
- class: S(["relative overflow-hidden w-full", { flex: a.filterMode }])
383
+ }), (o, d) => (i(), $("div", {
384
+ class: N(["relative overflow-hidden w-full", { flex: a.filterMode }])
364
385
  }, [
365
386
  w("div", {
366
- class: S({
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(U(Y(s)) + " ", 1),
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: ue.value,
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: j
387
- }, F({
408
+ onEnter: A
409
+ }, x({
388
410
  default: r(() => [
389
- a.isExpand && !a.filterMode ? (u(), c(t(oe), {
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(U(me(b)), 1)
419
+ V(M(me(b)), 1)
398
420
  ]),
399
421
  _: 1
400
422
  })
401
423
  ])
402
424
  ]),
403
425
  _: 1
404
- })) : N("", !0)
426
+ })) : O("", !0)
405
427
  ]),
406
428
  _: 2
407
429
  }, [
408
- $(J.value, (b) => ({
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: S(["operation-buttons", {
421
- "absolute right-0 bg-fff text-right": a.isExpand && !a.filterMode,
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: he.value })
447
+ style: Ce({ bottom: ve.value })
425
448
  }, [
426
- a.filterMode ? (u(), D(M, { key: 0 }, [
427
- m(t(O), {
428
- onClick: i[0] || (i[0] = (s) => W(t(C).reset)),
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(() => [...i[3] || (i[3] = [
454
+ default: r(() => [...d[3] || (d[3] = [
432
455
  V("重置", -1)
433
456
  ])]),
434
457
  _: 1
435
458
  }),
436
- P.value?.length ? (u(), c(t(Le), {
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(O), {
445
- onClick: i[1] || (i[1] = (s) => l.value = !l.value),
446
- icon: t(Be),
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(() => [...i[4] || (i[4] = [
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(We))
489
+ m(t(Le))
467
490
  ]),
468
491
  _: 1
469
492
  })
470
493
  ]),
471
494
  m(G, {
472
- items: P.value,
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: R,
482
- onEnter: j
483
- }, F({ _: 2 }, [
484
- $(P.value, (s) => ({
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: W
495
- }, F({ _: 2 }, [
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"])) : N("", !0)
508
- ], 64)) : (u(), D(M, { key: 1 }, [
509
- X.value && a.isExpand ? (u(), c(t(O), {
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(U(y.value ? "收起" : "展开"), 1)
539
+ V(M(y.value ? "收起" : "展开"), 1)
517
540
  ]),
518
541
  _: 1
519
- }, 8, ["icon"])) : N("", !0),
542
+ }, 8, ["icon"])) : O("", !0),
520
543
  m(q, {
521
544
  "operation-list": a.operationList,
522
- onOperation: W
523
- }, F({ _: 2 }, [
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(Pe), {
535
- modelValue: L.value,
536
- "onUpdate:modelValue": i[2] || (i[2] = (s) => L.value = s),
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: ve,
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: P.value,
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: R,
570
- onEnter: j
571
- }, F({ _: 2 }, [
572
- $(P.value, (s) => ({
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: W
584
- }, F({ _: 2 }, [
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-d9cc1410"]]), ua = ke(Ye);
622
+ }), Ye = /* @__PURE__ */ ne(Xe, [["__scopeId", "data-v-3877c183"]]), ia = ke(Ye);
600
623
  export {
601
- ua as SearchBar,
602
- ua as default
624
+ ia as SearchBar,
625
+ ia as default
603
626
  };
@@ -0,0 +1,7 @@
1
+ import { w as e } from "./chunks/index.bCzIhWFw.js";
2
+ import { T as t } from "./chunks/layout.DQ1xjWEm.js";
3
+ const a = e(t);
4
+ export {
5
+ a as TreeSelect,
6
+ a as default
7
+ };