yahee-components 0.0.107 → 0.0.108

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,7 +1,225 @@
1
- import o from "./drop-down-condition.vue2.js";
2
- import "E:/工作/项目代码/common_componentsweb/packages/components/src/drop-down-condition/drop-down-condition.vue?vue&type=style&index=0&scoped=dfd23b62&lang.scss";
3
- import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dfd23b62"]]);
1
+ import { defineComponent as se, ref as m, reactive as _, toRefs as ae, watch as re, onMounted as ce, createElementBlock as i, openBlock as a, createVNode as W, unref as u, normalizeStyle as R, withCtx as d, createTextVNode as k, createCommentVNode as N, toDisplayString as v, createElementVNode as E, Fragment as b, renderList as z, createBlock as g } from "vue";
2
+ import s from "../_virtual/lodash.js";
3
+ import { stylesUtils as U } from "../utils/style.js";
4
+ import { storage as G } from "../utils/storage.js";
5
+ import { M2 as y } from "../utils/translate.js";
6
+ import { ElButton as P, ElDropdown as ie, ElCheckboxGroup as Y, ElCheckbox as j } from "element-plus";
7
+ import "element-plus/theme-chalk/src/base.scss";
8
+ import "element-plus/theme-chalk/src/button.scss";
9
+ import "element-plus/theme-chalk/src/checkbox.scss";
10
+ import "element-plus/theme-chalk/src/checkbox-group.scss";
11
+ import "element-plus/theme-chalk/src/button-group.scss";
12
+ import "element-plus/theme-chalk/src/popper.scss";
13
+ import "element-plus/theme-chalk/src/scrollbar.scss";
14
+ import "element-plus/theme-chalk/src/dropdown.scss";
15
+ const de = { class: "yahee-drop-down-condition" }, ve = { key: 0 }, fe = { style: { display: "flex", "align-items": "center", outline: "none" } }, pe = { key: 0 }, he = { style: { display: "flex", width: "auto", padding: "10px" } }, me = ["onClick"], ge = { class: "scrollable-container" }, ye = { key: 0 }, Ae = /* @__PURE__ */ se({
16
+ name: "YaheeDropDownCondition",
17
+ __name: "drop-down-condition",
18
+ props: {
19
+ filterList: {},
20
+ totalCount: {},
21
+ level1Count: {},
22
+ level2Count: {},
23
+ filterKey: {},
24
+ enumEntity: {},
25
+ noNeedRefreshNumFilterName: {},
26
+ initFilters: { type: Function }
27
+ },
28
+ emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
29
+ setup(H, { emit: J }) {
30
+ const Q = m(), n = _({});
31
+ let K = _({});
32
+ const c = _({}), p = _({}), h = m(!0), x = H, $ = J, { filterKey: w, filterList: M, totalCount: C, level1Count: V, level2Count: F, noNeedRefreshNumFilterName: O } = ae(x), T = m(s.get(C, "value", 0)), S = m(s.get(V, "value", [])), B = m(s.get(F, "value", [])), r = m();
33
+ M.value && (r.value = [...M.value]);
34
+ function q(t) {
35
+ const { text: o, value: e } = t, l = n[o];
36
+ s.isNil(l) || s.isEmpty(l) ? n[o] = [e] : n[o] = [], p[o] = !p[o], p[o] ? (oe(o), c[o] = U.getBackgroundColor(!0), h.value = !1) : (ne(o), c[t.text] = {}, h.value = !0), h.value = L(), D();
37
+ }
38
+ function L() {
39
+ const t = r.value.filter((l) => !s.isEmpty(l.subs)).flatMap((l) => l.subs).length, o = r.value.filter((l) => s.isEmpty(l.subs)).length;
40
+ return Object.values(n).map((l) => l.length).reduce((l, f) => l + f, 0) === t + o || s.isEmpty(Object.values(n).flat());
41
+ }
42
+ function X(t) {
43
+ s.isEmpty(n[t.text]) ? (c[t.text] = {}, p[t.text] = !1) : n[t.text].length === s.get(t, "subs.length", 1) ? (c[t.text] = U.getBackgroundColor(!0), p[t.text] = !0) : c[t.text] = {
44
+ backgroundColor: "#0F7535",
45
+ color: "#fff",
46
+ borderColor: "#0F7535"
47
+ }, h.value = L(), D();
48
+ }
49
+ function Z() {
50
+ h.value = L(), D();
51
+ }
52
+ function D() {
53
+ $("setNoNeedRefreshNumFilterName", w.value);
54
+ }
55
+ function ee() {
56
+ h.value = !0;
57
+ for (const t in c)
58
+ c[t] = {};
59
+ for (const t in n)
60
+ delete n[t];
61
+ for (const t in p)
62
+ delete p[t];
63
+ I();
64
+ }
65
+ const te = (t) => U.getBackgroundColor(t);
66
+ function le(t) {
67
+ if (t)
68
+ K = s.cloneDeep(n);
69
+ else {
70
+ if (s.isEqual(K, n))
71
+ return;
72
+ I();
73
+ }
74
+ }
75
+ function I() {
76
+ $("filterChange", [
77
+ {
78
+ filterKey: w.value,
79
+ checkedValues: Object.values(n).flat()
80
+ }
81
+ ]);
82
+ }
83
+ function oe(t) {
84
+ const o = r.value.find((e) => e.text === t);
85
+ o && o.subs && (n[t] = o.subs.map((e) => e.value));
86
+ }
87
+ function ne(t) {
88
+ n[t] = [];
89
+ }
90
+ function ue() {
91
+ const t = `filter-key-${x.enumEntity}`, o = G.getWithExpireTime(t);
92
+ o ? r.value = o : (console.log(x.enumEntity), x.initFilters(x.enumEntity).then((e) => {
93
+ console.log(e), r.value = e.data, G.setWithExpireTime(t, r.value, 1200 * 1e3), console.log(r.value);
94
+ }).catch((e) => {
95
+ console.log(e);
96
+ }));
97
+ }
98
+ return re(
99
+ [() => C.value, () => V.value, () => F.value],
100
+ ([t, o, e], [l, f, A]) => {
101
+ console.log(t, o, e), console.log(l, f, A), (!O.value || !s.eq(O.value, w.value)) && (T.value = C.value, S.value = V.value, B.value = F.value);
102
+ }
103
+ ), ce(() => {
104
+ ue();
105
+ }), (t, o) => (a(), i("div", de, [
106
+ W(u(P), {
107
+ size: "small",
108
+ class: "el-button el-button--small custom-total-button",
109
+ style: R(te(h.value)),
110
+ onClick: ee
111
+ }, {
112
+ default: d(() => [
113
+ k(v(u(y)("全部")) + " ", 1),
114
+ u(C) ? (a(), i("span", ve, "(" + v(T.value) + ")", 1)) : N("", !0)
115
+ ]),
116
+ _: 1
117
+ }, 8, ["style"]),
118
+ W(u(ie), {
119
+ ref_key: "dropdown1",
120
+ ref: Q,
121
+ "popper-class": "custom-dropdown",
122
+ onVisibleChange: le
123
+ }, {
124
+ dropdown: d(() => [
125
+ E("div", he, [
126
+ (a(!0), i(b, null, z(r.value, (e) => (a(), g(u(Y), {
127
+ key: e.value,
128
+ modelValue: n[e.text],
129
+ "onUpdate:modelValue": (l) => n[e.text] = l,
130
+ size: "small",
131
+ class: "checkbox-group inner-checkbox-group custom-dropdown-checkbox-group",
132
+ onChange: (l) => X(e)
133
+ }, {
134
+ default: d(() => [
135
+ u(s).isNil(e.subs) ? (a(), g(u(j), {
136
+ key: 1,
137
+ value: e.value,
138
+ class: "checkbox custom-dropdown-button",
139
+ border: ""
140
+ }, {
141
+ default: d(() => [
142
+ k(v(u(y)(e.text)), 1)
143
+ ]),
144
+ _: 2
145
+ }, 1032, ["value"])) : (a(), i(b, { key: 0 }, [
146
+ E("span", {
147
+ class: "el-button custom-dropdown-button el-button--small inner-el-button",
148
+ style: R(c[e.text]),
149
+ onClick: (l) => q(e)
150
+ }, v(u(y)(e.text)), 13, me),
151
+ E("div", ge, [
152
+ (a(!0), i(b, null, z(e.subs, (l) => (a(), g(u(j), {
153
+ key: l.value,
154
+ class: "checkbox custom-dropdown-button",
155
+ value: l.value,
156
+ border: ""
157
+ }, {
158
+ default: d(() => {
159
+ var f;
160
+ return [
161
+ k(v(u(y)(l.text)), 1),
162
+ u(s).isEmpty(B.value) ? N("", !0) : (a(), i("span", ye, "(" + v((f = B.value.filter((A) => A.value == l.value)[0]) == null ? void 0 : f.count) + ")", 1))
163
+ ];
164
+ }),
165
+ _: 2
166
+ }, 1032, ["value"]))), 128))
167
+ ])
168
+ ], 64))
169
+ ]),
170
+ _: 2
171
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))), 128))
172
+ ])
173
+ ]),
174
+ default: d(() => [
175
+ E("div", fe, [
176
+ (a(!0), i(b, null, z(r.value, (e) => (a(), i(b, null, [
177
+ e.isCheckbox ? (a(), g(u(Y), {
178
+ key: e.value,
179
+ modelValue: n[e.text],
180
+ "onUpdate:modelValue": (l) => n[e.text] = l,
181
+ class: "checkbox-group",
182
+ size: "small",
183
+ onChange: Z
184
+ }, {
185
+ default: d(() => [
186
+ e.isCheckbox ? (a(), g(u(j), {
187
+ key: 0,
188
+ class: "custom-dropdown-button",
189
+ value: e.value,
190
+ border: ""
191
+ }, {
192
+ default: d(() => [
193
+ k(v(u(y)(e.text)), 1)
194
+ ]),
195
+ _: 2
196
+ }, 1032, ["value"])) : N("", !0)
197
+ ]),
198
+ _: 2
199
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(), g(u(P), {
200
+ key: e.text,
201
+ style: R(c[e.text]),
202
+ class: "custom-dropdown-button",
203
+ size: "small",
204
+ onClick: (l) => q(e)
205
+ }, {
206
+ default: d(() => {
207
+ var l;
208
+ return [
209
+ k(v(u(y)(e.text)) + " ", 1),
210
+ u(s).isEmpty(S.value) ? N("", !0) : (a(), i("span", pe, "(" + v((l = S.value.filter((f) => f.value == e.value)[0]) == null ? void 0 : l.count) + ")", 1))
211
+ ];
212
+ }),
213
+ _: 2
214
+ }, 1032, ["style", "onClick"]))
215
+ ], 64))), 256))
216
+ ])
217
+ ]),
218
+ _: 1
219
+ }, 512)
220
+ ]));
221
+ }
222
+ });
5
223
  export {
6
- f as default
224
+ Ae as default
7
225
  };
@@ -1,285 +1,4 @@
1
- import { defineComponent as he, ref as k, reactive as j, toRefs as ee, watch as I, onMounted as pe, resolveComponent as F, createElementBlock as p, openBlock as i, createVNode as K, normalizeStyle as M, withCtx as b, createTextVNode as N, createCommentVNode as T, toDisplayString as g, unref as h, createElementVNode as B, Fragment as E, renderList as q, createBlock as V } from "vue";
2
- import r from "../_virtual/lodash.js";
3
- import { stylesUtils as w } from "../utils/style.js";
4
- import { storage as te } from "../utils/storage.js";
5
- import { M2 as m } from "../utils/translate.js";
6
- const be = { class: "yahee-drop-down-condition" }, ge = { key: 0 }, xe = { style: { display: "flex", "align-items": "center", outline: "none" } }, ke = { key: 0 }, me = { style: { display: "flex", width: "auto", padding: "10px" } }, ye = ["onClick", "disabled"], _e = { class: "scrollable-container" }, Ce = { key: 0 }, Se = /* @__PURE__ */ he({
7
- name: "YaheeDropDownCondition",
8
- __name: "drop-down-condition",
9
- props: {
10
- max: {},
11
- filterList: {},
12
- totalCount: {},
13
- level1Count: {},
14
- level2Count: {},
15
- filterKey: {},
16
- enumEntity: {},
17
- noNeedRefreshNumFilterName: {},
18
- initFilters: { type: Function }
19
- },
20
- emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
21
- setup(le, { emit: oe }) {
22
- const ne = k(), t = j({}), W = j({}), u = j({}), d = j({}), y = k(!0), f = k([]), x = le, { max: v = 1 / 0 } = ee(x), P = oe, { filterKey: D, filterList: O, totalCount: A, level1Count: Y, level2Count: G, noNeedRefreshNumFilterName: H } = ee(x), J = k(r.get(A, "value", 0)), R = k(r.get(Y, "value", [])), z = k(r.get(G, "value", []));
23
- function ae() {
24
- return Object.values(t).flat().length;
25
- }
26
- function _(e) {
27
- return v.value === 1 / 0 || ae() < v.value ? !1 : !Object.values(t).flat().includes(e);
28
- }
29
- function Q() {
30
- if (v.value === 1 / 0) return;
31
- const e = Object.values(t).flat();
32
- if (e.length > v.value) {
33
- const l = e.slice(0, v.value);
34
- Object.keys(t).forEach((o) => {
35
- t[o] = [], u[o] = {}, d[o] = !1;
36
- }), l.forEach((o) => {
37
- var s;
38
- for (const a of f.value)
39
- if (a.value === o) {
40
- t[a.text] = [o], u[a.text] = w.getBackgroundColor(!0), d[a.text] = !0;
41
- break;
42
- } else if ((s = a.subs) != null && s.some((C) => C.value === o)) {
43
- t[a.text] || (t[a.text] = []), t[a.text].push(o);
44
- const C = t[a.text].length, n = a.subs.length;
45
- C === n ? (u[a.text] = w.getBackgroundColor(!0), d[a.text] = !0) : u[a.text] = {
46
- backgroundColor: "#0F7535",
47
- color: "#fff",
48
- borderColor: "#0F7535"
49
- };
50
- break;
51
- }
52
- });
53
- }
54
- }
55
- function se() {
56
- if (O.value && O.value.length > 0) {
57
- f.value = [...O.value];
58
- return;
59
- }
60
- const e = `filter-key-${x.enumEntity}`, l = te.getWithExpireTime(e);
61
- l ? f.value = l : x.initFilters && x.initFilters(x.enumEntity).then((o) => {
62
- f.value = o.data, te.setWithExpireTime(e, f.value, 1200 * 1e3);
63
- }).catch((o) => {
64
- console.error(`获取${x.enumEntity}筛选列表失败:`, o);
65
- });
66
- }
67
- function X(e) {
68
- const { text: l, value: o } = e, s = t[l];
69
- v.value === 1 && Object.keys(t).forEach((a) => {
70
- t[a] = [], u[a] = {}, d[a] = !1;
71
- }), r.isNil(s) || r.isEmpty(s) ? t[l] = [o] : t[l] = [], d[l] = !d[l], d[l] ? (de(l), u[l] = w.getBackgroundColor(!0)) : (fe(l), u[e.text] = {}), y.value = L(), U();
72
- }
73
- function L() {
74
- if (!f.value.length) return !0;
75
- const e = f.value.filter((s) => !r.isEmpty(s.subs)).flatMap((s) => s.subs).length, l = f.value.filter((s) => r.isEmpty(s.subs)).length, o = Object.values(t).flat().length;
76
- return o === e + l || o === 0;
77
- }
78
- function ue(e) {
79
- if (v.value === 1) {
80
- const s = t[e.text].slice(-1)[0];
81
- Object.keys(t).forEach((a) => {
82
- t[a] = [], u[a] = {}, d[a] = !1;
83
- }), s && (t[e.text] = [s]);
84
- }
85
- Q();
86
- const l = t[e.text] || [], o = r.get(e, "subs.length", 1);
87
- r.isEmpty(l) ? (u[e.text] = {}, d[e.text] = !1) : l.length === o ? (u[e.text] = w.getBackgroundColor(!0), d[e.text] = !0) : u[e.text] = {
88
- backgroundColor: "#0F7535",
89
- color: "#fff",
90
- borderColor: "#0F7535"
91
- }, y.value = L(), U();
92
- }
93
- function ce() {
94
- if (v.value === 1) {
95
- let e;
96
- for (const l in t)
97
- if (t[l].length > 0) {
98
- e = t[l][0];
99
- break;
100
- }
101
- e && Object.keys(t).forEach((l) => {
102
- t[l] = t[l].filter((o) => o === e);
103
- });
104
- }
105
- Q(), y.value = L(), U();
106
- }
107
- function U() {
108
- P("setNoNeedRefreshNumFilterName", D.value);
109
- }
110
- function $() {
111
- y.value = !0, Object.keys(u).forEach((e) => {
112
- u[e] = {};
113
- }), Object.keys(t).forEach((e) => {
114
- delete t[e];
115
- }), Object.keys(d).forEach((e) => {
116
- delete d[e];
117
- }), Z();
118
- }
119
- const re = (e) => w.getBackgroundColor(e);
120
- function ie(e) {
121
- e ? Object.assign(W, r.cloneDeep(t)) : r.isEqual(W, t) || Z();
122
- }
123
- function Z() {
124
- P("filterChange", [
125
- {
126
- filterKey: D.value,
127
- checkedValues: Object.values(t).flat()
128
- }
129
- ]);
130
- }
131
- function de(e) {
132
- const l = f.value.find((o) => o.text === e);
133
- l != null && l.subs && (v.value === 1 ? t[e] = [l.subs[0].value] : t[e] = l.subs.map((o) => o.value));
134
- }
135
- function fe(e) {
136
- t[e] = [];
137
- }
138
- return I(
139
- () => O.value,
140
- (e) => {
141
- e && e.length > 0 && (f.value = [...e], $());
142
- },
143
- { deep: !0 }
144
- ), I(
145
- () => v.value,
146
- () => {
147
- $();
148
- }
149
- ), I(
150
- [() => A.value, () => Y.value, () => G.value],
151
- ([e, l, o]) => {
152
- (!H.value || !r.eq(H.value, D.value)) && (J.value = e, R.value = l, z.value = o);
153
- }
154
- ), pe(() => {
155
- se();
156
- }), (e, l) => {
157
- const o = F("el-button"), s = F("el-checkbox"), a = F("el-checkbox-group"), C = F("el-dropdown");
158
- return i(), p("div", be, [
159
- K(o, {
160
- size: "small",
161
- class: "el-button el-button--small custom-total-button",
162
- style: M(re(y.value)),
163
- onClick: $
164
- }, {
165
- default: b(() => [
166
- N(g(h(m)("全部")) + " ", 1),
167
- h(A) ? (i(), p("span", ge, "(" + g(J.value) + ")", 1)) : T("", !0)
168
- ]),
169
- _: 1
170
- }, 8, ["style"]),
171
- K(C, {
172
- ref_key: "dropdown1",
173
- ref: ne,
174
- "popper-class": "custom-dropdown",
175
- onVisibleChange: ie
176
- }, {
177
- dropdown: b(() => [
178
- B("div", me, [
179
- (i(!0), p(E, null, q(f.value, (n) => (i(), V(a, {
180
- key: n.value,
181
- modelValue: t[n.text],
182
- "onUpdate:modelValue": (c) => t[n.text] = c,
183
- size: "small",
184
- class: "checkbox-group inner-checkbox-group custom-dropdown-checkbox-group",
185
- onChange: (c) => ue(n)
186
- }, {
187
- default: b(() => [
188
- h(r).isNil(n.subs) ? (i(), V(s, {
189
- key: 1,
190
- value: n.value,
191
- class: "checkbox custom-dropdown-button",
192
- border: "",
193
- disabled: _(n.value)
194
- }, {
195
- default: b(() => [
196
- N(g(h(m)(n.text)), 1)
197
- ]),
198
- _: 2
199
- }, 1032, ["value", "disabled"])) : (i(), p(E, { key: 0 }, [
200
- B("span", {
201
- class: "el-button custom-dropdown-button el-button--small inner-el-button",
202
- style: M(u[n.text]),
203
- onClick: (c) => X(n),
204
- disabled: _(n.value)
205
- }, g(h(m)(n.text)), 13, ye),
206
- B("div", _e, [
207
- (i(!0), p(E, null, q(n.subs, (c) => (i(), V(s, {
208
- key: c.value,
209
- class: "checkbox custom-dropdown-button",
210
- value: c.value,
211
- border: "",
212
- disabled: _(c.value)
213
- }, {
214
- default: b(() => {
215
- var S;
216
- return [
217
- N(g(h(m)(c.text)), 1),
218
- h(r).isEmpty(z.value) ? T("", !0) : (i(), p("span", Ce, "(" + g((S = z.value.filter((ve) => ve.value == c.value)[0]) == null ? void 0 : S.count) + ")", 1))
219
- ];
220
- }),
221
- _: 2
222
- }, 1032, ["value", "disabled"]))), 128))
223
- ])
224
- ], 64))
225
- ]),
226
- _: 2
227
- }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))), 128))
228
- ])
229
- ]),
230
- default: b(() => [
231
- B("div", xe, [
232
- (i(!0), p(E, null, q(f.value, (n) => (i(), p(E, {
233
- key: n.value
234
- }, [
235
- n.isCheckbox ? (i(), V(a, {
236
- key: 0,
237
- modelValue: t[n.text],
238
- "onUpdate:modelValue": (c) => t[n.text] = c,
239
- class: "checkbox-group",
240
- size: "small",
241
- onChange: ce
242
- }, {
243
- default: b(() => [
244
- K(s, {
245
- class: "custom-dropdown-button",
246
- value: n.value,
247
- border: "",
248
- disabled: _(n.value)
249
- }, {
250
- default: b(() => [
251
- N(g(h(m)(n.text)), 1)
252
- ]),
253
- _: 2
254
- }, 1032, ["value", "disabled"])
255
- ]),
256
- _: 2
257
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : (i(), V(o, {
258
- key: 1,
259
- style: M(u[n.text]),
260
- class: "custom-dropdown-button",
261
- size: "small",
262
- onClick: (c) => X(n),
263
- disabled: _(n.value)
264
- }, {
265
- default: b(() => {
266
- var c;
267
- return [
268
- N(g(h(m)(n.text)) + " ", 1),
269
- h(r).isEmpty(R.value) ? T("", !0) : (i(), p("span", ke, "(" + g((c = R.value.filter((S) => S.value == n.value)[0]) == null ? void 0 : c.count) + ")", 1))
270
- ];
271
- }),
272
- _: 2
273
- }, 1032, ["style", "onClick", "disabled"]))
274
- ], 64))), 128))
275
- ])
276
- ]),
277
- _: 1
278
- }, 512)
279
- ]);
280
- };
281
- }
282
- });
1
+ import f from "./drop-down-condition.vue.js";
283
2
  export {
284
- Se as default
3
+ f as default
285
4
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.107",
4
+ "version": "0.0.108",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -1,40 +1,28 @@
1
- import { DropdownEntity, CountItem } from './drop-down-condition';
1
+ import { DropdownEntity } from './drop-down-condition';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComputedRef, Ref, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, GlobalComponents, GlobalDirectives } from 'vue';
3
3
  import { TooltipTriggerType, PopperEffect, Placement, Options, ButtonProps, Translator, TooltipInstance } from 'element-plus';
4
4
  type __VLS_Props = {
5
- /** 最大可选数量,默认不限制,传1即为单选 */
6
- max?: number;
7
- /** 父子层级渲染条件项(优先级最高,传入后跳过接口请求) */
8
- filterList?: DropdownEntity[];
9
- /** 当前条件下显示的条数 */
5
+ filterList?: Array<DropdownEntity>;
10
6
  totalCount?: number;
11
- /** 父级显示条数 */
12
- level1Count?: CountItem[];
13
- /** 子级显示数量 */
14
- level2Count?: CountItem[];
15
- /** 发往后端的请求参数key */
7
+ level1Count?: Array<{
8
+ value: string;
9
+ count: number;
10
+ }>;
11
+ level2Count?: Array<{
12
+ value: string;
13
+ count: number;
14
+ }>;
16
15
  filterKey: string;
17
- /** 后端接口枚举标识(用于缓存key) */
18
16
  enumEntity: string;
19
- /** 是否需要刷新当前项 */
20
17
  noNeedRefreshNumFilterName?: string;
21
- /** 查询接口方法(仅当未传入filterList时调用) */
22
- initFilters?: (enumEntity: string) => Promise<{
23
- data: DropdownEntity[];
24
- }>;
18
+ initFilters?: Function;
25
19
  };
26
20
  declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
27
- filterChange: (payload: {
28
- filterKey: string;
29
- checkedValues: string[];
30
- }[]) => any;
31
- setNoNeedRefreshNumFilterName: (filterKey: string) => any;
21
+ filterChange: (...args: any[]) => void;
22
+ setNoNeedRefreshNumFilterName: (...args: any[]) => void;
32
23
  }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
33
- onFilterChange?: (payload: {
34
- filterKey: string;
35
- checkedValues: string[];
36
- }[]) => any;
37
- onSetNoNeedRefreshNumFilterName?: (filterKey: string) => any;
24
+ onFilterChange?: (...args: any[]) => any;
25
+ onSetNoNeedRefreshNumFilterName?: (...args: any[]) => any;
38
26
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
39
27
  dropdown1: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
40
28
  readonly trigger: {
@@ -1,43 +1,43 @@
1
1
  import { SFCWithInstall } from '../utils/typescript';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComputedRef, Ref, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, GlobalComponents, GlobalDirectives } from 'vue';
3
- import { DropdownEntity, CountItem } from './drop-down-condition';
3
+ import { DropdownEntity } from './drop-down-condition';
4
4
  import { TooltipTriggerType, PopperEffect, Placement, Options, ButtonProps, Translator, TooltipInstance } from 'element-plus';
5
5
  export declare const YaheeDropDownCondition: SFCWithInstall<DefineComponent<{
6
- max?: number;
7
- filterList?: DropdownEntity[];
6
+ filterList?: Array< DropdownEntity>;
8
7
  totalCount?: number;
9
- level1Count?: CountItem[];
10
- level2Count?: CountItem[];
8
+ level1Count?: Array<{
9
+ value: string;
10
+ count: number;
11
+ }>;
12
+ level2Count?: Array<{
13
+ value: string;
14
+ count: number;
15
+ }>;
11
16
  filterKey: string;
12
17
  enumEntity: string;
13
18
  noNeedRefreshNumFilterName?: string;
14
- initFilters?: (enumEntity: string) => Promise<{
15
- data: DropdownEntity[];
16
- }>;
19
+ initFilters?: Function;
17
20
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
18
- filterChange: (payload: {
19
- filterKey: string;
20
- checkedValues: string[];
21
- }[]) => any;
22
- setNoNeedRefreshNumFilterName: (filterKey: string) => any;
21
+ filterChange: (...args: any[]) => void;
22
+ setNoNeedRefreshNumFilterName: (...args: any[]) => void;
23
23
  }, string, PublicProps, Readonly<{
24
- max?: number;
25
- filterList?: DropdownEntity[];
24
+ filterList?: Array< DropdownEntity>;
26
25
  totalCount?: number;
27
- level1Count?: CountItem[];
28
- level2Count?: CountItem[];
26
+ level1Count?: Array<{
27
+ value: string;
28
+ count: number;
29
+ }>;
30
+ level2Count?: Array<{
31
+ value: string;
32
+ count: number;
33
+ }>;
29
34
  filterKey: string;
30
35
  enumEntity: string;
31
36
  noNeedRefreshNumFilterName?: string;
32
- initFilters?: (enumEntity: string) => Promise<{
33
- data: DropdownEntity[];
34
- }>;
37
+ initFilters?: Function;
35
38
  }> & Readonly<{
36
- onFilterChange?: (payload: {
37
- filterKey: string;
38
- checkedValues: string[];
39
- }[]) => any;
40
- onSetNoNeedRefreshNumFilterName?: (filterKey: string) => any;
39
+ onFilterChange?: (...args: any[]) => any;
40
+ onSetNoNeedRefreshNumFilterName?: (...args: any[]) => any;
41
41
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
42
42
  dropdown1: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
43
43
  readonly trigger: {
@@ -8,7 +8,7 @@ import { ScrollbarDirection, UploadFile, UploadFiles, UploadProgressEvent, Uploa
8
8
  import { OnCleanup } from '@vue/reactivity';
9
9
  import { AnnexUploadProps } from './annex-upload';
10
10
  import { Option } from './static/CommonObject';
11
- import { DropdownEntity, CountItem } from './drop-down-condition/drop-down-condition';
11
+ import { DropdownEntity } from './drop-down-condition/drop-down-condition';
12
12
  import { data } from './country-platform-shop-condition/country-platform-shop-condition';
13
13
  import { CommonImportProps } from './common-import/props';
14
14
  import { PageObj } from './common-import/common-import';
@@ -1419,41 +1419,41 @@ declare const _default: (( SFCWithInstall<DefineComponent<ExtractPropTypes<{
1419
1419
  defaultValues: (string | boolean | number)[];
1420
1420
  enumEntity: string;
1421
1421
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>> & Record<string, any>) | ( SFCWithInstall<DefineComponent<{
1422
- max?: number;
1423
- filterList?: DropdownEntity[];
1422
+ filterList?: Array< DropdownEntity>;
1424
1423
  totalCount?: number;
1425
- level1Count?: CountItem[];
1426
- level2Count?: CountItem[];
1424
+ level1Count?: Array<{
1425
+ value: string;
1426
+ count: number;
1427
+ }>;
1428
+ level2Count?: Array<{
1429
+ value: string;
1430
+ count: number;
1431
+ }>;
1427
1432
  filterKey: string;
1428
1433
  enumEntity: string;
1429
1434
  noNeedRefreshNumFilterName?: string;
1430
- initFilters?: (enumEntity: string) => Promise<{
1431
- data: DropdownEntity[];
1432
- }>;
1435
+ initFilters?: Function;
1433
1436
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1434
- filterChange: (payload: {
1435
- filterKey: string;
1436
- checkedValues: string[];
1437
- }[]) => any;
1438
- setNoNeedRefreshNumFilterName: (filterKey: string) => any;
1437
+ filterChange: (...args: any[]) => void;
1438
+ setNoNeedRefreshNumFilterName: (...args: any[]) => void;
1439
1439
  }, string, PublicProps, Readonly<{
1440
- max?: number;
1441
- filterList?: DropdownEntity[];
1440
+ filterList?: Array< DropdownEntity>;
1442
1441
  totalCount?: number;
1443
- level1Count?: CountItem[];
1444
- level2Count?: CountItem[];
1442
+ level1Count?: Array<{
1443
+ value: string;
1444
+ count: number;
1445
+ }>;
1446
+ level2Count?: Array<{
1447
+ value: string;
1448
+ count: number;
1449
+ }>;
1445
1450
  filterKey: string;
1446
1451
  enumEntity: string;
1447
1452
  noNeedRefreshNumFilterName?: string;
1448
- initFilters?: (enumEntity: string) => Promise<{
1449
- data: DropdownEntity[];
1450
- }>;
1453
+ initFilters?: Function;
1451
1454
  }> & Readonly<{
1452
- onFilterChange?: (payload: {
1453
- filterKey: string;
1454
- checkedValues: string[];
1455
- }[]) => any;
1456
- onSetNoNeedRefreshNumFilterName?: (filterKey: string) => any;
1455
+ onFilterChange?: (...args: any[]) => any;
1456
+ onSetNoNeedRefreshNumFilterName?: (...args: any[]) => any;
1457
1457
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
1458
1458
  dropdown1: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
1459
1459
  readonly trigger: {