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