yahee-components 0.0.20 → 0.0.21

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