yahee-components 0.0.15 → 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
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 ue, ElInput as K, ElSelect as
|
|
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";
|
|
@@ -20,7 +20,7 @@ import "element-plus/theme-chalk/src/link.scss";
|
|
|
20
20
|
import "element-plus/theme-chalk/src/config-provider.scss";
|
|
21
21
|
import { Search as he } from "@element-plus/icons-vue";
|
|
22
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" },
|
|
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: {
|
|
@@ -35,20 +35,20 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
35
35
|
normalOptions: { default: () => [] },
|
|
36
36
|
showSelect: { type: Boolean, default: !1 }
|
|
37
37
|
},
|
|
38
|
-
emits: ["
|
|
39
|
-
setup(
|
|
40
|
-
const
|
|
41
|
-
dealSearch:
|
|
42
|
-
defaultSearch:
|
|
38
|
+
emits: ["filterChangeGrandson"],
|
|
39
|
+
setup(R, { emit: W }) {
|
|
40
|
+
const z = fe, m = W, D = R, {
|
|
41
|
+
dealSearch: q,
|
|
42
|
+
defaultSearch: H,
|
|
43
43
|
pasteFormat: w,
|
|
44
44
|
options: F,
|
|
45
|
-
showPatchSearch:
|
|
45
|
+
showPatchSearch: A,
|
|
46
46
|
specialOptions: x,
|
|
47
|
-
showWithinFilterCheckbox:
|
|
48
|
-
placeholderText:
|
|
49
|
-
normalOptions:
|
|
50
|
-
showSelect:
|
|
51
|
-
} = re(
|
|
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 = {
|
|
52
52
|
selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
|
|
53
53
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
54
54
|
}, M = () => {
|
|
@@ -56,9 +56,9 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
56
56
|
}, O = () => {
|
|
57
57
|
f.value = !1;
|
|
58
58
|
}, Q = () => {
|
|
59
|
-
h.value || (delete r.putSearch, m("
|
|
59
|
+
h.value || (delete r.putSearch, m("filterChangeGrandson", r));
|
|
60
60
|
}, Z = () => r, k = () => {
|
|
61
|
-
d.value ? le() : m("
|
|
61
|
+
d.value ? le() : m("filterChangeGrandson", Z());
|
|
62
62
|
}, ee = (u, l) => {
|
|
63
63
|
const t = { ...u };
|
|
64
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;
|
|
@@ -67,8 +67,8 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
67
67
|
console.log("displayFilter filterChange start", u, r), y.forEach(u, (l) => {
|
|
68
68
|
ee(r, l);
|
|
69
69
|
const { checkedValues: t, filterKey: i } = l;
|
|
70
|
-
y.isEmpty(t) || (
|
|
71
|
-
}), m("
|
|
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");
|
|
72
72
|
}
|
|
73
73
|
const le = () => {
|
|
74
74
|
h.value ? T([
|
|
@@ -76,11 +76,11 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
76
76
|
filterKey: "simpleSearch",
|
|
77
77
|
checkedValues: d.value
|
|
78
78
|
}
|
|
79
|
-
]) : m("
|
|
79
|
+
]) : m("filterChangeGrandson", {
|
|
80
80
|
simpleSearch: d.value
|
|
81
81
|
});
|
|
82
82
|
}, te = () => {
|
|
83
|
-
|
|
83
|
+
q.value(S.value, d.value);
|
|
84
84
|
}, ae = () => {
|
|
85
85
|
B.value.validate((u) => {
|
|
86
86
|
u && (V.value = !0, h.value ? T([
|
|
@@ -88,18 +88,18 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
88
88
|
filterKey: "putSearch",
|
|
89
89
|
checkedValues: n.value.searchContent
|
|
90
90
|
}
|
|
91
|
-
]) : m("
|
|
91
|
+
]) : m("filterChangeGrandson", {
|
|
92
92
|
putSearch: n.value.searchContent
|
|
93
93
|
}), f.value = !1, V.value = !1);
|
|
94
94
|
});
|
|
95
95
|
};
|
|
96
|
-
return (u, l) => (s(), p(e(ue), { locale: e(
|
|
96
|
+
return (u, l) => (s(), p(e(ue), { locale: e(z) }, {
|
|
97
97
|
default: a(() => [
|
|
98
98
|
C("div", ve, [
|
|
99
99
|
o(e(K), {
|
|
100
100
|
modelValue: d.value,
|
|
101
101
|
"onUpdate:modelValue": l[1] || (l[1] = (t) => d.value = t),
|
|
102
|
-
placeholder: e(
|
|
102
|
+
placeholder: e(X),
|
|
103
103
|
class: "input-with-select",
|
|
104
104
|
clearable: "",
|
|
105
105
|
maxlength: "30",
|
|
@@ -109,7 +109,7 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
109
109
|
onClear: te
|
|
110
110
|
}, {
|
|
111
111
|
prepend: a(() => [
|
|
112
|
-
e(
|
|
112
|
+
e($) ? (s(), p(e(G), {
|
|
113
113
|
key: 0,
|
|
114
114
|
modelValue: S.value,
|
|
115
115
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => S.value = t),
|
|
@@ -117,7 +117,7 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
117
117
|
class: "custom-select"
|
|
118
118
|
}, {
|
|
119
119
|
default: a(() => [
|
|
120
|
-
(s(!0), _(P, null, I(e(F), (t) => (s(), p(e(
|
|
120
|
+
(s(!0), _(P, null, I(e(F), (t) => (s(), p(e(U), {
|
|
121
121
|
key: t.label,
|
|
122
122
|
label: t.label,
|
|
123
123
|
value: t.value
|
|
@@ -143,7 +143,7 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
143
143
|
_: 1
|
|
144
144
|
}, 8, ["modelValue", "placeholder", "onPaste"]),
|
|
145
145
|
C("div", ye, [
|
|
146
|
-
e(
|
|
146
|
+
e(J) ? (s(), p(e(ce), {
|
|
147
147
|
key: 0,
|
|
148
148
|
modelValue: h.value,
|
|
149
149
|
"onUpdate:modelValue": l[2] || (l[2] = (t) => h.value = t),
|
|
@@ -154,7 +154,7 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
154
154
|
])),
|
|
155
155
|
_: 1
|
|
156
156
|
}, 8, ["modelValue"])) : E("", !0),
|
|
157
|
-
e(
|
|
157
|
+
e(A) ? (s(), p(e(de), {
|
|
158
158
|
key: 1,
|
|
159
159
|
type: "primary",
|
|
160
160
|
onClick: M
|
|
@@ -177,7 +177,7 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
177
177
|
}, {
|
|
178
178
|
footer: a(() => [
|
|
179
179
|
C("div", Ce, [
|
|
180
|
-
o(e(
|
|
180
|
+
o(e(L), {
|
|
181
181
|
type: "primary",
|
|
182
182
|
loading: V.value,
|
|
183
183
|
onClick: ae
|
|
@@ -187,7 +187,7 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
187
187
|
])),
|
|
188
188
|
_: 1
|
|
189
189
|
}, 8, ["loading"]),
|
|
190
|
-
o(e(
|
|
190
|
+
o(e(L), { onClick: O }, {
|
|
191
191
|
default: a(() => l[10] || (l[10] = [
|
|
192
192
|
g(v("关闭"))
|
|
193
193
|
])),
|
|
@@ -200,7 +200,7 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
200
200
|
ref_key: "batchSearchFormRef",
|
|
201
201
|
ref: B,
|
|
202
202
|
model: n.value,
|
|
203
|
-
rules:
|
|
203
|
+
rules: j
|
|
204
204
|
}, {
|
|
205
205
|
default: a(() => [
|
|
206
206
|
o(e(b), { class: "row-class" }, {
|
|
@@ -211,16 +211,16 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
211
211
|
}),
|
|
212
212
|
o(e(b), { class: "row-class" }, {
|
|
213
213
|
default: a(() => [
|
|
214
|
-
o(e(
|
|
214
|
+
o(e(N), { prop: "searchType" }, {
|
|
215
215
|
default: a(() => [
|
|
216
|
-
o(e(
|
|
216
|
+
o(e(G), {
|
|
217
217
|
modelValue: n.value.searchType,
|
|
218
218
|
"onUpdate:modelValue": l[3] || (l[3] = (t) => n.value.searchType = t),
|
|
219
219
|
size: "small",
|
|
220
220
|
class: "custom-select"
|
|
221
221
|
}, {
|
|
222
222
|
default: a(() => [
|
|
223
|
-
(s(!0), _(P, null, I(e(F), (t) => (s(), p(e(
|
|
223
|
+
(s(!0), _(P, null, I(e(F), (t) => (s(), p(e(U), {
|
|
224
224
|
key: t.label,
|
|
225
225
|
label: t.label,
|
|
226
226
|
value: t.value
|
|
@@ -236,7 +236,7 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
236
236
|
}),
|
|
237
237
|
o(e(b), { class: "row-class" }, {
|
|
238
238
|
default: a(() => [
|
|
239
|
-
o(e(
|
|
239
|
+
o(e(N), {
|
|
240
240
|
prop: "searchContent",
|
|
241
241
|
style: { width: "100%" }
|
|
242
242
|
}, {
|
|
@@ -267,5 +267,5 @@ const ve = { class: "yahee-comporehensive-search" }, ye = { class: "search-type-
|
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
export {
|
|
270
|
-
|
|
270
|
+
ze as default
|
|
271
271
|
};
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ declare const _default: DefineComponent<{
|
|
|
16
16
|
normalOptions?: string[];
|
|
17
17
|
showSelect?: boolean;
|
|
18
18
|
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
19
|
-
|
|
19
|
+
filterChangeGrandson: (...args: any[]) => void;
|
|
20
20
|
}, string, PublicProps, Readonly<{
|
|
21
21
|
dealSearch?: (selectedSearchType: string, searchQuery: string) => void;
|
|
22
22
|
pasteFormat?: () => void;
|
|
@@ -29,7 +29,7 @@ declare const _default: DefineComponent<{
|
|
|
29
29
|
normalOptions?: string[];
|
|
30
30
|
showSelect?: boolean;
|
|
31
31
|
}> & Readonly<{
|
|
32
|
-
|
|
32
|
+
onFilterChangeGrandson?: (...args: any[]) => any;
|
|
33
33
|
}>, {
|
|
34
34
|
dealSearch: (selectedSearchType: string, searchQuery: string) => void;
|
|
35
35
|
pasteFormat: () => void;
|