yahee-components 0.0.96 → 0.0.98-beta
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.
- package/es/common-import/common-import.vue.js +183 -156
- package/es/complex-search/complex-search.vue.js +12 -12
- package/es/complex-search/complex-search.vue2.js +105 -112
- package/es/complex-search/props.js +1 -1
- package/es/filter-container/filter-container.vue.js +70 -0
- package/es/filter-container/filter-container.vue2.js +4 -0
- package/es/filter-container/index.js +7 -0
- package/es/filter-container/key.js +4 -0
- package/es/filter-wrapper/filter-wrapper.vue.js +7 -0
- package/es/filter-wrapper/filter-wrapper.vue2.js +60 -0
- package/es/filter-wrapper/index.js +7 -0
- package/es/help-tag/help-tag.vue.js +16 -14
- package/es/index.js +38 -34
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +5 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +8 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +15 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +7 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +5 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +54 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +7 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +6 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +9 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +7 -0
- package/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +22 -0
- package/es/utils/get-domain-base-url.js +4 -0
- package/es/yahee-components.css +1 -1
- package/package.json +1 -1
- package/types/src/complex-search/props.d.ts +1 -1
- package/types/src/components.d.ts +2 -0
- package/types/src/filter-container/filter-container.vue.d.ts +7 -15
- package/types/src/filter-container/key.d.ts +21 -0
- package/types/src/filter-wrapper/filter-wrapper.vue.d.ts +4 -5
- package/types/src/left-condition/index.d.ts +1 -1
- package/types/src/left-condition/left-condition.vue.d.ts +1 -1
- package/types/src/left-condition-enum/index.d.ts +1 -1
- package/types/src/left-condition-enum/left-condition-enum.vue.d.ts +1 -1
- package/types/src/utils/get-domain-base-url.d.ts +1 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _ from "./complex-search.vue2.js";
|
|
2
|
-
import { resolveComponent as r, createElementBlock as d, openBlock as n, Fragment as u, createElementVNode as b, createVNode as t, withKeys as B, createSlots as U, withCtx as a, renderList as i, createBlock as s, createCommentVNode as V, createTextVNode as
|
|
2
|
+
import { resolveComponent as r, createElementBlock as d, openBlock as n, Fragment as u, createElementVNode as b, createVNode as t, withKeys as B, createSlots as U, withCtx as a, renderList as i, createBlock as s, createCommentVNode as V, createTextVNode as c, toDisplayString as h } from "vue";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import O from "../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const z = { class: "yahee-complex-search" },
|
|
6
|
-
function
|
|
5
|
+
const z = { class: "yahee-complex-search" }, I = { class: "search-type-checkbox" }, P = { class: "dialog-footer" };
|
|
6
|
+
function W(e, o, E, N, $, K) {
|
|
7
7
|
const m = r("el-option"), p = r("el-select"), C = r("Search"), w = r("el-icon"), f = r("el-input"), g = r("el-checkbox"), v = r("el-link"), y = r("el-form-item"), S = r("el-row"), F = r("el-form"), k = r("el-button"), T = r("el-dialog");
|
|
8
8
|
return n(), d(u, null, [
|
|
9
9
|
b("div", z, [
|
|
@@ -78,15 +78,15 @@ function E(e, o, N, $, I, K) {
|
|
|
78
78
|
key: "1"
|
|
79
79
|
}
|
|
80
80
|
]), 1032, ["modelValue", "placeholder", "onChange", "onKeyup", "onPaste", "onClear"]),
|
|
81
|
-
b("div",
|
|
81
|
+
b("div", I, [
|
|
82
82
|
e.showWithinFilterCheckbox ? (n(), s(g, {
|
|
83
83
|
key: 0,
|
|
84
|
-
modelValue: e.
|
|
85
|
-
"onUpdate:modelValue": o[3] || (o[3] = (l) => e.
|
|
84
|
+
modelValue: e.localIsWithinFilterOptions,
|
|
85
|
+
"onUpdate:modelValue": o[3] || (o[3] = (l) => e.localIsWithinFilterOptions = l),
|
|
86
86
|
onChange: e.searchWithinFilterOptions
|
|
87
87
|
}, {
|
|
88
88
|
default: a(() => o[8] || (o[8] = [
|
|
89
|
-
h(
|
|
89
|
+
c(h("在筛选条件内查询"))
|
|
90
90
|
])),
|
|
91
91
|
_: 1,
|
|
92
92
|
__: [8]
|
|
@@ -97,7 +97,7 @@ function E(e, o, N, $, I, K) {
|
|
|
97
97
|
onClick: e.showBatchSearchDialog
|
|
98
98
|
}, {
|
|
99
99
|
default: a(() => o[9] || (o[9] = [
|
|
100
|
-
h(
|
|
100
|
+
c(h("批量查询"))
|
|
101
101
|
])),
|
|
102
102
|
_: 1,
|
|
103
103
|
__: [9]
|
|
@@ -114,21 +114,21 @@ function E(e, o, N, $, I, K) {
|
|
|
114
114
|
draggable: ""
|
|
115
115
|
}, {
|
|
116
116
|
footer: a(() => [
|
|
117
|
-
b("div",
|
|
117
|
+
b("div", P, [
|
|
118
118
|
t(k, {
|
|
119
119
|
type: "primary",
|
|
120
120
|
loading: e.confirmLoading,
|
|
121
121
|
onClick: e.confirmSearch
|
|
122
122
|
}, {
|
|
123
123
|
default: a(() => o[10] || (o[10] = [
|
|
124
|
-
h(
|
|
124
|
+
c(h("确认"))
|
|
125
125
|
])),
|
|
126
126
|
_: 1,
|
|
127
127
|
__: [10]
|
|
128
128
|
}, 8, ["loading", "onClick"]),
|
|
129
129
|
t(k, { onClick: e.handleBatchSearchClose }, {
|
|
130
130
|
default: a(() => o[11] || (o[11] = [
|
|
131
|
-
h(
|
|
131
|
+
c(h("关闭"))
|
|
132
132
|
])),
|
|
133
133
|
_: 1,
|
|
134
134
|
__: [11]
|
|
@@ -213,7 +213,7 @@ function E(e, o, N, $, I, K) {
|
|
|
213
213
|
}, 8, ["modelValue", "before-close"])
|
|
214
214
|
], 64);
|
|
215
215
|
}
|
|
216
|
-
const j = /* @__PURE__ */ O(_, [["render",
|
|
216
|
+
const j = /* @__PURE__ */ O(_, [["render", W], ["__scopeId", "data-v-715db21e"]]);
|
|
217
217
|
export {
|
|
218
218
|
j as default
|
|
219
219
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { ElLink as L, ElOption as P, ElButton as G, ElRow as K, ElFormItem as V, ElForm as j, ElIcon as q, ElDialog as Y, ElSelect as $, ElCheckbox as z, ElInput as J } from "element-plus";
|
|
1
|
+
import { defineComponent as w, toRefs as B, ref as n, watch as f } from "vue";
|
|
2
|
+
import { defaultComplexSearchProps as a } from "./props.js";
|
|
3
|
+
import { ElLink as g, ElOption as H, ElButton as x, ElRow as A, ElFormItem as R, ElForm as L, ElIcon as _, ElDialog as D, ElSelect as k, ElCheckbox as P, ElInput as j } from "element-plus";
|
|
5
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
6
5
|
import "element-plus/theme-chalk/src/input.scss";
|
|
7
6
|
import "element-plus/theme-chalk/src/checkbox.scss";
|
|
@@ -18,167 +17,161 @@ import "element-plus/theme-chalk/src/form-item.scss";
|
|
|
18
17
|
import "element-plus/theme-chalk/src/row.scss";
|
|
19
18
|
import "element-plus/theme-chalk/src/button.scss";
|
|
20
19
|
import "element-plus/theme-chalk/src/link.scss";
|
|
21
|
-
import { Search as
|
|
22
|
-
const
|
|
20
|
+
import { Search as q } from "@element-plus/icons-vue";
|
|
21
|
+
const se = w({
|
|
23
22
|
name: "YaheeComplexSearch",
|
|
24
23
|
components: {
|
|
25
|
-
ElInput:
|
|
26
|
-
ElCheckbox:
|
|
27
|
-
ElSelect:
|
|
28
|
-
ElDialog:
|
|
29
|
-
ElIcon:
|
|
30
|
-
ElForm:
|
|
31
|
-
ElFormItem:
|
|
32
|
-
ElRow:
|
|
33
|
-
ElButton:
|
|
34
|
-
ElOption:
|
|
35
|
-
ElLink:
|
|
36
|
-
Search:
|
|
24
|
+
ElInput: j,
|
|
25
|
+
ElCheckbox: P,
|
|
26
|
+
ElSelect: k,
|
|
27
|
+
ElDialog: D,
|
|
28
|
+
ElIcon: _,
|
|
29
|
+
ElForm: L,
|
|
30
|
+
ElFormItem: R,
|
|
31
|
+
ElRow: A,
|
|
32
|
+
ElButton: x,
|
|
33
|
+
ElOption: H,
|
|
34
|
+
ElLink: g,
|
|
35
|
+
Search: q
|
|
37
36
|
},
|
|
38
37
|
props: {
|
|
39
38
|
defaultSearch: {
|
|
40
39
|
type: String,
|
|
41
|
-
default:
|
|
40
|
+
default: a().defaultSearch
|
|
42
41
|
},
|
|
43
42
|
options: {
|
|
44
43
|
type: Array,
|
|
45
|
-
default:
|
|
44
|
+
default: a().options
|
|
46
45
|
},
|
|
47
46
|
placeholderText: {
|
|
48
47
|
type: String,
|
|
49
|
-
default:
|
|
48
|
+
default: a().placeholderText
|
|
50
49
|
},
|
|
51
50
|
showPatchSearch: {
|
|
52
51
|
type: Boolean,
|
|
53
|
-
default:
|
|
52
|
+
default: a().showPatchSearch
|
|
54
53
|
},
|
|
55
54
|
showWithinFilterCheckbox: {
|
|
56
55
|
type: Boolean,
|
|
57
|
-
default:
|
|
56
|
+
default: a().showWithinFilterCheckbox
|
|
57
|
+
},
|
|
58
|
+
isWithinFilterOptions: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: !1
|
|
58
61
|
},
|
|
59
62
|
specialOptions: {
|
|
60
63
|
type: Array,
|
|
61
|
-
default:
|
|
64
|
+
default: a().specialOptions
|
|
62
65
|
},
|
|
63
66
|
normalOptions: {
|
|
64
67
|
type: Array,
|
|
65
|
-
default:
|
|
68
|
+
default: a().normalOptions
|
|
66
69
|
},
|
|
67
70
|
showSelect: {
|
|
68
71
|
type: Boolean,
|
|
69
|
-
default:
|
|
72
|
+
default: a().showSelect
|
|
70
73
|
},
|
|
71
74
|
searchItem: {
|
|
72
75
|
type: Object,
|
|
73
|
-
default:
|
|
76
|
+
default: a().searchItem
|
|
74
77
|
},
|
|
75
78
|
isBatchSelectOptionsSameWithInput: {
|
|
76
79
|
type: Boolean,
|
|
77
|
-
default:
|
|
80
|
+
default: a().isBatchSelectOptionsSameWithInput
|
|
78
81
|
},
|
|
79
82
|
batchOptions: {
|
|
80
83
|
type: Array,
|
|
81
|
-
default:
|
|
84
|
+
default: a().batchOptions
|
|
82
85
|
}
|
|
83
86
|
},
|
|
84
|
-
emits: ["
|
|
85
|
-
setup(
|
|
86
|
-
const {
|
|
87
|
+
emits: ["update:isWithinFilterOptions", "search"],
|
|
88
|
+
setup(c, { emit: i }) {
|
|
89
|
+
const { searchItem: S } = B(c), h = n(c.defaultSearch || "WHOLE_SEARCH"), s = n(""), o = n(c.isWithinFilterOptions), u = n(!1), p = n(!1), m = n(null), r = n({ searchType: "WHOLE_SEARCH", searchContent: "" }), v = [{ value: "WHOLE_SEARCH", label: "综合搜索" }], O = {
|
|
87
90
|
searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
() =>
|
|
91
|
-
(
|
|
92
|
-
|
|
91
|
+
}, y = n({ ...S.value });
|
|
92
|
+
f(
|
|
93
|
+
() => S.value,
|
|
94
|
+
(e) => {
|
|
95
|
+
y.value = { ...e };
|
|
93
96
|
},
|
|
94
97
|
{ deep: !0 }
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
), f(
|
|
99
|
+
() => c.isWithinFilterOptions,
|
|
100
|
+
(e) => {
|
|
101
|
+
o.value = e;
|
|
102
|
+
}
|
|
103
|
+
), f(o, (e) => {
|
|
104
|
+
i("update:isWithinFilterOptions", e);
|
|
105
|
+
});
|
|
106
|
+
const C = () => {
|
|
107
|
+
i("search", {
|
|
108
|
+
putSearch: s.value || "",
|
|
109
|
+
searchType: h.value,
|
|
110
|
+
isWithinFilterOptions: o.value
|
|
111
|
+
});
|
|
112
|
+
}, E = () => {
|
|
113
|
+
s.value = "", i("search", {
|
|
114
|
+
putSearch: "",
|
|
115
|
+
searchType: h.value,
|
|
116
|
+
isWithinFilterOptions: o.value
|
|
117
|
+
});
|
|
110
118
|
}, W = () => {
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
v.isEmpty(c) ? delete e[m] : g.value.includes(m) ? e[m] = c[0] : e[m] = c;
|
|
125
|
-
}), n.value = e, f("update:searchItem", e), p.value && s();
|
|
126
|
-
}, A = (t) => {
|
|
127
|
-
const e = O(t);
|
|
128
|
-
e !== null && (h.value = e, setTimeout(() => {
|
|
129
|
-
s();
|
|
119
|
+
i("update:isWithinFilterOptions", o.value);
|
|
120
|
+
}, F = () => {
|
|
121
|
+
p.value = !0;
|
|
122
|
+
}, I = () => {
|
|
123
|
+
p.value = !1, r.value = { searchType: "WHOLE_SEARCH", searchContent: "" };
|
|
124
|
+
}, T = (e) => {
|
|
125
|
+
const t = d(e);
|
|
126
|
+
t !== null && (s.value = t, setTimeout(() => {
|
|
127
|
+
i("search", {
|
|
128
|
+
putSearch: s.value || "",
|
|
129
|
+
searchType: h.value,
|
|
130
|
+
isWithinFilterOptions: o.value
|
|
131
|
+
});
|
|
130
132
|
}, 50));
|
|
131
|
-
},
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
134
|
-
const
|
|
135
|
-
r.value.searchContent =
|
|
133
|
+
}, b = (e) => {
|
|
134
|
+
const t = d(e);
|
|
135
|
+
if (t) {
|
|
136
|
+
const l = r.value.searchContent || "";
|
|
137
|
+
r.value.searchContent = l ? `${l},${t}` : t;
|
|
136
138
|
}
|
|
137
|
-
},
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
return
|
|
139
|
+
}, d = (e) => {
|
|
140
|
+
var l;
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
const t = (l = e.clipboardData) == null ? void 0 : l.getData("text/plain");
|
|
143
|
+
return t == null ? void 0 : t.replace(/[\n\r\t]+/g, ",");
|
|
142
144
|
};
|
|
143
145
|
return {
|
|
144
|
-
selectedSearchType:
|
|
145
|
-
putSearch:
|
|
146
|
-
|
|
147
|
-
confirmLoading:
|
|
148
|
-
showBatchSearch:
|
|
149
|
-
batchSearchFormRef:
|
|
146
|
+
selectedSearchType: h,
|
|
147
|
+
putSearch: s,
|
|
148
|
+
localIsWithinFilterOptions: o,
|
|
149
|
+
confirmLoading: u,
|
|
150
|
+
showBatchSearch: p,
|
|
151
|
+
batchSearchFormRef: m,
|
|
150
152
|
batchSearchForm: r,
|
|
151
|
-
defalutOptions:
|
|
152
|
-
rules:
|
|
153
|
-
showBatchSearchDialog:
|
|
154
|
-
handleBatchSearchClose:
|
|
153
|
+
defalutOptions: v,
|
|
154
|
+
rules: O,
|
|
155
|
+
showBatchSearchDialog: F,
|
|
156
|
+
handleBatchSearchClose: I,
|
|
155
157
|
searchWithinFilterOptions: W,
|
|
156
|
-
handleSearch:
|
|
157
|
-
handleClear:
|
|
158
|
-
pasteFormatInput:
|
|
158
|
+
handleSearch: C,
|
|
159
|
+
handleClear: E,
|
|
160
|
+
pasteFormatInput: T,
|
|
159
161
|
confirmSearch: () => {
|
|
160
|
-
|
|
161
|
-
var
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
putSearch: r.value.searchContent.trim(),
|
|
168
|
-
searchType: r.value.searchType
|
|
169
|
-
} : a = {
|
|
170
|
-
putSearch: r.value.searchContent.trim(),
|
|
171
|
-
searchType: r.value.searchType
|
|
172
|
-
}, f("filterChangeGrandson", a, r.value.searchType), r.value = { searchType: "WHOLE_SEARCH", searchContent: "" }, u.value = !1, d.value = !1;
|
|
173
|
-
}
|
|
162
|
+
m.value && m.value.validate((t) => {
|
|
163
|
+
var l;
|
|
164
|
+
t && ((l = r.value.searchContent) != null && l.trim()) && (u.value = !0, i("search", {
|
|
165
|
+
putSearch: r.value.searchContent.trim(),
|
|
166
|
+
searchType: r.value.searchType,
|
|
167
|
+
isWithinFilterOptions: o.value
|
|
168
|
+
}), r.value = { searchType: "WHOLE_SEARCH", searchContent: "" }, p.value = !1, u.value = !1);
|
|
174
169
|
});
|
|
175
170
|
},
|
|
176
|
-
pasteFormat:
|
|
177
|
-
filterChange: H,
|
|
178
|
-
getSearchItem: () => n.value
|
|
171
|
+
pasteFormat: b
|
|
179
172
|
};
|
|
180
173
|
}
|
|
181
174
|
});
|
|
182
175
|
export {
|
|
183
|
-
|
|
176
|
+
se as default
|
|
184
177
|
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as K, ref as v, computed as p, useSlots as S, provide as M, onMounted as O, onUnmounted as V, createElementBlock as i, openBlock as u, createCommentVNode as y, renderSlot as I } from "vue";
|
|
2
|
+
import { filterContainerKey as $ } from "./key.js";
|
|
3
|
+
import g from "../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js";
|
|
4
|
+
const x = { class: "yahee-filter-container" }, z = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "filter-section"
|
|
7
|
+
}, N = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "search-section"
|
|
10
|
+
}, H = /* @__PURE__ */ K({
|
|
11
|
+
__name: "filter-container",
|
|
12
|
+
props: {
|
|
13
|
+
debounceInterval: { default: 300 },
|
|
14
|
+
immediate: { type: Boolean, default: !1 },
|
|
15
|
+
initialSearchItem: { default: () => ({}) },
|
|
16
|
+
showSearchSection: { type: Boolean, default: !1 }
|
|
17
|
+
},
|
|
18
|
+
emits: ["change", "search"],
|
|
19
|
+
setup(_, { expose: b, emit: C }) {
|
|
20
|
+
const n = _, c = C, t = v({});
|
|
21
|
+
n.initialSearchItem && Object.keys(n.initialSearchItem).length > 0 && (t.value = { ...n.initialSearchItem });
|
|
22
|
+
const s = v(/* @__PURE__ */ new Map()), k = p(() => s.value.size > 0 || !!S().filters), A = p(() => n.showSearchSection || Array.from(s.value.values()).some((e) => e.type === "search") || !!S().search), h = g((e) => {
|
|
23
|
+
c("change", e);
|
|
24
|
+
}, n.debounceInterval), m = g((e) => {
|
|
25
|
+
c("search", e);
|
|
26
|
+
}, n.debounceInterval), w = (e, a, r = "filter") => {
|
|
27
|
+
s.value.set(e, { methods: a, type: r });
|
|
28
|
+
}, E = (e) => {
|
|
29
|
+
s.value.delete(e);
|
|
30
|
+
}, d = (e) => {
|
|
31
|
+
const a = Array.isArray(e) ? e : [e], r = { ...t.value };
|
|
32
|
+
a.forEach((F) => {
|
|
33
|
+
const { filterKey: l, checkedValues: o } = F;
|
|
34
|
+
o.length === 0 || o[0] === "" || o[0] === null || o[0] === void 0 ? delete r[l] : o.length === 1 ? r[l] = o[0] : r[l] = o;
|
|
35
|
+
}), t.value = r, h({ ...r });
|
|
36
|
+
}, B = (e) => {
|
|
37
|
+
const a = { ...t.value, ...e };
|
|
38
|
+
t.value = a, m({ ...a });
|
|
39
|
+
}, j = () => {
|
|
40
|
+
t.value = { ...n.initialSearchItem }, s.value.forEach((e) => {
|
|
41
|
+
e.methods.reset && e.methods.reset();
|
|
42
|
+
}), c("change", { ...t.value });
|
|
43
|
+
}, f = () => ({ ...t.value });
|
|
44
|
+
return M($, {
|
|
45
|
+
registerComponent: w,
|
|
46
|
+
unregisterComponent: E,
|
|
47
|
+
updateSearchItem: d,
|
|
48
|
+
handleSearch: B,
|
|
49
|
+
getCurrentSearchItem: f
|
|
50
|
+
}), b({
|
|
51
|
+
resetAllFilters: j,
|
|
52
|
+
getCurrentSearchItem: f,
|
|
53
|
+
updateSearchItem: d
|
|
54
|
+
}), O(() => {
|
|
55
|
+
n.immediate && Object.keys(t.value).length > 0 && c("change", { ...t.value });
|
|
56
|
+
}), V(() => {
|
|
57
|
+
h.cancel(), m.cancel();
|
|
58
|
+
}), (e, a) => (u(), i("div", x, [
|
|
59
|
+
k.value ? (u(), i("div", z, [
|
|
60
|
+
I(e.$slots, "filters")
|
|
61
|
+
])) : y("", !0),
|
|
62
|
+
A.value ? (u(), i("div", N, [
|
|
63
|
+
I(e.$slots, "search")
|
|
64
|
+
])) : y("", !0)
|
|
65
|
+
]));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
H as default
|
|
70
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as f, inject as l, onMounted as d, onUnmounted as m, createElementBlock as h, openBlock as y, renderSlot as S } from "vue";
|
|
2
|
+
import { filterContainerKey as g } from "../filter-container/key.js";
|
|
3
|
+
const I = { class: "filter-wrapper yahee-filter-wrapper" }, v = /* @__PURE__ */ f({
|
|
4
|
+
name: "YaheeFilterWrapper",
|
|
5
|
+
__name: "filter-wrapper",
|
|
6
|
+
props: {
|
|
7
|
+
id: {},
|
|
8
|
+
filterKey: {},
|
|
9
|
+
type: { default: "filter" },
|
|
10
|
+
reset: { type: Function, default: void 0 },
|
|
11
|
+
immediate: { type: Boolean, default: !1 }
|
|
12
|
+
},
|
|
13
|
+
setup(p, { expose: u }) {
|
|
14
|
+
const r = p, e = l(g), n = (t = {}) => {
|
|
15
|
+
e && e.registerComponent(
|
|
16
|
+
r.id,
|
|
17
|
+
{
|
|
18
|
+
reset: r.reset || t.reset,
|
|
19
|
+
...t
|
|
20
|
+
},
|
|
21
|
+
r.type
|
|
22
|
+
);
|
|
23
|
+
}, a = (t) => {
|
|
24
|
+
if (!e) return;
|
|
25
|
+
const c = Array.isArray(t) ? t : [t];
|
|
26
|
+
e.updateSearchItem({
|
|
27
|
+
filterKey: r.filterKey,
|
|
28
|
+
checkedValues: c
|
|
29
|
+
});
|
|
30
|
+
}, o = () => e != null && e.getCurrentSearchItem ? e.getCurrentSearchItem() : {}, s = (t) => {
|
|
31
|
+
e != null && e.handleSearch && e.handleSearch(t);
|
|
32
|
+
}, i = () => {
|
|
33
|
+
r.reset && r.reset();
|
|
34
|
+
};
|
|
35
|
+
return u({
|
|
36
|
+
register: n,
|
|
37
|
+
updateFilter: a,
|
|
38
|
+
getCurrentSearchItem: o,
|
|
39
|
+
handleSearch: s,
|
|
40
|
+
reset: i
|
|
41
|
+
}), d(() => {
|
|
42
|
+
if (n({ reset: i }), r.immediate && (e != null && e.getCurrentSearchItem)) {
|
|
43
|
+
const t = e.getCurrentSearchItem();
|
|
44
|
+
t[r.filterKey] && a(t[r.filterKey]);
|
|
45
|
+
}
|
|
46
|
+
}), m(() => {
|
|
47
|
+
e && e.unregisterComponent(r.id);
|
|
48
|
+
}), (t, c) => (y(), h("div", I, [
|
|
49
|
+
S(t.$slots, "default", {
|
|
50
|
+
register: n,
|
|
51
|
+
update: a,
|
|
52
|
+
getCurrentSearchItem: o,
|
|
53
|
+
handleSearch: s
|
|
54
|
+
}, void 0, !0)
|
|
55
|
+
]));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
v as default
|
|
60
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as d, ref as e, nextTick as h, createElementBlock as
|
|
1
|
+
import { defineComponent as d, ref as e, nextTick as h, createElementBlock as m, openBlock as v, createVNode as r, unref as n, withCtx as a, withDirectives as g, createElementVNode as y, withModifiers as C } from "vue";
|
|
2
2
|
import { GetHelpTag as _ } from "../packages/components/api/log/index.js";
|
|
3
3
|
import { InfoFilled as k } from "@element-plus/icons-vue";
|
|
4
|
-
import { ElPopover as
|
|
4
|
+
import { ElPopover as T, vLoading as w, ElIcon as x } from "element-plus";
|
|
5
5
|
import "element-plus/theme-chalk/src/base.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/popper.scss";
|
|
7
7
|
import "element-plus/theme-chalk/src/popover.scss";
|
|
@@ -24,20 +24,22 @@ const H = ["innerHTML"], b = /* @__PURE__ */ d({
|
|
|
24
24
|
l.value && (l.value.style.height = `${s.tipsContentSize.height}px`), t.value && typeof t.value.updatePopper == "function" && t.value.updatePopper();
|
|
25
25
|
});
|
|
26
26
|
const u = () => {
|
|
27
|
-
p.value = !0,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
p.value = !0, setTimeout(() => {
|
|
28
|
+
_({ Id: s.tipsId }).then((o) => {
|
|
29
|
+
o && o.Content && (i.value = o.Content.Content);
|
|
30
|
+
}).catch(() => {
|
|
31
|
+
i.value = "加载失败,请重试";
|
|
32
|
+
}).finally(() => {
|
|
33
|
+
p.value = !1;
|
|
34
|
+
});
|
|
35
|
+
}, 3e3);
|
|
34
36
|
};
|
|
35
|
-
return (
|
|
37
|
+
return (o, I) => (v(), m("div", {
|
|
36
38
|
class: "yahee-help-tag",
|
|
37
39
|
ref_key: "yaheeHelpTag",
|
|
38
40
|
ref: f
|
|
39
41
|
}, [
|
|
40
|
-
r(
|
|
42
|
+
r(n(T), {
|
|
41
43
|
ref_key: "popoverRef",
|
|
42
44
|
ref: t,
|
|
43
45
|
placement: "bottom",
|
|
@@ -46,14 +48,14 @@ const H = ["innerHTML"], b = /* @__PURE__ */ d({
|
|
|
46
48
|
trigger: "click"
|
|
47
49
|
}, {
|
|
48
50
|
reference: a(() => [
|
|
49
|
-
r(
|
|
51
|
+
r(n(x), {
|
|
50
52
|
size: "18",
|
|
51
53
|
color: "#ccc",
|
|
52
54
|
onClick: C(u, ["stop"]),
|
|
53
55
|
style: { cursor: "pointer" }
|
|
54
56
|
}, {
|
|
55
57
|
default: a(() => [
|
|
56
|
-
r(
|
|
58
|
+
r(n(k))
|
|
57
59
|
]),
|
|
58
60
|
_: 1
|
|
59
61
|
})
|
|
@@ -65,7 +67,7 @@ const H = ["innerHTML"], b = /* @__PURE__ */ d({
|
|
|
65
67
|
ref: l,
|
|
66
68
|
innerHTML: i.value
|
|
67
69
|
}, null, 8, H), [
|
|
68
|
-
[
|
|
70
|
+
[n(w), p.value]
|
|
69
71
|
])
|
|
70
72
|
]),
|
|
71
73
|
_: 1
|