yahee-components 0.0.14 → 0.0.16

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,6 +1,6 @@
1
- import { defineComponent as ae, toRefs as oe, ref as i, reactive as re, openBlock as c, createBlock as f, unref as l, withCtx as a, createElementVNode as C, createVNode as o, withKeys as se, createElementBlock as T, Fragment as _, renderList as P, createTextVNode as g, toDisplayString as v, createCommentVNode as I } from "vue";
1
+ import { defineComponent as oe, toRefs as re, ref as c, reactive as se, openBlock as s, createBlock as p, unref as e, withCtx as a, createElementVNode as C, createVNode as o, withKeys as ne, createElementBlock as _, Fragment as P, renderList as I, createCommentVNode as E, createTextVNode as g, toDisplayString as v } from "vue";
2
2
  import y from "../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js";
3
- import { ElConfigProvider as ne, ElInput as K, ElSelect as U, ElOption as L, ElIcon as ue, ElCheckbox as ie, ElLink as ce, ElDialog as de, ElButton as N, ElForm as pe, ElRow as E, ElFormItem as R } from "element-plus";
3
+ import { ElConfigProvider as ue, ElInput as K, ElSelect as G, ElOption as U, ElIcon as ie, ElCheckbox as ce, ElLink as de, ElDialog as pe, ElButton as L, ElForm as me, ElRow as b, ElFormItem as N } from "element-plus";
4
4
  import "element-plus/theme-chalk/src/base.scss";
5
5
  import "element-plus/theme-chalk/src/input.scss";
6
6
  import "element-plus/theme-chalk/src/checkbox.scss";
@@ -18,9 +18,9 @@ import "element-plus/theme-chalk/src/row.scss";
18
18
  import "element-plus/theme-chalk/src/button.scss";
19
19
  import "element-plus/theme-chalk/src/link.scss";
20
20
  import "element-plus/theme-chalk/src/config-provider.scss";
21
- import { Search as me } from "@element-plus/icons-vue";
22
- import he from "../node_modules/.pnpm/element-plus@2.8.3_vue@3.5.12_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js";
23
- const fe = { class: "yahee-comporehensive-search" }, ve = { class: "search-type-checkbox" }, ye = { class: "dialog-footer" }, ze = /* @__PURE__ */ ae({
21
+ import { Search as he } from "@element-plus/icons-vue";
22
+ import fe from "../node_modules/.pnpm/element-plus@2.8.3_vue@3.5.12_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js";
23
+ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-checkbox" }, Ce = { class: "dialog-footer" }, ze = /* @__PURE__ */ oe({
24
24
  name: "YaheeComprehensiveSearch",
25
25
  __name: "comprehensive-search",
26
26
  props: {
@@ -32,99 +32,102 @@ const fe = { class: "yahee-comporehensive-search" }, ve = { class: "search-type-
32
32
  showPatchSearch: { type: Boolean, default: !1 },
33
33
  showWithinFilterCheckbox: { type: Boolean, default: !1 },
34
34
  specialOptions: { default: () => [] },
35
- normalOptions: { default: () => [] }
35
+ normalOptions: { default: () => [] },
36
+ showSelect: { type: Boolean, default: !1 }
36
37
  },
37
- emits: ["filterChange"],
38
- setup(W, { emit: z }) {
39
- const D = he, p = z, q = W, {
40
- dealSearch: H,
41
- defaultSearch: A,
42
- pasteFormat: b,
43
- options: w,
44
- showPatchSearch: J,
45
- specialOptions: F,
46
- showWithinFilterCheckbox: X,
47
- placeholderText: Y,
48
- normalOptions: $
49
- } = oe(q), S = i(A.value), d = i(""), m = i(!1), V = i(!1), h = i(!1), x = i(null), s = i({ searchType: "WHOLE_SEARCH", searchContent: "" }), r = re({}), j = {
38
+ emits: ["filterChangeGrandson"],
39
+ setup(R, { emit: W }) {
40
+ const z = fe, m = W, D = R, {
41
+ dealSearch: q,
42
+ defaultSearch: H,
43
+ pasteFormat: w,
44
+ options: F,
45
+ showPatchSearch: A,
46
+ specialOptions: x,
47
+ showWithinFilterCheckbox: J,
48
+ placeholderText: X,
49
+ normalOptions: Y,
50
+ showSelect: $
51
+ } = re(D), S = c(H.value), d = c(""), h = c(!1), V = c(!1), f = c(!1), B = c(null), n = c({ searchType: "WHOLE_SEARCH", searchContent: "" }), r = se({}), j = {
50
52
  selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
51
53
  searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
52
- }, G = () => {
53
- h.value = !0;
54
- }, B = () => {
55
- h.value = !1;
56
54
  }, M = () => {
57
- m.value || (delete r.putSearch, p("filterChange", r));
58
- }, Q = () => r, k = () => {
59
- d.value ? ee() : p("filterChange", Q());
60
- }, Z = (n, e) => {
61
- const t = { ...n };
62
- return y.map(F.value, (u) => u.key).includes(e.filterKey) ? F.value.forEach((u) => delete t[u.key]) : delete t[e.filterKey], t;
55
+ f.value = !0;
56
+ }, O = () => {
57
+ f.value = !1;
58
+ }, Q = () => {
59
+ h.value || (delete r.putSearch, m("filterChangeGrandson", r));
60
+ }, Z = () => r, k = () => {
61
+ d.value ? le() : m("filterChangeGrandson", Z());
62
+ }, ee = (u, l) => {
63
+ const t = { ...u };
64
+ return y.map(x.value, (i) => i.key).includes(l.filterKey) ? x.value.forEach((i) => delete t[i.key]) : delete t[l.filterKey], t;
63
65
  };
64
- function O(n) {
65
- console.log("displayFilter filterChange start", n, r), y.forEach(n, (e) => {
66
- Z(r, e);
67
- const { checkedValues: t, filterKey: u } = e;
68
- y.isEmpty(t) || ($.value.includes(u) ? r[u] = t[0] : r[u] = t);
69
- }), p("filterChange", r), console.log(`searchItem - ${JSON.stringify(r)}`), console.log("displayFilter filterChange end");
66
+ function T(u) {
67
+ console.log("displayFilter filterChange start", u, r), y.forEach(u, (l) => {
68
+ ee(r, l);
69
+ const { checkedValues: t, filterKey: i } = l;
70
+ y.isEmpty(t) || (Y.value.includes(i) ? r[i] = t[0] : r[i] = t);
71
+ }), m("filterChangeGrandson", r), console.log(`searchItem - ${JSON.stringify(r)}`), console.log("displayFilter filterChange end");
70
72
  }
71
- const ee = () => {
72
- m.value ? O([
73
+ const le = () => {
74
+ h.value ? T([
73
75
  {
74
76
  filterKey: "simpleSearch",
75
77
  checkedValues: d.value
76
78
  }
77
- ]) : p("filterChange", {
79
+ ]) : m("filterChangeGrandson", {
78
80
  simpleSearch: d.value
79
81
  });
80
- }, le = () => {
81
- H.value(S.value, d.value);
82
82
  }, te = () => {
83
- x.value.validate((n) => {
84
- n && (V.value = !0, m.value ? O([
83
+ q.value(S.value, d.value);
84
+ }, ae = () => {
85
+ B.value.validate((u) => {
86
+ u && (V.value = !0, h.value ? T([
85
87
  {
86
88
  filterKey: "putSearch",
87
- checkedValues: s.value.searchContent
89
+ checkedValues: n.value.searchContent
88
90
  }
89
- ]) : p("filterChange", {
90
- putSearch: s.value.searchContent
91
- }), h.value = !1, V.value = !1);
91
+ ]) : m("filterChangeGrandson", {
92
+ putSearch: n.value.searchContent
93
+ }), f.value = !1, V.value = !1);
92
94
  });
93
95
  };
94
- return (n, e) => (c(), f(l(ne), { locale: l(D) }, {
96
+ return (u, l) => (s(), p(e(ue), { locale: e(z) }, {
95
97
  default: a(() => [
96
- C("div", fe, [
97
- o(l(K), {
98
+ C("div", ve, [
99
+ o(e(K), {
98
100
  modelValue: d.value,
99
- "onUpdate:modelValue": e[1] || (e[1] = (t) => d.value = t),
100
- placeholder: l(Y),
101
+ "onUpdate:modelValue": l[1] || (l[1] = (t) => d.value = t),
102
+ placeholder: e(X),
101
103
  class: "input-with-select",
102
104
  clearable: "",
103
105
  maxlength: "30",
104
106
  onChange: k,
105
- onKeyup: se(k, ["enter"]),
106
- onPaste: l(b),
107
- onClear: le
107
+ onKeyup: ne(k, ["enter"]),
108
+ onPaste: e(w),
109
+ onClear: te
108
110
  }, {
109
111
  prepend: a(() => [
110
- o(l(U), {
112
+ e($) ? (s(), p(e(G), {
113
+ key: 0,
111
114
  modelValue: S.value,
112
- "onUpdate:modelValue": e[0] || (e[0] = (t) => S.value = t),
115
+ "onUpdate:modelValue": l[0] || (l[0] = (t) => S.value = t),
113
116
  size: "small",
114
117
  class: "custom-select"
115
118
  }, {
116
119
  default: a(() => [
117
- (c(!0), T(_, null, P(l(w), (t) => (c(), f(l(L), {
120
+ (s(!0), _(P, null, I(e(F), (t) => (s(), p(e(U), {
118
121
  key: t.label,
119
122
  label: t.label,
120
123
  value: t.value
121
124
  }, null, 8, ["label", "value"]))), 128))
122
125
  ]),
123
126
  _: 1
124
- }, 8, ["modelValue"])
127
+ }, 8, ["modelValue"])) : E("", !0)
125
128
  ]),
126
129
  append: a(() => [
127
- o(l(ue), {
130
+ o(e(ie), {
128
131
  size: "12",
129
132
  color: "#3366cc",
130
133
  style: { cursor: "pointer" },
@@ -132,60 +135,60 @@ const fe = { class: "yahee-comporehensive-search" }, ve = { class: "search-type-
132
135
  onClick: k
133
136
  }, {
134
137
  default: a(() => [
135
- o(l(me))
138
+ o(e(he))
136
139
  ]),
137
140
  _: 1
138
141
  })
139
142
  ]),
140
143
  _: 1
141
144
  }, 8, ["modelValue", "placeholder", "onPaste"]),
142
- C("div", ve, [
143
- l(X) ? (c(), f(l(ie), {
145
+ C("div", ye, [
146
+ e(J) ? (s(), p(e(ce), {
144
147
  key: 0,
145
- modelValue: m.value,
146
- "onUpdate:modelValue": e[2] || (e[2] = (t) => m.value = t),
147
- onChange: M
148
+ modelValue: h.value,
149
+ "onUpdate:modelValue": l[2] || (l[2] = (t) => h.value = t),
150
+ onChange: Q
148
151
  }, {
149
- default: a(() => e[6] || (e[6] = [
152
+ default: a(() => l[6] || (l[6] = [
150
153
  g(v("在筛选条件内查询"))
151
154
  ])),
152
155
  _: 1
153
- }, 8, ["modelValue"])) : I("", !0),
154
- l(J) ? (c(), f(l(ce), {
156
+ }, 8, ["modelValue"])) : E("", !0),
157
+ e(A) ? (s(), p(e(de), {
155
158
  key: 1,
156
159
  type: "primary",
157
- onClick: G
160
+ onClick: M
158
161
  }, {
159
- default: a(() => e[7] || (e[7] = [
162
+ default: a(() => l[7] || (l[7] = [
160
163
  g(v("批量查询"))
161
164
  ])),
162
165
  _: 1
163
- })) : I("", !0)
166
+ })) : E("", !0)
164
167
  ])
165
168
  ]),
166
- o(l(de), {
167
- modelValue: h.value,
168
- "onUpdate:modelValue": e[5] || (e[5] = (t) => h.value = t),
169
+ o(e(pe), {
170
+ modelValue: f.value,
171
+ "onUpdate:modelValue": l[5] || (l[5] = (t) => f.value = t),
169
172
  title: "批量查询",
170
173
  width: "30%",
171
- "before-close": B,
174
+ "before-close": O,
172
175
  "append-to-body": !0,
173
176
  draggable: ""
174
177
  }, {
175
178
  footer: a(() => [
176
- C("div", ye, [
177
- o(l(N), {
179
+ C("div", Ce, [
180
+ o(e(L), {
178
181
  type: "primary",
179
182
  loading: V.value,
180
- onClick: te
183
+ onClick: ae
181
184
  }, {
182
- default: a(() => e[9] || (e[9] = [
185
+ default: a(() => l[9] || (l[9] = [
183
186
  g(v("确认"))
184
187
  ])),
185
188
  _: 1
186
189
  }, 8, ["loading"]),
187
- o(l(N), { onClick: B }, {
188
- default: a(() => e[10] || (e[10] = [
190
+ o(e(L), { onClick: O }, {
191
+ default: a(() => l[10] || (l[10] = [
189
192
  g(v("关闭"))
190
193
  ])),
191
194
  _: 1
@@ -193,31 +196,31 @@ const fe = { class: "yahee-comporehensive-search" }, ve = { class: "search-type-
193
196
  ])
194
197
  ]),
195
198
  default: a(() => [
196
- o(l(pe), {
199
+ o(e(me), {
197
200
  ref_key: "batchSearchFormRef",
198
- ref: x,
199
- model: s.value,
201
+ ref: B,
202
+ model: n.value,
200
203
  rules: j
201
204
  }, {
202
205
  default: a(() => [
203
- o(l(E), { class: "row-class" }, {
204
- default: a(() => e[8] || (e[8] = [
206
+ o(e(b), { class: "row-class" }, {
207
+ default: a(() => l[8] || (l[8] = [
205
208
  C("span", null, v("综合搜索"), -1)
206
209
  ])),
207
210
  _: 1
208
211
  }),
209
- o(l(E), { class: "row-class" }, {
212
+ o(e(b), { class: "row-class" }, {
210
213
  default: a(() => [
211
- o(l(R), { prop: "searchType" }, {
214
+ o(e(N), { prop: "searchType" }, {
212
215
  default: a(() => [
213
- o(l(U), {
214
- modelValue: s.value.searchType,
215
- "onUpdate:modelValue": e[3] || (e[3] = (t) => s.value.searchType = t),
216
+ o(e(G), {
217
+ modelValue: n.value.searchType,
218
+ "onUpdate:modelValue": l[3] || (l[3] = (t) => n.value.searchType = t),
216
219
  size: "small",
217
220
  class: "custom-select"
218
221
  }, {
219
222
  default: a(() => [
220
- (c(!0), T(_, null, P(l(w), (t) => (c(), f(l(L), {
223
+ (s(!0), _(P, null, I(e(F), (t) => (s(), p(e(U), {
221
224
  key: t.label,
222
225
  label: t.label,
223
226
  value: t.value
@@ -231,20 +234,20 @@ const fe = { class: "yahee-comporehensive-search" }, ve = { class: "search-type-
231
234
  ]),
232
235
  _: 1
233
236
  }),
234
- o(l(E), { class: "row-class" }, {
237
+ o(e(b), { class: "row-class" }, {
235
238
  default: a(() => [
236
- o(l(R), {
239
+ o(e(N), {
237
240
  prop: "searchContent",
238
241
  style: { width: "100%" }
239
242
  }, {
240
243
  default: a(() => [
241
- o(l(K), {
242
- modelValue: s.value.searchContent,
243
- "onUpdate:modelValue": e[4] || (e[4] = (t) => s.value.searchContent = t),
244
+ o(e(K), {
245
+ modelValue: n.value.searchContent,
246
+ "onUpdate:modelValue": l[4] || (l[4] = (t) => n.value.searchContent = t),
244
247
  placeholder: "请输入批量查询内容,从EXCEL复制可自动替换为`,`",
245
248
  type: "textarea",
246
249
  rows: 5,
247
- onPaste: l(b)
250
+ onPaste: e(w)
248
251
  }, null, 8, ["modelValue", "onPaste"])
249
252
  ]),
250
253
  _: 1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.14",
4
+ "version": "0.0.16",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -14,8 +14,9 @@ declare const _default: DefineComponent<{
14
14
  showWithinFilterCheckbox?: boolean;
15
15
  specialOptions?: SearchDataOptions[];
16
16
  normalOptions?: string[];
17
+ showSelect?: boolean;
17
18
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
18
- filterChange: (...args: any[]) => void;
19
+ filterChangeGrandson: (...args: any[]) => void;
19
20
  }, string, PublicProps, Readonly<{
20
21
  dealSearch?: (selectedSearchType: string, searchQuery: string) => void;
21
22
  pasteFormat?: () => void;
@@ -26,8 +27,9 @@ declare const _default: DefineComponent<{
26
27
  showWithinFilterCheckbox?: boolean;
27
28
  specialOptions?: SearchDataOptions[];
28
29
  normalOptions?: string[];
30
+ showSelect?: boolean;
29
31
  }> & Readonly<{
30
- onFilterChange?: (...args: any[]) => any;
32
+ onFilterChangeGrandson?: (...args: any[]) => any;
31
33
  }>, {
32
34
  dealSearch: (selectedSearchType: string, searchQuery: string) => void;
33
35
  pasteFormat: () => void;
@@ -38,5 +40,6 @@ declare const _default: DefineComponent<{
38
40
  showWithinFilterCheckbox: boolean;
39
41
  specialOptions: SearchDataOptions[];
40
42
  normalOptions: string[];
43
+ showSelect: boolean;
41
44
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
42
45
  export default _default;