yahee-components 0.0.106 → 0.0.107

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,7 @@
1
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=f18be258&lang.scss";
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
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f18be258"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dfd23b62"]]);
5
5
  export {
6
- i as default
6
+ f as default
7
7
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as me, ref as V, reactive as D, toRefs as le, watch as Y, onMounted as _e, resolveComponent as E, createElementBlock as v, openBlock as n, createVNode as O, normalizeStyle as U, withCtx as i, createTextVNode as k, createCommentVNode as $, toDisplayString as d, unref as a, createElementVNode as S, Fragment as y, renderList as B, createBlock as _ } from "vue";
2
- import s from "../_virtual/lodash.js";
3
- import { stylesUtils as A } from "../utils/style.js";
4
- import { storage as oe } from "../utils/storage.js";
5
- import { M2 as h } from "../utils/translate.js";
6
- const be = { class: "yahee-drop-down-condition" }, ke = { key: 0 }, ye = { style: { display: "flex", "align-items": "center", outline: "none" } }, xe = { key: 0 }, Ce = { style: { display: "flex", width: "auto", padding: "10px" } }, Ne = ["onClick"], Ve = { class: "scrollable-container" }, we = { key: 0 }, Ee = ["onClick"], Se = { class: "scrollable-container" }, Fe = { key: 0 }, Oe = /* @__PURE__ */ me({
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
7
  name: "YaheeDropDownCondition",
8
8
  __name: "drop-down-condition",
9
9
  props: {
10
- mode: {},
10
+ max: {},
11
11
  filterList: {},
12
12
  totalCount: {},
13
13
  level1Count: {},
@@ -18,290 +18,259 @@ const be = { class: "yahee-drop-down-condition" }, ke = { key: 0 }, ye = { style
18
18
  initFilters: { type: Function }
19
19
  },
20
20
  emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
21
- setup(ne, { emit: ue }) {
22
- const ae = V(), r = D({}), R = D({}), b = D({}), x = D({}), m = V(!0), f = V([]), c = V(""), C = ne, { mode: g = "multiple" } = le(C), G = ue, { filterKey: L, filterList: j, totalCount: K, level1Count: H, level2Count: J, noNeedRefreshNumFilterName: Q } = le(C), X = V(s.get(K, "value", 0)), M = V(s.get(H, "value", [])), F = V(s.get(J, "value", []));
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
+ }
23
55
  function se() {
24
- if (j.value && j.value.length > 0) {
25
- f.value = [...j.value];
56
+ if (O.value && O.value.length > 0) {
57
+ f.value = [...O.value];
26
58
  return;
27
59
  }
28
- const e = `filter-key-${C.enumEntity}`, l = oe.getWithExpireTime(e);
29
- l ? f.value = l : C.initFilters && C.initFilters(C.enumEntity).then((u) => {
30
- f.value = u.data, oe.setWithExpireTime(e, f.value, 1200 * 1e3);
31
- }).catch((u) => {
32
- console.error(`获取${C.enumEntity}筛选列表失败:`, u);
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);
33
65
  });
34
66
  }
35
- function T(e) {
36
- return g.value === "single" ? c.value === e.value ? A.getBackgroundColor(!0) : {} : b[e.text] || {};
37
- }
38
- function q(e) {
39
- const { text: l, value: u } = e;
40
- if (g.value === "single") {
41
- c.value === u ? (c.value = "", m.value = !0) : (c.value = u, m.value = !1), w();
42
- return;
43
- }
44
- const p = r[l];
45
- s.isNil(p) || s.isEmpty(p) ? r[l] = [u] : r[l] = [], x[l] = !x[l], x[l] ? (pe(l), b[l] = A.getBackgroundColor(!0)) : (ge(l), b[e.text] = {}), m.value = z(), w();
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();
46
72
  }
47
- function z() {
73
+ function L() {
48
74
  if (!f.value.length) return !0;
49
- if (g.value === "single")
50
- return c.value === "";
51
- const e = f.value.filter((p) => !s.isEmpty(p.subs)).flatMap((p) => p.subs).length, l = f.value.filter((p) => s.isEmpty(p.subs)).length, u = Object.values(r).flat().length;
52
- return u === e + l || u === 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;
53
77
  }
54
- function re(e) {
55
- const l = r[e.text] || [], u = s.get(e, "subs.length", 1);
56
- s.isEmpty(l) ? (b[e.text] = {}, x[e.text] = !1) : l.length === u ? (b[e.text] = A.getBackgroundColor(!0), x[e.text] = !0) : b[e.text] = {
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] = {
57
88
  backgroundColor: "#0F7535",
58
89
  color: "#fff",
59
90
  borderColor: "#0F7535"
60
- }, m.value = z(), w();
61
- }
62
- function ce(e) {
63
- m.value = !1, w();
64
- }
65
- function ie() {
66
- m.value = z(), w();
91
+ }, y.value = L(), U();
67
92
  }
68
- function de() {
69
- m.value = z(), w();
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();
70
106
  }
71
- function w() {
72
- G("setNoNeedRefreshNumFilterName", L.value);
107
+ function U() {
108
+ P("setNoNeedRefreshNumFilterName", D.value);
73
109
  }
74
- function W() {
75
- m.value = !0, g.value === "single" ? c.value = "" : (Object.keys(b).forEach((e) => {
76
- b[e] = {};
77
- }), Object.keys(r).forEach((e) => {
78
- delete r[e];
79
- }), Object.keys(x).forEach((e) => {
80
- delete x[e];
81
- })), Z();
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();
82
118
  }
83
- const ve = (e) => A.getBackgroundColor(e);
84
- function fe(e) {
85
- if (e)
86
- g.value === "single" ? R.singleValue = c.value : Object.assign(R, s.cloneDeep(r));
87
- else {
88
- let l = !1;
89
- g.value === "single" ? l = R.singleValue !== c.value : l = !s.isEqual(R, r), l && Z();
90
- }
119
+ const re = (e) => w.getBackgroundColor(e);
120
+ function ie(e) {
121
+ e ? Object.assign(W, r.cloneDeep(t)) : r.isEqual(W, t) || Z();
91
122
  }
92
123
  function Z() {
93
- let e = [];
94
- g.value === "single" ? e = c.value ? [c.value] : [] : e = Object.values(r).flat(), G("filterChange", [
124
+ P("filterChange", [
95
125
  {
96
- filterKey: L.value,
97
- checkedValues: e
126
+ filterKey: D.value,
127
+ checkedValues: Object.values(t).flat()
98
128
  }
99
129
  ]);
100
130
  }
101
- function pe(e) {
102
- const l = f.value.find((u) => u.text === e);
103
- l != null && l.subs && (r[e] = l.subs.map((u) => u.value));
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));
104
134
  }
105
- function ge(e) {
106
- r[e] = [];
135
+ function fe(e) {
136
+ t[e] = [];
107
137
  }
108
- return Y(
109
- () => j.value,
138
+ return I(
139
+ () => O.value,
110
140
  (e) => {
111
- e && e.length > 0 && (f.value = [...e], W());
141
+ e && e.length > 0 && (f.value = [...e], $());
112
142
  },
113
143
  { deep: !0 }
114
- ), Y(
115
- () => g.value,
144
+ ), I(
145
+ () => v.value,
116
146
  () => {
117
- W();
147
+ $();
118
148
  }
119
- ), Y(
120
- [() => K.value, () => H.value, () => J.value],
121
- ([e, l, u]) => {
122
- (!Q.value || !s.eq(Q.value, L.value)) && (X.value = e, M.value = l, F.value = u);
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);
123
153
  }
124
- ), _e(() => {
154
+ ), pe(() => {
125
155
  se();
126
156
  }), (e, l) => {
127
- const u = E("el-button"), p = E("el-checkbox"), ee = E("el-checkbox-group"), I = E("el-radio"), te = E("el-radio-group"), he = E("el-dropdown");
128
- return n(), v("div", be, [
129
- O(u, {
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, {
130
160
  size: "small",
131
161
  class: "el-button el-button--small custom-total-button",
132
- style: U(ve(m.value)),
133
- onClick: W
162
+ style: M(re(y.value)),
163
+ onClick: $
134
164
  }, {
135
- default: i(() => [
136
- k(d(a(h)("全部")) + " ", 1),
137
- a(K) ? (n(), v("span", ke, "(" + d(X.value) + ")", 1)) : $("", !0)
165
+ default: b(() => [
166
+ N(g(h(m)("全部")) + " ", 1),
167
+ h(A) ? (i(), p("span", ge, "(" + g(J.value) + ")", 1)) : T("", !0)
138
168
  ]),
139
169
  _: 1
140
170
  }, 8, ["style"]),
141
- O(he, {
171
+ K(C, {
142
172
  ref_key: "dropdown1",
143
- ref: ae,
173
+ ref: ne,
144
174
  "popper-class": "custom-dropdown",
145
- onVisibleChange: fe
175
+ onVisibleChange: ie
146
176
  }, {
147
- dropdown: i(() => [
148
- S("div", Ce, [
149
- a(g) === "multiple" ? (n(!0), v(y, { key: 0 }, B(f.value, (t) => (n(), _(ee, {
150
- key: t.value,
151
- modelValue: r[t.text],
152
- "onUpdate:modelValue": (o) => r[t.text] = o,
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,
153
183
  size: "small",
154
184
  class: "checkbox-group inner-checkbox-group custom-dropdown-checkbox-group",
155
- onChange: (o) => re(t)
185
+ onChange: (c) => ue(n)
156
186
  }, {
157
- default: i(() => [
158
- a(s).isNil(t.subs) ? (n(), _(p, {
187
+ default: b(() => [
188
+ h(r).isNil(n.subs) ? (i(), V(s, {
159
189
  key: 1,
160
- value: t.value,
190
+ value: n.value,
161
191
  class: "checkbox custom-dropdown-button",
162
- border: ""
192
+ border: "",
193
+ disabled: _(n.value)
163
194
  }, {
164
- default: i(() => [
165
- k(d(a(h)(t.text)), 1)
195
+ default: b(() => [
196
+ N(g(h(m)(n.text)), 1)
166
197
  ]),
167
198
  _: 2
168
- }, 1032, ["value"])) : (n(), v(y, { key: 0 }, [
169
- S("span", {
199
+ }, 1032, ["value", "disabled"])) : (i(), p(E, { key: 0 }, [
200
+ B("span", {
170
201
  class: "el-button custom-dropdown-button el-button--small inner-el-button",
171
- style: U(T(t)),
172
- onClick: (o) => q(t)
173
- }, d(a(h)(t.text)), 13, Ne),
174
- S("div", Ve, [
175
- (n(!0), v(y, null, B(t.subs, (o) => (n(), _(p, {
176
- key: o.value,
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,
177
209
  class: "checkbox custom-dropdown-button",
178
- value: o.value,
179
- border: ""
180
- }, {
181
- default: i(() => {
182
- var N;
183
- return [
184
- k(d(a(h)(o.text)), 1),
185
- a(s).isEmpty(F.value) ? $("", !0) : (n(), v("span", we, "(" + d((N = F.value.filter((P) => P.value == o.value)[0]) == null ? void 0 : N.count) + ")", 1))
186
- ];
187
- }),
188
- _: 2
189
- }, 1032, ["value"]))), 128))
190
- ])
191
- ], 64))
192
- ]),
193
- _: 2
194
- }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))), 128)) : (n(!0), v(y, { key: 1 }, B(f.value, (t) => (n(), _(te, {
195
- key: t.value,
196
- modelValue: c.value,
197
- "onUpdate:modelValue": l[1] || (l[1] = (o) => c.value = o),
198
- size: "small",
199
- class: "radio-group inner-radio-group custom-dropdown-radio-group",
200
- onChange: (o) => ce()
201
- }, {
202
- default: i(() => [
203
- a(s).isNil(t.subs) ? (n(), _(I, {
204
- key: 1,
205
- value: t.value,
206
- class: "radio custom-dropdown-button",
207
- border: ""
208
- }, {
209
- default: i(() => [
210
- k(d(a(h)(t.text)), 1)
211
- ]),
212
- _: 2
213
- }, 1032, ["value"])) : (n(), v(y, { key: 0 }, [
214
- S("span", {
215
- class: "el-button custom-dropdown-button el-button--small inner-el-button",
216
- style: U(T(t)),
217
- onClick: (o) => q(t)
218
- }, d(a(h)(t.text)), 13, Ee),
219
- S("div", Se, [
220
- (n(!0), v(y, null, B(t.subs, (o) => (n(), _(I, {
221
- key: o.value,
222
- class: "radio custom-dropdown-button",
223
- value: o.value,
224
- border: ""
210
+ value: c.value,
211
+ border: "",
212
+ disabled: _(c.value)
225
213
  }, {
226
- default: i(() => {
227
- var N;
214
+ default: b(() => {
215
+ var S;
228
216
  return [
229
- k(d(a(h)(o.text)), 1),
230
- a(s).isEmpty(F.value) ? $("", !0) : (n(), v("span", Fe, "(" + d((N = F.value.filter((P) => P.value == o.value)[0]) == null ? void 0 : N.count) + ")", 1))
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))
231
219
  ];
232
220
  }),
233
221
  _: 2
234
- }, 1032, ["value"]))), 128))
222
+ }, 1032, ["value", "disabled"]))), 128))
235
223
  ])
236
224
  ], 64))
237
225
  ]),
238
226
  _: 2
239
- }, 1032, ["modelValue", "onChange"]))), 128))
227
+ }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))), 128))
240
228
  ])
241
229
  ]),
242
- default: i(() => [
243
- S("div", ye, [
244
- (n(!0), v(y, null, B(f.value, (t) => (n(), v(y, {
245
- key: t.value
230
+ default: b(() => [
231
+ B("div", xe, [
232
+ (i(!0), p(E, null, q(f.value, (n) => (i(), p(E, {
233
+ key: n.value
246
234
  }, [
247
- a(g) === "multiple" && t.isCheckbox ? (n(), _(ee, {
235
+ n.isCheckbox ? (i(), V(a, {
248
236
  key: 0,
249
- modelValue: r[t.text],
250
- "onUpdate:modelValue": (o) => r[t.text] = o,
237
+ modelValue: t[n.text],
238
+ "onUpdate:modelValue": (c) => t[n.text] = c,
251
239
  class: "checkbox-group",
252
240
  size: "small",
253
- onChange: ie
241
+ onChange: ce
254
242
  }, {
255
- default: i(() => [
256
- O(p, {
243
+ default: b(() => [
244
+ K(s, {
257
245
  class: "custom-dropdown-button",
258
- value: t.value,
259
- border: ""
246
+ value: n.value,
247
+ border: "",
248
+ disabled: _(n.value)
260
249
  }, {
261
- default: i(() => [
262
- k(d(a(h)(t.text)), 1)
250
+ default: b(() => [
251
+ N(g(h(m)(n.text)), 1)
263
252
  ]),
264
253
  _: 2
265
- }, 1032, ["value"])
254
+ }, 1032, ["value", "disabled"])
266
255
  ]),
267
256
  _: 2
268
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : a(g) === "single" && t.isCheckbox ? (n(), _(te, {
257
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : (i(), V(o, {
269
258
  key: 1,
270
- modelValue: c.value,
271
- "onUpdate:modelValue": l[0] || (l[0] = (o) => c.value = o),
272
- class: "radio-group",
273
- size: "small",
274
- onChange: de
275
- }, {
276
- default: i(() => [
277
- O(I, {
278
- class: "custom-dropdown-button",
279
- value: t.value,
280
- border: ""
281
- }, {
282
- default: i(() => [
283
- k(d(a(h)(t.text)), 1)
284
- ]),
285
- _: 2
286
- }, 1032, ["value"])
287
- ]),
288
- _: 2
289
- }, 1032, ["modelValue"])) : (n(), _(u, {
290
- key: t.text,
291
- style: U(T(t)),
259
+ style: M(u[n.text]),
292
260
  class: "custom-dropdown-button",
293
261
  size: "small",
294
- onClick: (o) => q(t)
262
+ onClick: (c) => X(n),
263
+ disabled: _(n.value)
295
264
  }, {
296
- default: i(() => {
297
- var o;
265
+ default: b(() => {
266
+ var c;
298
267
  return [
299
- k(d(a(h)(t.text)) + " ", 1),
300
- a(s).isEmpty(M.value) ? $("", !0) : (n(), v("span", xe, "(" + d((o = M.value.filter((N) => N.value == t.value)[0]) == null ? void 0 : o.count) + ")", 1))
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))
301
270
  ];
302
271
  }),
303
272
  _: 2
304
- }, 1032, ["style", "onClick"]))
273
+ }, 1032, ["style", "onClick", "disabled"]))
305
274
  ], 64))), 128))
306
275
  ])
307
276
  ]),
@@ -312,5 +281,5 @@ const be = { class: "yahee-drop-down-condition" }, ke = { key: 0 }, ye = { style
312
281
  }
313
282
  });
314
283
  export {
315
- Oe as default
284
+ Se as default
316
285
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.106",
4
+ "version": "0.0.107",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -1,11 +1,9 @@
1
- import { DropdownEntity } from './drop-down-condition';
2
- import { CountItem } from './drop-down-condition.type';
1
+ import { DropdownEntity, CountItem } from './drop-down-condition';
3
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComputedRef, Ref, CSSProperties, VNodeProps, AllowedComponentProps, ComponentCustomProps, GlobalComponents, GlobalDirectives } from 'vue';
4
3
  import { TooltipTriggerType, PopperEffect, Placement, Options, ButtonProps, Translator, TooltipInstance } from 'element-plus';
5
- type SelectMode = 'multiple' | 'single';
6
4
  type __VLS_Props = {
7
- /** 选择模式:multiple(多选) / single(单选) */
8
- mode?: SelectMode;
5
+ /** 最大可选数量,默认不限制,传1即为单选 */
6
+ max?: number;
9
7
  /** 父子层级渲染条件项(优先级最高,传入后跳过接口请求) */
10
8
  filterList?: DropdownEntity[];
11
9
  /** 当前条件下显示的条数 */
@@ -1,9 +1,9 @@
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 } from './drop-down-condition';
3
+ import { DropdownEntity, CountItem } 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
- mode?: "multiple" | "single";
6
+ max?: number;
7
7
  filterList?: DropdownEntity[];
8
8
  totalCount?: number;
9
9
  level1Count?: CountItem[];
@@ -21,7 +21,7 @@ export declare const YaheeDropDownCondition: SFCWithInstall<DefineComponent<{
21
21
  }[]) => any;
22
22
  setNoNeedRefreshNumFilterName: (filterKey: string) => any;
23
23
  }, string, PublicProps, Readonly<{
24
- mode?: "multiple" | "single";
24
+ max?: number;
25
25
  filterList?: DropdownEntity[];
26
26
  totalCount?: number;
27
27
  level1Count?: CountItem[];
@@ -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 } from './drop-down-condition/drop-down-condition';
11
+ import { DropdownEntity, CountItem } 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,7 +1419,7 @@ 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
- mode?: "multiple" | "single";
1422
+ max?: number;
1423
1423
  filterList?: DropdownEntity[];
1424
1424
  totalCount?: number;
1425
1425
  level1Count?: CountItem[];
@@ -1437,7 +1437,7 @@ declare const _default: (( SFCWithInstall<DefineComponent<ExtractPropTypes<{
1437
1437
  }[]) => any;
1438
1438
  setNoNeedRefreshNumFilterName: (filterKey: string) => any;
1439
1439
  }, string, PublicProps, Readonly<{
1440
- mode?: "multiple" | "single";
1440
+ max?: number;
1441
1441
  filterList?: DropdownEntity[];
1442
1442
  totalCount?: number;
1443
1443
  level1Count?: CountItem[];