yahee-components 0.0.21 → 0.0.22

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