yahee-components 0.0.50 → 0.0.52

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.
@@ -1,7 +1,7 @@
1
- import { defineComponent as te, mergeDefaults as oe, toRefs as re, ref as c, createBlock as d, openBlock as s, unref as l, withCtx as t, createElementVNode as x, createVNode as o, withKeys as se, createSlots as ue, createElementBlock as y, Fragment as b, renderList as g, createCommentVNode as z, createTextVNode as C, toDisplayString as V } from "vue";
1
+ import { defineComponent as te, mergeDefaults as oe, toRefs as re, ref as i, createBlock as d, openBlock as u, unref as l, withCtx as t, createElementVNode as x, createVNode as o, withKeys as se, createSlots as ue, createElementBlock as y, Fragment as C, renderList as b, createCommentVNode as L, createTextVNode as S, toDisplayString as V } from "vue";
2
2
  import T from "../_virtual/lodash.js";
3
3
  import { defaultComplexSearchProps as ne } from "./props.js";
4
- import { ElConfigProvider as ie, ElInput as G, ElIcon as ce, ElSelect as k, ElOption as S, ElCheckbox as de, ElLink as pe, ElDialog as me, ElForm as he, ElRow as D, ElFormItem as L, ElButton as N } from "element-plus";
4
+ import { ElConfigProvider as ce, ElInput as R, ElIcon as ie, ElSelect as k, ElOption as g, ElCheckbox as de, ElLink as pe, ElDialog as me, ElForm as he, ElRow as W, ElFormItem as z, ElButton as G } from "element-plus";
5
5
  import "element-plus/theme-chalk/src/base.scss";
6
6
  import "element-plus/theme-chalk/src/input.scss";
7
7
  import "element-plus/theme-chalk/src/checkbox.scss";
@@ -21,7 +21,7 @@ import "element-plus/theme-chalk/src/link.scss";
21
21
  import "element-plus/theme-chalk/src/config-provider.scss";
22
22
  import { Search as fe } from "@element-plus/icons-vue";
23
23
  import ve from "../node_modules/.pnpm/element-plus@2.9.7_vue@3.5.13_typescript@5.8.3_/node_modules/element-plus/es/locale/lang/zh-cn.js";
24
- const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbox" }, ge = { class: "dialog-footer" }, qe = /* @__PURE__ */ te({
24
+ const ye = { class: "yahee-complex-search" }, Ce = { class: "search-type-checkbox" }, be = { class: "dialog-footer" }, Ne = /* @__PURE__ */ te({
25
25
  name: "YaheeComplexSearch",
26
26
  __name: "complex-search",
27
27
  props: /* @__PURE__ */ oe({
@@ -37,100 +37,105 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
37
37
  searchItem: {}
38
38
  }, ne()),
39
39
  emits: ["filterChangeGrandson"],
40
- setup(R, { emit: W }) {
41
- const q = ve, m = W, X = R, {
42
- defaultSearch: Y,
40
+ setup(H, { emit: D }) {
41
+ const N = ve, m = D, A = H, {
42
+ defaultSearch: q,
43
43
  pasteFormat: F,
44
- options: B,
45
- showPatchSearch: j,
46
- specialOptions: P,
47
- showWithinFilterCheckbox: A,
48
- placeholderText: H,
44
+ options: O,
45
+ showPatchSearch: X,
46
+ specialOptions: B,
47
+ showWithinFilterCheckbox: Y,
48
+ placeholderText: j,
49
49
  normalOptions: J,
50
- showSelect: K,
50
+ showSelect: P,
51
51
  searchItem: n
52
- } = re(X), u = c(Y.value || "integrated"), h = c(""), f = c(!1), w = c(!1), v = c(!1), O = c(null), r = c({ searchType: "integrated", searchContent: "" }), M = {
52
+ } = re(A), r = i(q.value || "WHOLE_SEARCH"), h = i(""), f = i(!1), E = i(!1), v = i(!1), _ = i(null), s = i({ searchType: "WHOLE_SEARCH", searchContent: "" }), M = {
53
53
  selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
54
54
  searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
55
- }, U = [
55
+ }, K = [
56
56
  {
57
- value: "integrated",
57
+ value: "WHOLE_SEARCH",
58
58
  label: "综合搜索"
59
59
  }
60
60
  ], Q = () => {
61
61
  v.value = !0;
62
- }, I = () => {
62
+ }, U = () => {
63
63
  v.value = !1;
64
64
  }, Z = () => {
65
- f.value || (delete n.value.putSearch, m("filterChangeGrandson", n.value, u.value));
66
- }, $ = () => n.value, E = () => {
67
- h.value ? le() : m("filterChangeGrandson", $(), u.value);
65
+ f.value || (delete n.value.putSearch, m("filterChangeGrandson", n.value, r.value));
66
+ }, $ = () => n.value, w = () => {
67
+ h.value ? le() : m("filterChangeGrandson", $(), r.value);
68
68
  }, ee = (p, a) => {
69
69
  const e = { ...p };
70
- return T.map(P.value, (i) => i.key).includes(a.filterKey) ? P.value.forEach((i) => delete e[i.key]) : delete e[a.filterKey], e;
70
+ return T.map(B.value, (c) => c.key).includes(a.filterKey) ? B.value.forEach((c) => delete e[c.key]) : delete e[a.filterKey], e;
71
71
  };
72
- function _(p) {
72
+ function I(p) {
73
73
  T.forEach(p, (a) => {
74
74
  ee(n.value, a);
75
- const { checkedValues: e, filterKey: i } = a;
76
- T.isEmpty(e) || (J.value.includes(i) ? n.value[i] = e[0] : n.value[i] = e);
77
- }), m("filterChangeGrandson", n.value, u.value);
75
+ const { checkedValues: e, filterKey: c } = a;
76
+ T.isEmpty(e) || (J.value.includes(c) ? n.value[c] = e[0] : n.value[c] = e);
77
+ }), m("filterChangeGrandson", n.value, r.value);
78
78
  }
79
79
  const le = () => {
80
- f.value ? _([
80
+ f.value ? I([
81
81
  {
82
82
  filterKey: "putSearch",
83
83
  checkedValues: h.value
84
+ },
85
+ {
86
+ filterKey: "searchType",
87
+ checkedValues: r.value
84
88
  }
85
89
  ]) : m(
86
90
  "filterChangeGrandson",
87
91
  {
88
- putSearch: h.value
92
+ putSearch: h.value,
93
+ searchType: r.value
89
94
  },
90
- u.value
95
+ r.value
91
96
  );
92
97
  }, ae = () => {
93
- O.value.validate((p) => {
94
- p && (w.value = !0, f.value ? _([
98
+ _.value.validate((p) => {
99
+ p && (E.value = !0, f.value ? I([
95
100
  {
96
101
  filterKey: "putSearch",
97
- checkedValues: r.value.searchContent
102
+ checkedValues: s.value.searchContent
98
103
  },
99
104
  {
100
105
  filterKey: "searchType",
101
- checkedValues: r.value.searchType
106
+ checkedValues: s.value.searchType
102
107
  }
103
108
  ]) : m(
104
109
  "filterChangeGrandson",
105
110
  {
106
- putSearch: r.value.searchContent,
107
- searchType: r.value.searchType
111
+ putSearch: s.value.searchContent,
112
+ searchType: s.value.searchType
108
113
  },
109
- u.value
110
- ), v.value = !1, w.value = !1);
114
+ r.value
115
+ ), v.value = !1, E.value = !1);
111
116
  });
112
117
  };
113
- return (p, a) => (s(), d(l(ie), { locale: l(q) }, {
118
+ return (p, a) => (u(), d(l(ce), { locale: l(N) }, {
114
119
  default: t(() => [
115
120
  x("div", ye, [
116
- o(l(G), {
121
+ o(l(R), {
117
122
  modelValue: h.value,
118
123
  "onUpdate:modelValue": a[2] || (a[2] = (e) => h.value = e),
119
- placeholder: l(H),
124
+ placeholder: l(j),
120
125
  class: "input-with-select",
121
126
  clearable: "",
122
127
  maxlength: "30",
123
- onChange: E,
124
- onKeyup: se(E, ["enter"]),
128
+ onChange: w,
129
+ onKeyup: se(w, ["enter"]),
125
130
  onPaste: l(F)
126
131
  }, ue({
127
132
  append: t(() => [
128
- o(l(ce), {
133
+ o(l(ie), {
129
134
  size: "12",
130
135
  color: "#3366cc",
131
136
  style: { cursor: "pointer" },
132
137
  class: "icon-cusor",
133
- onClick: E
138
+ onClick: w
134
139
  }, {
135
140
  default: t(() => [
136
141
  o(l(fe))
@@ -140,17 +145,17 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
140
145
  ]),
141
146
  _: 2
142
147
  }, [
143
- l(K) ? {
148
+ l(P) ? {
144
149
  name: "prepend",
145
150
  fn: t(() => [
146
151
  o(l(k), {
147
- modelValue: u.value,
148
- "onUpdate:modelValue": a[0] || (a[0] = (e) => u.value = e),
152
+ modelValue: r.value,
153
+ "onUpdate:modelValue": a[0] || (a[0] = (e) => r.value = e),
149
154
  size: "small",
150
155
  class: "custom-select"
151
156
  }, {
152
157
  default: t(() => [
153
- (s(!0), y(b, null, g(l(B), (e) => (s(), d(l(S), {
158
+ (u(!0), y(C, null, b(l(O), (e) => (u(), d(l(g), {
154
159
  key: e.label,
155
160
  label: e.label,
156
161
  value: e.value
@@ -164,14 +169,14 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
164
169
  name: "prepend",
165
170
  fn: t(() => [
166
171
  o(l(k), {
167
- modelValue: u.value,
168
- "onUpdate:modelValue": a[1] || (a[1] = (e) => u.value = e),
172
+ modelValue: r.value,
173
+ "onUpdate:modelValue": a[1] || (a[1] = (e) => r.value = e),
169
174
  size: "small",
170
175
  class: "custom-select",
171
176
  disabled: ""
172
177
  }, {
173
178
  default: t(() => [
174
- (s(), y(b, null, g(U, (e) => o(l(S), {
179
+ (u(), y(C, null, b(K, (e) => o(l(g), {
175
180
  key: e.label,
176
181
  label: e.label,
177
182
  value: e.value
@@ -183,28 +188,28 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
183
188
  key: "1"
184
189
  }
185
190
  ]), 1032, ["modelValue", "placeholder", "onPaste"]),
186
- x("div", be, [
187
- l(A) ? (s(), d(l(de), {
191
+ x("div", Ce, [
192
+ l(Y) ? (u(), d(l(de), {
188
193
  key: 0,
189
194
  modelValue: f.value,
190
195
  "onUpdate:modelValue": a[3] || (a[3] = (e) => f.value = e),
191
196
  onChange: Z
192
197
  }, {
193
198
  default: t(() => a[8] || (a[8] = [
194
- C(V("在筛选条件内查询"))
199
+ S(V("在筛选条件内查询"))
195
200
  ])),
196
201
  _: 1
197
- }, 8, ["modelValue"])) : z("", !0),
198
- l(j) ? (s(), d(l(pe), {
202
+ }, 8, ["modelValue"])) : L("", !0),
203
+ l(X) ? (u(), d(l(pe), {
199
204
  key: 1,
200
205
  type: "primary",
201
206
  onClick: Q
202
207
  }, {
203
208
  default: t(() => a[9] || (a[9] = [
204
- C(V("批量查询"))
209
+ S(V("批量查询"))
205
210
  ])),
206
211
  _: 1
207
- })) : z("", !0)
212
+ })) : L("", !0)
208
213
  ])
209
214
  ]),
210
215
  o(l(me), {
@@ -212,25 +217,25 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
212
217
  "onUpdate:modelValue": a[7] || (a[7] = (e) => v.value = e),
213
218
  title: "批量查询",
214
219
  width: "30%",
215
- "before-close": I,
220
+ "before-close": U,
216
221
  "append-to-body": !0,
217
222
  draggable: ""
218
223
  }, {
219
224
  footer: t(() => [
220
- x("div", ge, [
221
- o(l(N), {
225
+ x("div", be, [
226
+ o(l(G), {
222
227
  type: "primary",
223
- loading: w.value,
228
+ loading: E.value,
224
229
  onClick: ae
225
230
  }, {
226
231
  default: t(() => a[10] || (a[10] = [
227
- C(V("确认"))
232
+ S(V("确认"))
228
233
  ])),
229
234
  _: 1
230
235
  }, 8, ["loading"]),
231
- o(l(N), { onClick: I }, {
236
+ o(l(G), { onClick: U }, {
232
237
  default: t(() => a[11] || (a[11] = [
233
- C(V("关闭"))
238
+ S(V("关闭"))
234
239
  ])),
235
240
  _: 1
236
241
  })
@@ -239,40 +244,40 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
239
244
  default: t(() => [
240
245
  o(l(he), {
241
246
  ref_key: "batchSearchFormRef",
242
- ref: O,
243
- model: r.value,
247
+ ref: _,
248
+ model: s.value,
244
249
  rules: M
245
250
  }, {
246
251
  default: t(() => [
247
- o(l(D), { class: "row-class" }, {
252
+ o(l(W), { class: "row-class" }, {
248
253
  default: t(() => [
249
- o(l(L), { prop: "searchType" }, {
254
+ o(l(z), { prop: "searchType" }, {
250
255
  default: t(() => [
251
- l(K) ? (s(), d(l(k), {
256
+ l(P) ? (u(), d(l(k), {
252
257
  key: 0,
253
- modelValue: r.value.searchType,
254
- "onUpdate:modelValue": a[4] || (a[4] = (e) => r.value.searchType = e),
258
+ modelValue: s.value.searchType,
259
+ "onUpdate:modelValue": a[4] || (a[4] = (e) => s.value.searchType = e),
255
260
  size: "small",
256
261
  style: { width: "95px", "background-color": "white" }
257
262
  }, {
258
263
  default: t(() => [
259
- (s(!0), y(b, null, g(l(B), (e) => (s(), d(l(S), {
264
+ (u(!0), y(C, null, b(l(O), (e) => (u(), d(l(g), {
260
265
  key: e.label,
261
266
  label: e.label,
262
267
  value: e.value
263
268
  }, null, 8, ["label", "value"]))), 128))
264
269
  ]),
265
270
  _: 1
266
- }, 8, ["modelValue"])) : (s(), d(l(k), {
271
+ }, 8, ["modelValue"])) : (u(), d(l(k), {
267
272
  key: 1,
268
- modelValue: r.value.searchType,
269
- "onUpdate:modelValue": a[5] || (a[5] = (e) => r.value.searchType = e),
273
+ modelValue: s.value.searchType,
274
+ "onUpdate:modelValue": a[5] || (a[5] = (e) => s.value.searchType = e),
270
275
  size: "small",
271
276
  style: { width: "95px", "background-color": "white" },
272
277
  disabled: ""
273
278
  }, {
274
279
  default: t(() => [
275
- (s(), y(b, null, g(U, (e) => o(l(S), {
280
+ (u(), y(C, null, b(K, (e) => o(l(g), {
276
281
  key: e.label,
277
282
  label: e.label,
278
283
  value: e.value
@@ -286,16 +291,16 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
286
291
  ]),
287
292
  _: 1
288
293
  }),
289
- o(l(D), { class: "row-class" }, {
294
+ o(l(W), { class: "row-class" }, {
290
295
  default: t(() => [
291
- o(l(L), {
296
+ o(l(z), {
292
297
  prop: "searchContent",
293
298
  style: { width: "100%" }
294
299
  }, {
295
300
  default: t(() => [
296
- o(l(G), {
297
- modelValue: r.value.searchContent,
298
- "onUpdate:modelValue": a[6] || (a[6] = (e) => r.value.searchContent = e),
301
+ o(l(R), {
302
+ modelValue: s.value.searchContent,
303
+ "onUpdate:modelValue": a[6] || (a[6] = (e) => s.value.searchContent = e),
299
304
  placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
300
305
  type: "textarea",
301
306
  rows: 5,
@@ -319,5 +324,5 @@ const ye = { class: "yahee-complex-search" }, be = { class: "search-type-checkbo
319
324
  }
320
325
  });
321
326
  export {
322
- qe as default
327
+ Ne as default
323
328
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.50",
4
+ "version": "0.0.52",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",