yahee-components 0.0.68 → 0.0.70

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