yahee-components 0.0.53 → 0.0.55
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,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createBlock as
|
|
1
|
+
import s from "./complex-search.vue2.js";
|
|
2
|
+
import { createBlock as d, openBlock as t, withCtx as o, createElementVNode as h, createVNode as r, withKeys as f, createSlots as b, createElementBlock as n, Fragment as c, renderList as u, createCommentVNode as E, createTextVNode as m, toDisplayString as i } from "vue";
|
|
3
3
|
import y from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const S = { class: "yahee-complex-search" }, F = { class: "search-type-checkbox" }, V = { class: "dialog-footer" };
|
|
5
5
|
function k(C, a, w, e, B, v) {
|
|
6
|
-
return t(),
|
|
6
|
+
return t(), d(e.ElConfigProvider, { locale: e.locale }, {
|
|
7
7
|
default: o(() => [
|
|
8
8
|
h("div", S, [
|
|
9
9
|
r(e.ElInput, {
|
|
@@ -45,10 +45,10 @@ function k(C, a, w, e, B, v) {
|
|
|
45
45
|
class: "custom-select"
|
|
46
46
|
}, {
|
|
47
47
|
default: o(() => [
|
|
48
|
-
(t(!0),
|
|
48
|
+
(t(!0), n(
|
|
49
49
|
c,
|
|
50
50
|
null,
|
|
51
|
-
u(e.options, (l) => (t(),
|
|
51
|
+
u(e.options, (l) => (t(), d(e.ElOption, {
|
|
52
52
|
key: l.label,
|
|
53
53
|
label: l.label,
|
|
54
54
|
value: l.value
|
|
@@ -73,7 +73,7 @@ function k(C, a, w, e, B, v) {
|
|
|
73
73
|
disabled: ""
|
|
74
74
|
}, {
|
|
75
75
|
default: o(() => [
|
|
76
|
-
(t(),
|
|
76
|
+
(t(), n(
|
|
77
77
|
c,
|
|
78
78
|
null,
|
|
79
79
|
u(e.defalutOptions, (l) => r(e.ElOption, {
|
|
@@ -91,9 +91,9 @@ function k(C, a, w, e, B, v) {
|
|
|
91
91
|
]),
|
|
92
92
|
key: "1"
|
|
93
93
|
}
|
|
94
|
-
]), 1032, ["modelValue", "placeholder"
|
|
94
|
+
]), 1032, ["modelValue", "placeholder"]),
|
|
95
95
|
h("div", F, [
|
|
96
|
-
e.showWithinFilterCheckbox ? (t(),
|
|
96
|
+
e.showWithinFilterCheckbox ? (t(), d(e.ElCheckbox, {
|
|
97
97
|
key: 0,
|
|
98
98
|
modelValue: e.isWithinFilterOptions,
|
|
99
99
|
"onUpdate:modelValue": a[3] || (a[3] = (l) => e.isWithinFilterOptions = l),
|
|
@@ -104,8 +104,8 @@ function k(C, a, w, e, B, v) {
|
|
|
104
104
|
])),
|
|
105
105
|
_: 1
|
|
106
106
|
/* STABLE */
|
|
107
|
-
}, 8, ["modelValue"])) :
|
|
108
|
-
e.showPatchSearch ? (t(),
|
|
107
|
+
}, 8, ["modelValue"])) : E("v-if", !0),
|
|
108
|
+
e.showPatchSearch ? (t(), d(e.ElLink, {
|
|
109
109
|
key: 1,
|
|
110
110
|
type: "primary",
|
|
111
111
|
onClick: e.showBatchSearchDialog
|
|
@@ -115,7 +115,7 @@ function k(C, a, w, e, B, v) {
|
|
|
115
115
|
])),
|
|
116
116
|
_: 1
|
|
117
117
|
/* STABLE */
|
|
118
|
-
})) :
|
|
118
|
+
})) : E("v-if", !0)
|
|
119
119
|
])
|
|
120
120
|
]),
|
|
121
121
|
r(e.ElDialog, {
|
|
@@ -160,7 +160,7 @@ function k(C, a, w, e, B, v) {
|
|
|
160
160
|
default: o(() => [
|
|
161
161
|
r(e.ElFormItem, { prop: "searchType" }, {
|
|
162
162
|
default: o(() => [
|
|
163
|
-
e.showSelect ? (t(),
|
|
163
|
+
e.showSelect ? (t(), d(e.ElSelect, {
|
|
164
164
|
key: 0,
|
|
165
165
|
modelValue: e.batchSearchForm.searchType,
|
|
166
166
|
"onUpdate:modelValue": a[4] || (a[4] = (l) => e.batchSearchForm.searchType = l),
|
|
@@ -168,10 +168,10 @@ function k(C, a, w, e, B, v) {
|
|
|
168
168
|
style: { width: "100px", "background-color": "white" }
|
|
169
169
|
}, {
|
|
170
170
|
default: o(() => [
|
|
171
|
-
(t(!0),
|
|
171
|
+
(t(!0), n(
|
|
172
172
|
c,
|
|
173
173
|
null,
|
|
174
|
-
u(e.options, (l) => (t(),
|
|
174
|
+
u(e.options, (l) => (t(), d(e.ElOption, {
|
|
175
175
|
key: l.label,
|
|
176
176
|
label: l.label,
|
|
177
177
|
value: l.value
|
|
@@ -182,7 +182,7 @@ function k(C, a, w, e, B, v) {
|
|
|
182
182
|
]),
|
|
183
183
|
_: 1
|
|
184
184
|
/* STABLE */
|
|
185
|
-
}, 8, ["modelValue"])) : (t(),
|
|
185
|
+
}, 8, ["modelValue"])) : (t(), d(e.ElSelect, {
|
|
186
186
|
key: 1,
|
|
187
187
|
modelValue: e.batchSearchForm.searchType,
|
|
188
188
|
"onUpdate:modelValue": a[5] || (a[5] = (l) => e.batchSearchForm.searchType = l),
|
|
@@ -191,7 +191,7 @@ function k(C, a, w, e, B, v) {
|
|
|
191
191
|
disabled: ""
|
|
192
192
|
}, {
|
|
193
193
|
default: o(() => [
|
|
194
|
-
(t(),
|
|
194
|
+
(t(), n(
|
|
195
195
|
c,
|
|
196
196
|
null,
|
|
197
197
|
u(e.defalutOptions, (l) => r(e.ElOption, {
|
|
@@ -228,7 +228,7 @@ function k(C, a, w, e, B, v) {
|
|
|
228
228
|
type: "textarea",
|
|
229
229
|
rows: 5,
|
|
230
230
|
onPaste: e.pasteFormat
|
|
231
|
-
}, null, 8, ["modelValue"
|
|
231
|
+
}, null, 8, ["modelValue"])
|
|
232
232
|
]),
|
|
233
233
|
_: 1
|
|
234
234
|
/* STABLE */
|
|
@@ -250,7 +250,7 @@ function k(C, a, w, e, B, v) {
|
|
|
250
250
|
/* STABLE */
|
|
251
251
|
}, 8, ["locale"]);
|
|
252
252
|
}
|
|
253
|
-
const _ = /* @__PURE__ */ y(
|
|
253
|
+
const _ = /* @__PURE__ */ y(s, [["render", k], ["__file", "E:/工作/项目代码/common_componentsweb/packages/components/src/complex-search/complex-search.vue"]]);
|
|
254
254
|
export {
|
|
255
255
|
_ as default
|
|
256
256
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as L, mergeDefaults as V, toRefs as
|
|
1
|
+
import { defineComponent as L, mergeDefaults as V, toRefs as j, ref as n } from "vue";
|
|
2
2
|
import d from "../_virtual/lodash.js";
|
|
3
|
-
import { defaultComplexSearchProps as
|
|
4
|
-
import { ElConfigProvider as
|
|
3
|
+
import { defaultComplexSearchProps as z } from "./props.js";
|
|
4
|
+
import { ElConfigProvider as Y, ElLink as J, ElOption as M, ElButton as N, ElRow as Q, ElFormItem as U, ElForm as X, ElIcon as Z, ElDialog as $, ElSelect as ee, ElCheckbox as te, ElInput as re } from "element-plus";
|
|
5
5
|
import "element-plus/theme-chalk/src/base.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/input.scss";
|
|
7
7
|
import "element-plus/theme-chalk/src/checkbox.scss";
|
|
@@ -19,9 +19,9 @@ import "element-plus/theme-chalk/src/row.scss";
|
|
|
19
19
|
import "element-plus/theme-chalk/src/button.scss";
|
|
20
20
|
import "element-plus/theme-chalk/src/link.scss";
|
|
21
21
|
import "element-plus/theme-chalk/src/config-provider.scss";
|
|
22
|
-
import { Search as
|
|
23
|
-
import
|
|
24
|
-
const
|
|
22
|
+
import { Search as ae } from "@element-plus/icons-vue";
|
|
23
|
+
import le from "../node_modules/.pnpm/element-plus@2.9.7_vue@3.5.13_typescript@5.8.3_/node_modules/element-plus/es/locale/lang/zh-cn.js";
|
|
24
|
+
const Te = /* @__PURE__ */ L({
|
|
25
25
|
name: "YaheeComplexSearch",
|
|
26
26
|
__name: "complex-search",
|
|
27
27
|
props: /* @__PURE__ */ V({
|
|
@@ -35,49 +35,55 @@ const xe = /* @__PURE__ */ L({
|
|
|
35
35
|
normalOptions: { type: Array, required: !1 },
|
|
36
36
|
showSelect: { type: Boolean, required: !1 },
|
|
37
37
|
searchItem: { type: Object, required: !1 }
|
|
38
|
-
},
|
|
38
|
+
}, z()),
|
|
39
39
|
emits: ["filterChangeGrandson"],
|
|
40
|
-
setup(k, { expose:
|
|
41
|
-
|
|
42
|
-
const q =
|
|
43
|
-
defaultSearch:
|
|
44
|
-
pasteFormat: x,
|
|
40
|
+
setup(k, { expose: x, emit: F }) {
|
|
41
|
+
x();
|
|
42
|
+
const q = le, s = F, g = k, {
|
|
43
|
+
defaultSearch: v,
|
|
45
44
|
options: T,
|
|
46
45
|
showPatchSearch: w,
|
|
47
|
-
specialOptions:
|
|
46
|
+
specialOptions: h,
|
|
48
47
|
showWithinFilterCheckbox: I,
|
|
49
48
|
placeholderText: B,
|
|
50
|
-
normalOptions:
|
|
51
|
-
showSelect:
|
|
52
|
-
searchItem:
|
|
53
|
-
} =
|
|
49
|
+
normalOptions: S,
|
|
50
|
+
showSelect: D,
|
|
51
|
+
searchItem: a
|
|
52
|
+
} = j(g), l = n(v.value || "WHOLE_SEARCH"), i = n(""), u = n(!1), f = n(!1), p = n(!1), y = n(null), c = n({ searchType: "WHOLE_SEARCH", searchContent: "" }), P = {
|
|
54
53
|
selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
|
|
55
54
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
56
|
-
},
|
|
55
|
+
}, K = [
|
|
57
56
|
{
|
|
58
57
|
value: "WHOLE_SEARCH",
|
|
59
58
|
label: "综合搜索"
|
|
60
59
|
}
|
|
61
|
-
],
|
|
62
|
-
|
|
60
|
+
], R = () => {
|
|
61
|
+
p.value = !0;
|
|
62
|
+
}, W = () => {
|
|
63
|
+
p.value = !1;
|
|
63
64
|
}, A = () => {
|
|
64
|
-
|
|
65
|
-
}, G = () => {
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const t = { ...s };
|
|
71
|
-
return d.map(p.value, (a) => a.key).includes(c.filterKey) ? p.value.forEach((a) => delete t[a.key]) : delete t[c.filterKey], t;
|
|
65
|
+
u.value || (delete a.value.putSearch, s("filterChangeGrandson", a.value, l.value));
|
|
66
|
+
}, E = () => a.value, G = () => {
|
|
67
|
+
i.value ? _() : s("filterChangeGrandson", E(), l.value);
|
|
68
|
+
}, C = (e, r) => {
|
|
69
|
+
const t = { ...e };
|
|
70
|
+
return d.map(h.value, (o) => o.key).includes(r.filterKey) ? h.value.forEach((o) => delete t[o.key]) : delete t[r.filterKey], t;
|
|
72
71
|
};
|
|
73
|
-
function m(
|
|
74
|
-
d.forEach(
|
|
75
|
-
C(
|
|
76
|
-
const { checkedValues: t, filterKey:
|
|
77
|
-
d.isEmpty(t) || (
|
|
78
|
-
}),
|
|
72
|
+
function m(e) {
|
|
73
|
+
d.forEach(e, (r) => {
|
|
74
|
+
C(a.value, r);
|
|
75
|
+
const { checkedValues: t, filterKey: o } = r;
|
|
76
|
+
d.isEmpty(t) || (S.value.includes(o) ? a.value[o] = t[0] : a.value[o] = t);
|
|
77
|
+
}), s("filterChangeGrandson", a.value, l.value);
|
|
79
78
|
}
|
|
80
|
-
const
|
|
79
|
+
const H = (e) => {
|
|
80
|
+
c.value.searchContent = O(e) || "";
|
|
81
|
+
}, O = (e) => {
|
|
82
|
+
var t;
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
const r = (t = e.clipboardData) == null ? void 0 : t.getData("text/plain");
|
|
85
|
+
return r == null ? void 0 : r.replace(/[\n\r\t]+/g, ",");
|
|
86
|
+
}, _ = () => {
|
|
81
87
|
u.value ? m([
|
|
82
88
|
{
|
|
83
89
|
filterKey: "putSearch",
|
|
@@ -85,66 +91,66 @@ const xe = /* @__PURE__ */ L({
|
|
|
85
91
|
},
|
|
86
92
|
{
|
|
87
93
|
filterKey: "searchType",
|
|
88
|
-
checkedValues:
|
|
94
|
+
checkedValues: l.value
|
|
89
95
|
}
|
|
90
|
-
]) :
|
|
96
|
+
]) : s(
|
|
91
97
|
"filterChangeGrandson",
|
|
92
98
|
{
|
|
93
99
|
putSearch: i.value,
|
|
94
|
-
searchType:
|
|
100
|
+
searchType: l.value
|
|
95
101
|
},
|
|
96
|
-
|
|
102
|
+
l.value
|
|
97
103
|
);
|
|
98
|
-
},
|
|
99
|
-
y.value.validate((
|
|
100
|
-
|
|
104
|
+
}, b = { locale: q, emit: s, props: g, defaultSearch: v, options: T, showPatchSearch: w, specialOptions: h, showWithinFilterCheckbox: I, placeholderText: B, normalOptions: S, showSelect: D, searchItem: a, selectedSearchType: l, putSearch: i, isWithinFilterOptions: u, confirmLoading: f, showBatchSearch: p, batchSearchFormRef: y, batchSearchForm: c, rules: P, defalutOptions: K, showBatchSearchDialog: R, handleBatchSearchClose: W, searchWithinFilterOptions: A, getSearchItem: E, handleSearch: G, deleteExistProperty: C, filterChange: m, pasteFormat: H, replaceData: O, handlePutSearch: _, confirmSearch: () => {
|
|
105
|
+
y.value.validate((e) => {
|
|
106
|
+
e && (f.value = !0, u.value ? m([
|
|
101
107
|
{
|
|
102
108
|
filterKey: "putSearch",
|
|
103
|
-
checkedValues:
|
|
109
|
+
checkedValues: c.value.searchContent
|
|
104
110
|
},
|
|
105
111
|
{
|
|
106
112
|
filterKey: "searchType",
|
|
107
|
-
checkedValues:
|
|
113
|
+
checkedValues: c.value.searchType
|
|
108
114
|
}
|
|
109
|
-
]) :
|
|
115
|
+
]) : s(
|
|
110
116
|
"filterChangeGrandson",
|
|
111
117
|
{
|
|
112
|
-
putSearch:
|
|
113
|
-
searchType:
|
|
118
|
+
putSearch: c.value.searchContent,
|
|
119
|
+
searchType: c.value.searchType
|
|
114
120
|
},
|
|
115
|
-
|
|
116
|
-
),
|
|
121
|
+
l.value
|
|
122
|
+
), p.value = !1, f.value = !1);
|
|
117
123
|
});
|
|
118
124
|
}, get ElInput() {
|
|
119
125
|
return re;
|
|
120
126
|
}, get ElCheckbox() {
|
|
121
|
-
return
|
|
127
|
+
return te;
|
|
122
128
|
}, get ElSelect() {
|
|
123
|
-
return
|
|
129
|
+
return ee;
|
|
124
130
|
}, get ElDialog() {
|
|
125
|
-
return
|
|
131
|
+
return $;
|
|
126
132
|
}, get ElIcon() {
|
|
127
|
-
return
|
|
133
|
+
return Z;
|
|
128
134
|
}, get ElForm() {
|
|
129
|
-
return
|
|
135
|
+
return X;
|
|
130
136
|
}, get ElFormItem() {
|
|
131
|
-
return
|
|
137
|
+
return U;
|
|
132
138
|
}, get ElRow() {
|
|
133
|
-
return
|
|
139
|
+
return Q;
|
|
134
140
|
}, get ElButton() {
|
|
135
|
-
return
|
|
141
|
+
return N;
|
|
136
142
|
}, get ElOption() {
|
|
137
|
-
return
|
|
143
|
+
return M;
|
|
138
144
|
}, get ElLink() {
|
|
139
|
-
return
|
|
145
|
+
return J;
|
|
140
146
|
}, get ElConfigProvider() {
|
|
141
|
-
return
|
|
147
|
+
return Y;
|
|
142
148
|
}, get Search() {
|
|
143
|
-
return
|
|
149
|
+
return ae;
|
|
144
150
|
} };
|
|
145
|
-
return Object.defineProperty(
|
|
151
|
+
return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
|
|
146
152
|
}
|
|
147
153
|
});
|
|
148
154
|
export {
|
|
149
|
-
|
|
155
|
+
Te as default
|
|
150
156
|
};
|