yahee-components 0.0.61 → 0.0.62
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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as re, toRefs as ie, ref as v, computed as ce, watch as fe, onMounted as de, nextTick as L, resolveComponent as K, createElementBlock as
|
|
1
|
+
import { defineComponent as re, toRefs as ie, ref as v, computed as ce, watch as fe, onMounted as de, nextTick as L, resolveComponent as K, createElementBlock as b, openBlock as p, createVNode as C, withCtx as q, unref as s, createCommentVNode as z, normalizeStyle as ve, toDisplayString as F, Fragment as me, renderList as pe, createBlock as ge, createTextVNode as M } from "vue";
|
|
2
2
|
import l from "../_virtual/lodash.js";
|
|
3
3
|
import ye from "./left-condition-sub.vue.js";
|
|
4
4
|
import { stylesUtils as he } from "../utils/style.js";
|
|
@@ -35,7 +35,7 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
35
35
|
setup(O, { expose: Y, emit: j }) {
|
|
36
36
|
const G = O, {
|
|
37
37
|
multiSelectList: w,
|
|
38
|
-
displayRangeInput:
|
|
38
|
+
displayRangeInput: R,
|
|
39
39
|
selectList: g,
|
|
40
40
|
hasNum: H,
|
|
41
41
|
allIsEmpty: Q,
|
|
@@ -46,15 +46,15 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
46
46
|
rangeEndKey: i,
|
|
47
47
|
noNeedRefreshNumFilterName: $,
|
|
48
48
|
defaultValues: h,
|
|
49
|
-
totalCount:
|
|
50
|
-
countList:
|
|
49
|
+
totalCount: _,
|
|
50
|
+
countList: x,
|
|
51
51
|
showTotal: Z
|
|
52
|
-
} = ie(G),
|
|
52
|
+
} = ie(G), E = j, A = v(_.value), f = v(), d = v(), T = v(x.value), u = /* @__PURE__ */ new Map(), c = v(!0), m = v([]), k = () => {
|
|
53
53
|
console.log("left condition notifyParent start"), L(() => {
|
|
54
|
-
var o,
|
|
54
|
+
var o, V;
|
|
55
55
|
const e = N(), t = ue();
|
|
56
56
|
if (l.isEmpty(e) && l.isEmpty(t)) {
|
|
57
|
-
|
|
57
|
+
S();
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
const a = [
|
|
@@ -63,20 +63,20 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
63
63
|
checkedValues: l.map(e, (n) => n.value)
|
|
64
64
|
}
|
|
65
65
|
];
|
|
66
|
-
|
|
66
|
+
R.value && (a.push({
|
|
67
67
|
filterKey: r.value,
|
|
68
68
|
checkedValues: [(o = u.get(r.value)) == null ? void 0 : o.value]
|
|
69
69
|
}), a.push({
|
|
70
70
|
filterKey: i.value,
|
|
71
|
-
checkedValues: [(
|
|
72
|
-
})),
|
|
71
|
+
checkedValues: [(V = u.get(i.value)) == null ? void 0 : V.value]
|
|
72
|
+
})), E("filterChange", a), console.log(
|
|
73
73
|
`left condition notifyParent nextTick after emit, filterKey: ${y.value}, checkedValues: ${JSON.stringify(l.map(e, (n) => n.value))}`
|
|
74
74
|
);
|
|
75
75
|
});
|
|
76
76
|
}, ee = () => {
|
|
77
|
-
|
|
77
|
+
E("setNoNeedRefreshNumFilterName");
|
|
78
78
|
}, U = () => {
|
|
79
|
-
|
|
79
|
+
I(), B({ label: r.value, selected: !0, value: f.value }), B({ label: i.value, selected: !0, value: d.value });
|
|
80
80
|
}, te = () => {
|
|
81
81
|
const e = u.get(r.value);
|
|
82
82
|
l.isEmpty(e) && !f.value || l.get(e, "value") === f.value || (U(), k());
|
|
@@ -84,7 +84,7 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
84
84
|
const e = u.get(i.value);
|
|
85
85
|
l.isEmpty(e) && !d.value || l.get(e, "value") === d.value || (U(), k());
|
|
86
86
|
};
|
|
87
|
-
function
|
|
87
|
+
function B(e) {
|
|
88
88
|
console.log(`left condition setSelectedStatusMap start, item: ${JSON.stringify(e)}`), u.set(e.label, {
|
|
89
89
|
selected: e.selected,
|
|
90
90
|
value: e.value
|
|
@@ -93,7 +93,7 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
93
93
|
function P(e) {
|
|
94
94
|
return l.includes(w.value, e.value);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function I() {
|
|
97
97
|
const e = l.map(N(), (t) => t.value);
|
|
98
98
|
u.clear(), l.forEach(m.value, (t) => {
|
|
99
99
|
l.includes(e, t.getValue().value) && t.resetValue();
|
|
@@ -103,7 +103,7 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
103
103
|
const e = l.map(N(), (t) => t.value);
|
|
104
104
|
u.clear(), l.forEach(m.value, (t) => {
|
|
105
105
|
l.includes(e, t.getValue().value) && t.resetValue();
|
|
106
|
-
}), c.value = !0;
|
|
106
|
+
}), c.value = !0, S();
|
|
107
107
|
}
|
|
108
108
|
const N = () => {
|
|
109
109
|
const e = l.filter(
|
|
@@ -122,25 +122,25 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
122
122
|
}, se = ce(() => l.sortBy(g.value, (e) => P(e))), D = () => {
|
|
123
123
|
f.value = void 0, d.value = void 0, u.delete(r.value), u.delete(i.value);
|
|
124
124
|
};
|
|
125
|
-
function
|
|
126
|
-
|
|
125
|
+
function S() {
|
|
126
|
+
I(), L(() => {
|
|
127
127
|
console.log("selectList.value:", g.value), c.value = !0;
|
|
128
128
|
const e = g.value.filter((a) => !P(a)), t = l.map(e, (a) => a.value);
|
|
129
|
-
|
|
129
|
+
E("filterChange", [
|
|
130
130
|
{
|
|
131
131
|
filterKey: y.value,
|
|
132
132
|
checkedValues: Q.value ? [] : t
|
|
133
133
|
}
|
|
134
134
|
]);
|
|
135
|
-
}),
|
|
135
|
+
}), R.value && D();
|
|
136
136
|
}
|
|
137
137
|
return fe(
|
|
138
|
-
[() =>
|
|
138
|
+
[() => _.value, () => x.value],
|
|
139
139
|
([e, t], [a, o]) => {
|
|
140
|
-
console.log(e, t), console.log(a, o), (!$.value || !l.eq($.value, y.value)) && (
|
|
140
|
+
console.log(e, t), console.log(a, o), (!$.value || !l.eq($.value, y.value)) && (A.value = _.value, T.value = x.value);
|
|
141
141
|
}
|
|
142
142
|
), Y({
|
|
143
|
-
clickAllSelected:
|
|
143
|
+
clickAllSelected: S,
|
|
144
144
|
resetAllCheckedValueAndSelectAll: ae
|
|
145
145
|
}), de(() => {
|
|
146
146
|
if (!Array.isArray(h.value) || l.isEmpty(h.value)) {
|
|
@@ -153,19 +153,19 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
153
153
|
}), k();
|
|
154
154
|
});
|
|
155
155
|
}), (e, t) => {
|
|
156
|
-
const a = K("el-input-number"), o = K("el-form-item"),
|
|
157
|
-
return p(),
|
|
158
|
-
|
|
156
|
+
const a = K("el-input-number"), o = K("el-form-item"), V = K("el-form");
|
|
157
|
+
return p(), b("div", ke, [
|
|
158
|
+
C(V, null, {
|
|
159
159
|
default: q(() => [
|
|
160
|
-
|
|
160
|
+
C(o, { label: s(X) }, {
|
|
161
161
|
default: q(() => [
|
|
162
|
-
s(Z) ? (p(),
|
|
162
|
+
s(Z) ? (p(), b("span", {
|
|
163
163
|
key: 0,
|
|
164
164
|
class: "el-button custom-button el-button--small",
|
|
165
165
|
style: ve(s(he).getBackgroundColor(c.value)),
|
|
166
|
-
onClick:
|
|
167
|
-
}, F(
|
|
168
|
-
(p(!0),
|
|
166
|
+
onClick: S
|
|
167
|
+
}, F(A.value ? `${s(J)("全部")}(${A.value})` : s(J)("全部")), 5)) : z("", !0),
|
|
168
|
+
(p(!0), b(me, null, pe(se.value, (n, oe) => (p(), ge(ye, {
|
|
169
169
|
key: oe,
|
|
170
170
|
ref_for: !0,
|
|
171
171
|
ref_key: "itemRefs",
|
|
@@ -176,16 +176,16 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
176
176
|
"count-list": T.value,
|
|
177
177
|
item: n,
|
|
178
178
|
"has-num": s(H),
|
|
179
|
-
onResetAllCheckedValue:
|
|
180
|
-
onSetSelectedStatusMap:
|
|
179
|
+
onResetAllCheckedValue: I,
|
|
180
|
+
onSetSelectedStatusMap: B,
|
|
181
181
|
onResetRange: D,
|
|
182
182
|
onSetNoNeedRefreshNumFilterName: ee,
|
|
183
183
|
onNotifyParent: k,
|
|
184
184
|
onResetIsSelectAll: ne
|
|
185
185
|
}, null, 8, ["all-is-checkbox", "multi-select-list", "translate-user-id", "count-list", "item", "has-num"]))), 128)),
|
|
186
|
-
s(
|
|
186
|
+
s(R) ? (p(), b("div", Ne, [
|
|
187
187
|
M(F(e.rangeLabel) + " ", 1),
|
|
188
|
-
|
|
188
|
+
C(a, {
|
|
189
189
|
modelValue: f.value,
|
|
190
190
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => f.value = n),
|
|
191
191
|
style: { "margin-left": "2px", width: "60px", height: "22px" },
|
|
@@ -197,7 +197,7 @@ const ke = { class: "yahee-left-condition" }, Ne = {
|
|
|
197
197
|
onBlur: te
|
|
198
198
|
}, null, 8, ["modelValue"]),
|
|
199
199
|
M(" % " + F(e.rangeDelimiter) + " ", 1),
|
|
200
|
-
|
|
200
|
+
C(a, {
|
|
201
201
|
modelValue: d.value,
|
|
202
202
|
"onUpdate:modelValue": t[1] || (t[1] = (n) => d.value = n),
|
|
203
203
|
style: { width: "60px", height: "22px" },
|