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.
- package/es/drop-down-condition/drop-down-condition.vue.js +3 -3
- package/es/drop-down-condition/drop-down-condition.vue2.js +181 -212
- package/package.json +1 -1
- package/types/src/drop-down-condition/drop-down-condition.vue.d.ts +3 -5
- package/types/src/drop-down-condition/index.d.ts +3 -3
- package/types/src/installs.d.ts +3 -3
|
@@ -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=
|
|
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
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dfd23b62"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { stylesUtils as
|
|
4
|
-
import { storage as
|
|
5
|
-
import { M2 as
|
|
6
|
-
const be = { class: "yahee-drop-down-condition" },
|
|
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
|
-
|
|
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(
|
|
22
|
-
const
|
|
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 (
|
|
25
|
-
f.value = [...
|
|
56
|
+
if (O.value && O.value.length > 0) {
|
|
57
|
+
f.value = [...O.value];
|
|
26
58
|
return;
|
|
27
59
|
}
|
|
28
|
-
const e = `filter-key-${
|
|
29
|
-
l ? f.value = l :
|
|
30
|
-
f.value =
|
|
31
|
-
}).catch((
|
|
32
|
-
console.error(`获取${
|
|
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
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
|
73
|
+
function L() {
|
|
48
74
|
if (!f.value.length) return !0;
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
},
|
|
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
|
|
69
|
-
|
|
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
|
|
72
|
-
|
|
107
|
+
function U() {
|
|
108
|
+
P("setNoNeedRefreshNumFilterName", D.value);
|
|
73
109
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}), Object.keys(
|
|
78
|
-
delete
|
|
79
|
-
}), Object.keys(
|
|
80
|
-
delete
|
|
81
|
-
})
|
|
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
|
|
84
|
-
function
|
|
85
|
-
|
|
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
|
-
|
|
94
|
-
g.value === "single" ? e = c.value ? [c.value] : [] : e = Object.values(r).flat(), G("filterChange", [
|
|
124
|
+
P("filterChange", [
|
|
95
125
|
{
|
|
96
|
-
filterKey:
|
|
97
|
-
checkedValues:
|
|
126
|
+
filterKey: D.value,
|
|
127
|
+
checkedValues: Object.values(t).flat()
|
|
98
128
|
}
|
|
99
129
|
]);
|
|
100
130
|
}
|
|
101
|
-
function
|
|
102
|
-
const l = f.value.find((
|
|
103
|
-
l != null && l.subs && (
|
|
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
|
|
106
|
-
|
|
135
|
+
function fe(e) {
|
|
136
|
+
t[e] = [];
|
|
107
137
|
}
|
|
108
|
-
return
|
|
109
|
-
() =>
|
|
138
|
+
return I(
|
|
139
|
+
() => O.value,
|
|
110
140
|
(e) => {
|
|
111
|
-
e && e.length > 0 && (f.value = [...e],
|
|
141
|
+
e && e.length > 0 && (f.value = [...e], $());
|
|
112
142
|
},
|
|
113
143
|
{ deep: !0 }
|
|
114
|
-
),
|
|
115
|
-
() =>
|
|
144
|
+
), I(
|
|
145
|
+
() => v.value,
|
|
116
146
|
() => {
|
|
117
|
-
|
|
147
|
+
$();
|
|
118
148
|
}
|
|
119
|
-
),
|
|
120
|
-
[() =>
|
|
121
|
-
([e, l,
|
|
122
|
-
(!
|
|
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
|
-
),
|
|
154
|
+
), pe(() => {
|
|
125
155
|
se();
|
|
126
156
|
}), (e, l) => {
|
|
127
|
-
const
|
|
128
|
-
return
|
|
129
|
-
|
|
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:
|
|
133
|
-
onClick:
|
|
162
|
+
style: M(re(y.value)),
|
|
163
|
+
onClick: $
|
|
134
164
|
}, {
|
|
135
|
-
default:
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
171
|
+
K(C, {
|
|
142
172
|
ref_key: "dropdown1",
|
|
143
|
-
ref:
|
|
173
|
+
ref: ne,
|
|
144
174
|
"popper-class": "custom-dropdown",
|
|
145
|
-
onVisibleChange:
|
|
175
|
+
onVisibleChange: ie
|
|
146
176
|
}, {
|
|
147
|
-
dropdown:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
key:
|
|
151
|
-
modelValue:
|
|
152
|
-
"onUpdate:modelValue": (
|
|
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: (
|
|
185
|
+
onChange: (c) => ue(n)
|
|
156
186
|
}, {
|
|
157
|
-
default:
|
|
158
|
-
|
|
187
|
+
default: b(() => [
|
|
188
|
+
h(r).isNil(n.subs) ? (i(), V(s, {
|
|
159
189
|
key: 1,
|
|
160
|
-
value:
|
|
190
|
+
value: n.value,
|
|
161
191
|
class: "checkbox custom-dropdown-button",
|
|
162
|
-
border: ""
|
|
192
|
+
border: "",
|
|
193
|
+
disabled: _(n.value)
|
|
163
194
|
}, {
|
|
164
|
-
default:
|
|
165
|
-
|
|
195
|
+
default: b(() => [
|
|
196
|
+
N(g(h(m)(n.text)), 1)
|
|
166
197
|
]),
|
|
167
198
|
_: 2
|
|
168
|
-
}, 1032, ["value"])) : (
|
|
169
|
-
|
|
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:
|
|
172
|
-
onClick: (
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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:
|
|
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:
|
|
227
|
-
var
|
|
214
|
+
default: b(() => {
|
|
215
|
+
var S;
|
|
228
216
|
return [
|
|
229
|
-
|
|
230
|
-
|
|
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:
|
|
243
|
-
|
|
244
|
-
(
|
|
245
|
-
key:
|
|
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
|
-
|
|
235
|
+
n.isCheckbox ? (i(), V(a, {
|
|
248
236
|
key: 0,
|
|
249
|
-
modelValue:
|
|
250
|
-
"onUpdate:modelValue": (
|
|
237
|
+
modelValue: t[n.text],
|
|
238
|
+
"onUpdate:modelValue": (c) => t[n.text] = c,
|
|
251
239
|
class: "checkbox-group",
|
|
252
240
|
size: "small",
|
|
253
|
-
onChange:
|
|
241
|
+
onChange: ce
|
|
254
242
|
}, {
|
|
255
|
-
default:
|
|
256
|
-
|
|
243
|
+
default: b(() => [
|
|
244
|
+
K(s, {
|
|
257
245
|
class: "custom-dropdown-button",
|
|
258
|
-
value:
|
|
259
|
-
border: ""
|
|
246
|
+
value: n.value,
|
|
247
|
+
border: "",
|
|
248
|
+
disabled: _(n.value)
|
|
260
249
|
}, {
|
|
261
|
-
default:
|
|
262
|
-
|
|
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"])) :
|
|
257
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"])) : (i(), V(o, {
|
|
269
258
|
key: 1,
|
|
270
|
-
|
|
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: (
|
|
262
|
+
onClick: (c) => X(n),
|
|
263
|
+
disabled: _(n.value)
|
|
295
264
|
}, {
|
|
296
|
-
default:
|
|
297
|
-
var
|
|
265
|
+
default: b(() => {
|
|
266
|
+
var c;
|
|
298
267
|
return [
|
|
299
|
-
|
|
300
|
-
|
|
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
|
-
|
|
284
|
+
Se as default
|
|
316
285
|
};
|
package/package.json
CHANGED
|
@@ -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
|
-
/**
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
|
|
24
|
+
max?: number;
|
|
25
25
|
filterList?: DropdownEntity[];
|
|
26
26
|
totalCount?: number;
|
|
27
27
|
level1Count?: CountItem[];
|
package/types/src/installs.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
1440
|
+
max?: number;
|
|
1441
1441
|
filterList?: DropdownEntity[];
|
|
1442
1442
|
totalCount?: number;
|
|
1443
1443
|
level1Count?: CountItem[];
|