yahee-components 0.0.27 → 0.0.29

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 A, toRefs as I, reactive as z, ref as G, watch as ee, openBlock as s, createElementBlock as f, createVNode as E, unref as c, withCtx as V, createElementVNode as i, normalizeStyle as g, createTextVNode as L, toDisplayString as m, Fragment as C, renderList as k, createBlock as D } from "vue";
1
+ import { defineComponent as A, toRefs as I, reactive as z, ref as G, watch as ee, openBlock as s, createElementBlock as f, createVNode as E, unref as c, withCtx as V, createElementVNode as i, normalizeStyle as b, createTextVNode as L, toDisplayString as g, Fragment as C, renderList as k, createBlock as D } from "vue";
2
2
  import { stylesUtils as le } from "../utils/style.js";
3
3
  import { M2 as N } from "../utils/translate.js";
4
4
  import R from "../_virtual/lodash.js";
@@ -20,7 +20,7 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
20
20
  setup(H, { emit: P }) {
21
21
  const q = H, { filterKey: M, xyFilters: r } = I(q), Y = P, u = z({});
22
22
  let w = z({});
23
- const b = G({}), _ = G({}), y = G(!0), x = G({}), S = G({}), K = G();
23
+ const m = G({}), _ = G({}), y = G(!0), x = G({}), S = G({}), K = G();
24
24
  r.value && (K.value = [...r.value.xGroup]);
25
25
  function J(o, a) {
26
26
  var e;
@@ -93,7 +93,7 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
93
93
  let d = 0;
94
94
  for (const $ in u)
95
95
  $.startsWith(n.xGroupValue) && d++;
96
- d === 0 ? b.value[n.xGroupValue] = t : d === v ? b.value[n.xGroupValue] = e : b.value[n.xGroupValue] = l;
96
+ d === 0 ? m.value[n.xGroupValue] = t : d === v ? m.value[n.xGroupValue] = e : m.value[n.xGroupValue] = l;
97
97
  }), (W = r.value) == null || W.yGroup.forEach((n) => {
98
98
  let d = 0;
99
99
  for (const $ in u)
@@ -107,6 +107,7 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
107
107
  placement: "bottom",
108
108
  trigger: "hover",
109
109
  width: "'auto'",
110
+ "popper-class": "custom-popover",
110
111
  onHide: Q,
111
112
  onShow: X
112
113
  }, {
@@ -115,23 +116,22 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
115
116
  E(c(U), {
116
117
  size: "small",
117
118
  class: "el-button custom-total-button",
118
- style: g(T(y.value)),
119
+ style: b(T(y.value)),
119
120
  onClick: j
120
121
  }, {
121
122
  default: V(() => [
122
- L(m(c(N)("全部")), 1)
123
+ L(g(c(N)("全部")), 1)
123
124
  ]),
124
125
  _: 1
125
126
  }, 8, ["style"]),
126
127
  (s(!0), f(C, null, k(K.value, (e) => (s(), D(c(U), {
127
128
  key: e,
128
- style: g(b.value[e.xGroupValue]),
129
+ style: b(m.value[e.xGroupValue]),
129
130
  class: "custom-button",
130
- size: "small",
131
131
  onClick: (l) => F(e)
132
132
  }, {
133
133
  default: V(() => [
134
- L(m(c(N)(e.xGroupText)), 1)
134
+ L(g(c(N)(e.xGroupText)), 1)
135
135
  ]),
136
136
  _: 2
137
137
  }, 1032, ["style", "onClick"]))), 128))
@@ -145,8 +145,8 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
145
145
  i("tr", null, [
146
146
  i("th", ne, [
147
147
  i("span", {
148
- style: g(T(y.value)),
149
- class: "el-button custom-button",
148
+ style: b(T(y.value)),
149
+ class: "el-button el-button--small custom-button",
150
150
  onClick: j
151
151
  }, " 全部 ", 4)
152
152
  ]),
@@ -155,10 +155,10 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
155
155
  key: t.xGroupValue
156
156
  }, [
157
157
  i("span", {
158
- style: g({ ...b.value[t.xGroupValue], width: "100%" }),
159
- class: "el-button custom-button",
158
+ style: b({ ...m.value[t.xGroupValue], width: "100%" }),
159
+ class: "el-button--small el-button custom-button",
160
160
  onClick: (h) => F(t)
161
- }, m(t.xGroupText), 13, se)
161
+ }, g(t.xGroupText), 13, se)
162
162
  ]))), 128))
163
163
  ])
164
164
  ]),
@@ -170,10 +170,10 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
170
170
  }, [
171
171
  i("th", ce, [
172
172
  i("span", {
173
- style: g({ ..._.value[t.yGroupValue], width: "100%" }),
174
- class: "el-button custom-button",
173
+ style: b({ ..._.value[t.yGroupValue], width: "100%" }),
174
+ class: "el-button--small el-button custom-button",
175
175
  onClick: (v) => Z(t)
176
- }, m(t.yGroupText), 13, ie)
176
+ }, g(t.yGroupText), 13, ie)
177
177
  ]),
178
178
  (s(!0), f(C, null, k((h = c(r)) == null ? void 0 : h.xGroup, (v) => (s(), f("td", {
179
179
  key: v.xGroupValue
@@ -189,12 +189,13 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
189
189
  ), (p) => (s(), D(c(ue), {
190
190
  key: p.value,
191
191
  border: "",
192
- class: "el-button custom-button",
192
+ class: "el-button el-button-small custom-button",
193
193
  label: p.text,
194
- value: p.value
194
+ value: p.value,
195
+ size: "small"
195
196
  }, {
196
197
  default: V(() => [
197
- L(m(p.text), 1)
198
+ L(g(p.text), 1)
198
199
  ]),
199
200
  _: 2
200
201
  }, 1032, ["label", "value"]))), 128))
@@ -1,29 +1,42 @@
1
- .yahee-country-platform-shop-condition .popover-table {
1
+ .custom-popover .checkbox-group {
2
+ margin: 5px;
3
+ width: 100%;
4
+ }
5
+ .custom-popover .hover-trigger {
6
+ cursor: pointer;
7
+ color: blue;
8
+ }
9
+ .custom-popover .popover-table {
2
10
  width: auto;
3
11
  border: 1px solid transparent;
4
12
  border-collapse: separate;
5
13
  }
6
- .yahee-country-platform-shop-condition .popover-table tr,
7
- .yahee-country-platform-shop-condition .popover-table td {
14
+ .custom-popover .popover-table tr,
15
+ .custom-popover .popover-table td {
8
16
  text-align: left;
9
17
  cursor: pointer;
10
18
  min-height: 22px;
11
19
  }
12
- .yahee-country-platform-shop-condition .checkbox-group {
13
- margin: 5px;
14
- width: 100%;
15
- }
16
- .yahee-country-platform-shop-condition .popover-table th {
20
+ .custom-popover .popover-table th {
17
21
  text-align: left;
18
22
  cursor: pointer;
19
23
  min-height: 22px;
20
24
  border: 1px solid transparent;
21
25
  }
22
- .yahee-country-platform-shop-condition .popover-table td span {
26
+ .custom-popover .popover-table td span {
23
27
  display: block;
24
- margin-bottom: 4px;
25
28
  border: 1px solid transparent;
26
29
  }
30
+ .custom-popover .custom-total-button {
31
+ margin-right: 0;
32
+ padding: 1px 4px;
33
+ height: 22px;
34
+ }
35
+
36
+ .yahee-country-platform-shop-condition .checkbox-group {
37
+ margin: 5px;
38
+ width: 100%;
39
+ }
27
40
  .yahee-country-platform-shop-condition .hover-trigger {
28
41
  cursor: pointer;
29
42
  color: blue;
@@ -34,7 +47,6 @@
34
47
  height: 22px;
35
48
  }
36
49
  .yahee-country-platform-shop-condition .custom-button {
37
- width: 100%;
38
50
  min-height: 22px;
39
51
  min-width: 50px;
40
52
  height: 22px;
@@ -43,6 +55,6 @@
43
55
  .yahee-country-platform-shop-condition .custom-button.inner-el-button {
44
56
  margin-top: 5px;
45
57
  }
46
- .yahee-country-platform-shop-condition ::v-deep(.el-checkbox-button__inner) {
58
+ .yahee-country-platform-shop-condition :deep(.el-checkbox-button__inner) {
47
59
  width: 100%;
48
60
  }
@@ -1,9 +1,18 @@
1
- import { defineComponent as ce, ref as y, reactive as V, toRefs as re, watch as ie, onMounted as de, resolveComponent as w, openBlock as a, createElementBlock as v, createVNode as G, normalizeStyle as K, withCtx as f, createTextVNode as b, toDisplayString as h, unref as i, createCommentVNode as F, createElementVNode as S, Fragment as C, renderList as $, createBlock as x } from "vue";
2
- import u from "../_virtual/lodash.js";
3
- import { stylesUtils as M } from "../utils/style.js";
4
- import { storage as H } from "../utils/storage.js";
5
- import { M2 as k } from "../utils/translate.js";
6
- const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style: { display: "flex", "align-items": "center", outline: "none" } }, pe = { key: 0 }, ge = { style: { display: "flex", width: "auto", padding: "10px" } }, me = ["onClick"], ye = { class: "scrollable-container" }, xe = { key: 0 }, Ee = /* @__PURE__ */ ce({
1
+ import { defineComponent as se, ref as m, reactive as _, toRefs as ae, watch as ce, onMounted as re, openBlock as a, createElementBlock as i, createVNode as W, unref as u, normalizeStyle as R, withCtx as d, createTextVNode as k, toDisplayString as v, createCommentVNode as N, 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({
7
16
  name: "YaheeDropDownCondition",
8
17
  __name: "drop-down-condition",
9
18
  props: {
@@ -17,202 +26,200 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
17
26
  initFilters: { type: Function }
18
27
  },
19
28
  emits: ["filterChange", "setNoNeedRefreshNumFilterName"],
20
- setup(J, { emit: Q }) {
21
- const X = y(), o = V({});
22
- let O = V({});
23
- const d = V({}), p = V({}), g = y(!0), _ = J, T = Q, { filterKey: L, filterList: q, totalCount: N, level1Count: B, level2Count: A, noNeedRefreshNumFilterName: I } = re(_), W = y(u.get(N, "value", 0)), D = y(u.get(B, "value", [])), R = y(u.get(A, "value", [])), r = y();
24
- q.value && (r.value = [...q.value]);
25
- function P(e) {
26
- const { text: l, value: s } = e, n = o[l];
27
- u.isNil(n) || u.isEmpty(n) ? o[l] = [s] : o[l] = [], p[l] = !p[l], p[l] ? (ne(l), d[l] = M.getBackgroundColor(!0), g.value = !1) : (se(l), d[e.text] = {}, g.value = !0), g.value = z(), U();
29
+ setup(H, { emit: J }) {
30
+ const Q = m(), n = _({});
31
+ let K = _({});
32
+ const r = _({}), p = _({}), h = m(!0), x = H, $ = J, { filterKey: V, filterList: M, totalCount: C, level1Count: w, level2Count: F, noNeedRefreshNumFilterName: O } = ae(x), T = m(s.get(C, "value", 0)), S = m(s.get(w, "value", [])), B = m(s.get(F, "value", [])), c = m();
33
+ M.value && (c.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), r[o] = U.getBackgroundColor(!0), h.value = !1) : (ne(o), r[t.text] = {}, h.value = !0), h.value = L(), D();
28
37
  }
29
- function z() {
30
- const e = r.value.filter((n) => !u.isEmpty(n.subs)).flatMap((n) => n.subs).length, l = r.value.filter((n) => u.isEmpty(n.subs)).length;
31
- return Object.values(o).map((n) => n.length).reduce((n, m) => n + m, 0) === e + l || u.isEmpty(Object.values(o).flat());
38
+ function L() {
39
+ const t = c.value.filter((l) => !s.isEmpty(l.subs)).flatMap((l) => l.subs).length, o = c.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());
32
41
  }
33
- function Z(e) {
34
- u.isEmpty(o[e.text]) ? (d[e.text] = {}, p[e.text] = !1) : o[e.text].length === u.get(e, "subs.length", 1) ? (d[e.text] = M.getBackgroundColor(!0), p[e.text] = !0) : d[e.text] = {
42
+ function X(t) {
43
+ s.isEmpty(n[t.text]) ? (r[t.text] = {}, p[t.text] = !1) : n[t.text].length === s.get(t, "subs.length", 1) ? (r[t.text] = U.getBackgroundColor(!0), p[t.text] = !0) : r[t.text] = {
35
44
  backgroundColor: "#0F7535",
36
45
  color: "#fff",
37
46
  borderColor: "#0F7535"
38
- }, g.value = z(), U();
47
+ }, h.value = L(), D();
39
48
  }
40
- function ee() {
41
- g.value = z(), U();
49
+ function Z() {
50
+ h.value = L(), D();
42
51
  }
43
- function U() {
44
- T("setNoNeedRefreshNumFilterName", L.value);
52
+ function D() {
53
+ $("setNoNeedRefreshNumFilterName", V.value);
45
54
  }
46
- function te() {
47
- g.value = !0;
48
- for (const e in d)
49
- d[e] = {};
50
- for (const e in o)
51
- delete o[e];
52
- for (const e in p)
53
- delete p[e];
54
- Y();
55
+ function ee() {
56
+ h.value = !0;
57
+ for (const t in r)
58
+ r[t] = {};
59
+ for (const t in n)
60
+ delete n[t];
61
+ for (const t in p)
62
+ delete p[t];
63
+ I();
55
64
  }
56
- const le = (e) => M.getBackgroundColor(e);
57
- function oe(e) {
58
- if (e)
59
- O = u.cloneDeep(o);
65
+ const te = (t) => U.getBackgroundColor(t);
66
+ function le(t) {
67
+ if (t)
68
+ K = s.cloneDeep(n);
60
69
  else {
61
- if (u.isEqual(O, o))
70
+ if (s.isEqual(K, n))
62
71
  return;
63
- Y();
72
+ I();
64
73
  }
65
74
  }
66
- function Y() {
67
- T("filterChange", [
75
+ function I() {
76
+ $("filterChange", [
68
77
  {
69
- filterKey: L.value,
70
- checkedValues: Object.values(o).flat()
78
+ filterKey: V.value,
79
+ checkedValues: Object.values(n).flat()
71
80
  }
72
81
  ]);
73
82
  }
74
- function ne(e) {
75
- const l = r.value.find((s) => s.text === e);
76
- l && l.subs && (o[e] = l.subs.map((s) => s.value));
83
+ function oe(t) {
84
+ const o = c.value.find((e) => e.text === t);
85
+ o && o.subs && (n[t] = o.subs.map((e) => e.value));
77
86
  }
78
- function se(e) {
79
- o[e] = [];
87
+ function ne(t) {
88
+ n[t] = [];
80
89
  }
81
90
  function ue() {
82
- const e = `filter-key-${_.enumEntity}`, l = H.getWithExpireTime(e);
83
- l ? r.value = l : (console.log(_.enumEntity), _.initFilters(_.enumEntity).then((s) => {
84
- console.log(s), r.value = s.data, H.setWithExpireTime(e, r.value, 1200 * 1e3), console.log(r.value);
85
- }).catch((s) => {
86
- console.log(s);
91
+ const t = `filter-key-${x.enumEntity}`, o = G.getWithExpireTime(t);
92
+ o ? c.value = o : (console.log(x.enumEntity), x.initFilters(x.enumEntity).then((e) => {
93
+ console.log(e), c.value = e.data, G.setWithExpireTime(t, c.value, 1200 * 1e3), console.log(c.value);
94
+ }).catch((e) => {
95
+ console.log(e);
87
96
  }));
88
97
  }
89
- return ie(
90
- [() => N.value, () => B.value, () => A.value],
91
- ([e, l, s], [n, m, j]) => {
92
- console.log(e, l, s), console.log(n, m, j), (!I.value || !u.eq(I.value, L.value)) && (W.value = N.value, D.value = B.value, R.value = A.value);
98
+ return ce(
99
+ [() => C.value, () => w.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, V.value)) && (T.value = C.value, S.value = w.value, B.value = F.value);
93
102
  }
94
- ), de(() => {
103
+ ), re(() => {
95
104
  ue();
96
- }), (e, l) => {
97
- const s = w("el-button"), n = w("el-checkbox"), m = w("el-checkbox-group"), j = w("el-dropdown");
98
- return a(), v("div", ve, [
99
- G(s, {
100
- size: "small",
101
- class: "el-button custom-total-button",
102
- style: K(le(g.value)),
103
- onClick: te
104
- }, {
105
- default: f(() => [
106
- b(h(i(k)("全部")) + " ", 1),
107
- i(N) ? (a(), v("span", fe, "(" + h(W.value) + ")", 1)) : F("", !0)
108
- ]),
109
- _: 1
110
- }, 8, ["style"]),
111
- G(j, {
112
- ref_key: "dropdown1",
113
- ref: X,
114
- onVisibleChange: oe
115
- }, {
116
- dropdown: f(() => [
117
- S("div", ge, [
118
- (a(!0), v(C, null, $(r.value, (t) => (a(), x(m, {
119
- key: t.value,
120
- modelValue: o[t.text],
121
- "onUpdate:modelValue": (c) => o[t.text] = c,
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(c.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",
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-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-button el-button--small inner-el-button",
148
+ style: R(r[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-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(c.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",
122
182
  size: "small",
123
- class: "checkbox-group inner-checkbox-group",
124
- onChange: (c) => Z(t)
183
+ onChange: Z
125
184
  }, {
126
- default: f(() => [
127
- i(u).isNil(t.subs) ? (a(), x(n, {
128
- key: 1,
129
- value: t.value,
130
- class: "checkbox custom-button",
185
+ default: d(() => [
186
+ e.isCheckbox ? (a(), g(u(j), {
187
+ key: 0,
188
+ class: "custom-button",
189
+ value: e.value,
131
190
  border: ""
132
191
  }, {
133
- default: f(() => [
134
- b(h(i(k)(t.text)), 1)
192
+ default: d(() => [
193
+ k(v(u(y)(e.text)), 1)
135
194
  ]),
136
195
  _: 2
137
- }, 1032, ["value"])) : (a(), v(C, { key: 0 }, [
138
- S("span", {
139
- class: "el-button custom-button el-button--small inner-el-button",
140
- style: K(d[t.text]),
141
- onClick: (c) => P(t)
142
- }, h(i(k)(t.text)), 13, me),
143
- S("div", ye, [
144
- (a(!0), v(C, null, $(t.subs, (c) => (a(), x(n, {
145
- key: c.value,
146
- class: "checkbox custom-button",
147
- value: c.value,
148
- border: ""
149
- }, {
150
- default: f(() => {
151
- var E;
152
- return [
153
- b(h(i(k)(c.text)), 1),
154
- i(u).isEmpty(R.value) ? F("", !0) : (a(), v("span", xe, "(" + h((E = R.value.filter((ae) => ae.value == c.value)[0]) == null ? void 0 : E.count) + ")", 1))
155
- ];
156
- }),
157
- _: 2
158
- }, 1032, ["value"]))), 128))
159
- ])
160
- ], 64))
196
+ }, 1032, ["value"])) : N("", !0)
161
197
  ]),
162
198
  _: 2
163
- }, 1032, ["modelValue", "onUpdate:modelValue", "onChange"]))), 128))
164
- ])
165
- ]),
166
- default: f(() => [
167
- S("div", he, [
168
- (a(!0), v(C, null, $(r.value, (t) => (a(), v(C, null, [
169
- t.isCheckbox ? (a(), x(m, {
170
- key: t.value,
171
- modelValue: o[t.text],
172
- "onUpdate:modelValue": (c) => o[t.text] = c,
173
- class: "checkbox-group",
174
- size: "small",
175
- onChange: ee
176
- }, {
177
- default: f(() => [
178
- t.isCheckbox ? (a(), x(n, {
179
- key: 0,
180
- class: "custom-button",
181
- value: t.value,
182
- border: ""
183
- }, {
184
- default: f(() => [
185
- b(h(i(k)(t.text)), 1)
186
- ]),
187
- _: 2
188
- }, 1032, ["value"])) : F("", !0)
189
- ]),
190
- _: 2
191
- }, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(), x(s, {
192
- key: t.text,
193
- style: K(d[t.text]),
194
- class: "custom-button",
195
- size: "small",
196
- onClick: (c) => P(t)
197
- }, {
198
- default: f(() => {
199
- var c;
200
- return [
201
- b(h(i(k)(t.text)), 1),
202
- i(u).isEmpty(D.value) ? F("", !0) : (a(), v("span", pe, "(" + h((c = D.value.filter((E) => E.value == t.value)[0]) == null ? void 0 : c.count) + ")", 1))
203
- ];
204
- }),
205
- _: 2
206
- }, 1032, ["style", "onClick"]))
207
- ], 64))), 256))
208
- ])
209
- ]),
210
- _: 1
211
- }, 512)
212
- ]);
213
- };
199
+ }, 1032, ["modelValue", "onUpdate:modelValue"])) : (a(), g(u(P), {
200
+ key: e.text,
201
+ style: R(r[e.text]),
202
+ class: "custom-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
+ ]));
214
221
  }
215
222
  });
216
223
  export {
217
- Ee as default
224
+ Ae as default
218
225
  };
@@ -3,10 +3,6 @@
3
3
  /* 滚动槽 */
4
4
  /* 滚动条滑块 */
5
5
  }
6
- .yahee-drop-down-condition .checkbox-group {
7
- display: flex;
8
- flex-direction: column;
9
- }
10
6
  .yahee-drop-down-condition .checkbox {
11
7
  margin-top: 5px;
12
8
  }
@@ -15,15 +11,9 @@
15
11
  padding: 1px 4px;
16
12
  height: 22px;
17
13
  }
18
- .yahee-drop-down-condition .custom-button {
19
- margin-right: 0;
20
- padding: 1px 4px;
21
- min-height: 22px;
22
- height: 22px;
23
- margin-left: 5px;
24
- }
25
- .yahee-drop-down-condition .custom-button.inner-el-button {
26
- margin-top: 5px;
14
+ .yahee-drop-down-condition .checkbox-group {
15
+ display: flex;
16
+ flex-direction: column;
27
17
  }
28
18
  .yahee-drop-down-condition .scrollable-container {
29
19
  max-height: 700px;
@@ -42,4 +32,18 @@
42
32
  border-radius: 10px;
43
33
  background: rgba(0, 0, 0, 0.1);
44
34
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
35
+ }
36
+
37
+ .custom-dropdown .checkbox {
38
+ margin-top: 5px;
39
+ }
40
+ .custom-dropdown .custom-button {
41
+ margin-right: 0;
42
+ padding: 1px 4px;
43
+ min-height: 22px;
44
+ height: 22px;
45
+ margin-left: 5px;
46
+ }
47
+ .custom-dropdown .custom-button.inner-el-button {
48
+ margin-top: 5px;
45
49
  }
package/es/style.css CHANGED
@@ -107,10 +107,6 @@
107
107
  /* 滚动槽 */
108
108
  /* 滚动条滑块 */
109
109
  }
110
- .yahee-drop-down-condition .checkbox-group {
111
- display: flex;
112
- flex-direction: column;
113
- }
114
110
  .yahee-drop-down-condition .checkbox {
115
111
  margin-top: 5px;
116
112
  }
@@ -119,15 +115,9 @@
119
115
  padding: 1px 4px;
120
116
  height: 22px;
121
117
  }
122
- .yahee-drop-down-condition .custom-button {
123
- margin-right: 0;
124
- padding: 1px 4px;
125
- min-height: 22px;
126
- height: 22px;
127
- margin-left: 5px;
128
- }
129
- .yahee-drop-down-condition .custom-button.inner-el-button {
130
- margin-top: 5px;
118
+ .yahee-drop-down-condition .checkbox-group {
119
+ display: flex;
120
+ flex-direction: column;
131
121
  }
132
122
  .yahee-drop-down-condition .scrollable-container {
133
123
  max-height: 700px;
@@ -148,32 +138,59 @@
148
138
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
149
139
  }
150
140
 
151
- .yahee-country-platform-shop-condition .popover-table {
141
+ .custom-dropdown .checkbox {
142
+ margin-top: 5px;
143
+ }
144
+ .custom-dropdown .custom-button {
145
+ margin-right: 0;
146
+ padding: 1px 4px;
147
+ min-height: 22px;
148
+ height: 22px;
149
+ margin-left: 5px;
150
+ }
151
+ .custom-dropdown .custom-button.inner-el-button {
152
+ margin-top: 5px;
153
+ }
154
+
155
+ .custom-popover .checkbox-group {
156
+ margin: 5px;
157
+ width: 100%;
158
+ }
159
+ .custom-popover .hover-trigger {
160
+ cursor: pointer;
161
+ color: blue;
162
+ }
163
+ .custom-popover .popover-table {
152
164
  width: auto;
153
165
  border: 1px solid transparent;
154
166
  border-collapse: separate;
155
167
  }
156
- .yahee-country-platform-shop-condition .popover-table tr,
157
- .yahee-country-platform-shop-condition .popover-table td {
168
+ .custom-popover .popover-table tr,
169
+ .custom-popover .popover-table td {
158
170
  text-align: left;
159
171
  cursor: pointer;
160
172
  min-height: 22px;
161
173
  }
162
- .yahee-country-platform-shop-condition .checkbox-group {
163
- margin: 5px;
164
- width: 100%;
165
- }
166
- .yahee-country-platform-shop-condition .popover-table th {
174
+ .custom-popover .popover-table th {
167
175
  text-align: left;
168
176
  cursor: pointer;
169
177
  min-height: 22px;
170
178
  border: 1px solid transparent;
171
179
  }
172
- .yahee-country-platform-shop-condition .popover-table td span {
180
+ .custom-popover .popover-table td span {
173
181
  display: block;
174
- margin-bottom: 4px;
175
182
  border: 1px solid transparent;
176
183
  }
184
+ .custom-popover .custom-total-button {
185
+ margin-right: 0;
186
+ padding: 1px 4px;
187
+ height: 22px;
188
+ }
189
+
190
+ .yahee-country-platform-shop-condition .checkbox-group {
191
+ margin: 5px;
192
+ width: 100%;
193
+ }
177
194
  .yahee-country-platform-shop-condition .hover-trigger {
178
195
  cursor: pointer;
179
196
  color: blue;
@@ -184,7 +201,6 @@
184
201
  height: 22px;
185
202
  }
186
203
  .yahee-country-platform-shop-condition .custom-button {
187
- width: 100%;
188
204
  min-height: 22px;
189
205
  min-width: 50px;
190
206
  height: 22px;
@@ -193,7 +209,7 @@
193
209
  .yahee-country-platform-shop-condition .custom-button.inner-el-button {
194
210
  margin-top: 5px;
195
211
  }
196
- .yahee-country-platform-shop-condition ::v-deep(.el-checkbox-button__inner) {
212
+ .yahee-country-platform-shop-condition :deep(.el-checkbox-button__inner) {
197
213
  width: 100%;
198
214
  }
199
215
 
@@ -894,39 +910,6 @@
894
910
  margin-right: 45px;
895
911
  }
896
912
 
897
- :root {
898
- --el-color-primary: #3366cc;
899
- --el-text-color-regular: #000;
900
- --primary-color: #3d7eff;
901
- --success-color: #28c445;
902
- --error-color: #ff1e1e;
903
- --warning-color: #ff8746;
904
- --white-color: #fff;
905
- --black-color: #000;
906
- --text-color-primary: #252628;
907
- --text-color-regular: #1c1c1c;
908
- --text-color-secondary: #555;
909
- --text-color-list: #323233;
910
- --text-color-a4: #a4a4a4;
911
- --text-color-tag: #737373;
912
- --text-color-disabled: #eeeef5;
913
- --border-color-base: #e8ecf2;
914
- --border-color-light: #e4e7ed;
915
- --border-color-lighter: #ebeef5;
916
- --border-color-extra-light: #f2f6fc;
917
- --bg-color: #f0f3f9;
918
- --font-size-large: 18px;
919
- --font-size-medium: 16px;
920
- --font-size-base: 14px;
921
- --font-size-small: 12px;
922
- --font-size-extra-small: 10px;
923
- --font-family: "Hiragino Sans GB", "Microsoft YaHei","WenQuanYi Micro Hei",Verdana, arial,"Open Sans", sans-serif;
924
- --integer-font-family: avenir-heavy, pingfang sc, helvetica neue, arial, sans-serif;
925
- --box-shadow-base: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
926
- --el-menu-item-height: 40px;
927
- --el-card-padding: 10px;
928
- }
929
-
930
913
  :root {
931
914
  --el-color-primary: var(--primary-color);
932
915
  --el-color-primary-light-2: rgba(61, 126, 255, 0.8);
@@ -696,39 +696,6 @@
696
696
  margin-right: 45px;
697
697
  }
698
698
 
699
- :root {
700
- --el-color-primary: #3366cc;
701
- --el-text-color-regular: #000;
702
- --primary-color: #3d7eff;
703
- --success-color: #28c445;
704
- --error-color: #ff1e1e;
705
- --warning-color: #ff8746;
706
- --white-color: #fff;
707
- --black-color: #000;
708
- --text-color-primary: #252628;
709
- --text-color-regular: #1c1c1c;
710
- --text-color-secondary: #555;
711
- --text-color-list: #323233;
712
- --text-color-a4: #a4a4a4;
713
- --text-color-tag: #737373;
714
- --text-color-disabled: #eeeef5;
715
- --border-color-base: #e8ecf2;
716
- --border-color-light: #e4e7ed;
717
- --border-color-lighter: #ebeef5;
718
- --border-color-extra-light: #f2f6fc;
719
- --bg-color: #f0f3f9;
720
- --font-size-large: 18px;
721
- --font-size-medium: 16px;
722
- --font-size-base: 14px;
723
- --font-size-small: 12px;
724
- --font-size-extra-small: 10px;
725
- --font-family: "Hiragino Sans GB", "Microsoft YaHei","WenQuanYi Micro Hei",Verdana, arial,"Open Sans", sans-serif;
726
- --integer-font-family: avenir-heavy, pingfang sc, helvetica neue, arial, sans-serif;
727
- --box-shadow-base: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
728
- --el-menu-item-height: 40px;
729
- --el-card-padding: 10px;
730
- }
731
-
732
699
  :root {
733
700
  --el-color-primary: var(--primary-color);
734
701
  --el-color-primary-light-2: rgba(61, 126, 255, 0.8);
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),j=require("../utils/style.js"),_=require("../utils/translate.js"),N=require("../_virtual/lodash.js"),y=require("element-plus");require("element-plus/theme-chalk/src/base.scss");require("element-plus/theme-chalk/src/button.scss");require("element-plus/theme-chalk/src/checkbox.scss");require("element-plus/theme-chalk/src/checkbox-group.scss");require("element-plus/theme-chalk/src/popper.scss");require("element-plus/theme-chalk/src/popover.scss");const O={class:"yahee-country-platform-shop-condition"},W={class:"popover-table"},P={id:"all"},R=["onClick"],U={id:"y"},H=["onClick"],M={style:{display:"flex","align-items":"center",outline:"none"}},Y=e.defineComponent({name:"YaheeCountryPlatformShopCondition",__name:"country-platform-shop-condition",props:{xyFilters:{},filterKey:{}},emits:["filterChange"],setup($,{emit:w}){const L=$,{filterKey:q,xyFilters:a}=e.toRefs(L),F=w,r=e.reactive({});let m=e.reactive({});const v=e.ref({}),h=e.ref({}),f=e.ref(!0),V=e.ref({}),G=e.ref({}),g=e.ref();a.value&&(g.value=[...a.value.xGroup]);function T(o,n){var l;return(l=a.value)==null?void 0:l.items.filter(t=>t.xGroupValue===o&&t.yGroupValue===n)}function C(o){var l;const n=o.xGroupValue;if(V.value[n]){for(const t in r)t.startsWith(n)&&delete r[t];V.value[n]=!1}else{for(const t of(l=a.value)==null?void 0:l.items)if(t.xGroupValue===n){let u=r[`${t.xGroupValue}-${t.yGroupValue}`];u?(u.push(t.value),u=[...new Set(u)]):u=[t.value],r[`${t.xGroupValue}-${t.yGroupValue}`]=u}V.value[n]=!0}}const b=o=>j.stylesUtils.getBackgroundColor(o),z=()=>{N.isEqual(m,r)||F("filterChange",[{filterKey:q.value,checkedValues:Object.values(Object.values(r)).flat()}])},D=()=>{m=N.cloneDeep(r)};function x(){if(f.value)f.value=!1,Object.keys(r).forEach(o=>{delete r[o]});else{f.value=!0;for(const o of a.value.items){let n=r[`${o.xGroupValue}-${o.yGroupValue}`];n?n.push(o.value):n=[o.value],r[`${o.xGroupValue}-${o.yGroupValue}`]=n}}console.log(r)}function K(o){const n=o.yGroupValue;if(G.value[n]){for(const l in r)l.endsWith(n)&&delete r[l];G.value[n]=!1}else{for(const l of a.value.items)if(l.yGroupValue===n){let t=r[`${l.xGroupValue}-${l.yGroupValue}`];t?(t.push(l.value),t=[...new Set(t)]):t=[l.value],r[`${l.xGroupValue}-${l.yGroupValue}`]=t}G.value[n]=!0}}return e.watch(r,(o,n)=>{var s,E,S,B;Object.keys(o).forEach(c=>{Array.isArray(o[c])&&o[c].length===0&&delete o[c]}),console.log("新的数组:",o),console.log("旧的数组:",n);const l={backgroundColor:"#3366CC",color:"#fff",borderColor:"#3366CC"},t={backgroundColor:"#00bfff",borderColor:"#00bfff"},u={},d=(s=a.value)==null?void 0:s.xGroup.length,i=(E=a.value)==null?void 0:E.yGroup.length;(S=a.value)==null||S.xGroup.forEach(c=>{let p=0;for(const k in r)k.startsWith(c.xGroupValue)&&p++;p===0?v.value[c.xGroupValue]=u:p===i?v.value[c.xGroupValue]=l:v.value[c.xGroupValue]=t}),(B=a.value)==null||B.yGroup.forEach(c=>{let p=0;for(const k in r)k.endsWith(c.yGroupValue)&&p++;p===0?h.value[c.yGroupValue]=u:p===d?h.value[c.yGroupValue]=l:h.value[c.yGroupValue]=t}),f.value=Object.keys(o).length===d*i},{deep:!0}),(o,n)=>(e.openBlock(),e.createElementBlock("div",O,[e.createVNode(e.unref(y.ElPopover),{placement:"bottom",trigger:"hover",width:"'auto'",onHide:z,onShow:D},{reference:e.withCtx(()=>[e.createElementVNode("div",M,[e.createVNode(e.unref(y.ElButton),{size:"small",class:"el-button custom-total-button",style:e.normalizeStyle(b(f.value)),onClick:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(_.M2)("全部")),1)]),_:1},8,["style"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createBlock(e.unref(y.ElButton),{key:l,style:e.normalizeStyle(v.value[l.xGroupValue]),class:"custom-button",size:"small",onClick:t=>C(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(_.M2)(l.xGroupText)),1)]),_:2},1032,["style","onClick"]))),128))])]),default:e.withCtx(()=>{var l,t;return[e.createElementVNode("table",W,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",P,[e.createElementVNode("span",{style:e.normalizeStyle(b(f.value)),class:"el-button custom-button",onClick:x}," 全部 ",4)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((l=e.unref(a))==null?void 0:l.xGroup,u=>(e.openBlock(),e.createElementBlock("th",{id:"x",key:u.xGroupValue},[e.createElementVNode("span",{style:e.normalizeStyle({...v.value[u.xGroupValue],width:"100%"}),class:"el-button custom-button",onClick:d=>C(u)},e.toDisplayString(u.xGroupText),13,R)]))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((t=e.unref(a))==null?void 0:t.yGroup,u=>{var d;return e.openBlock(),e.createElementBlock("tr",{key:u.yGroupValue},[e.createElementVNode("th",U,[e.createElementVNode("span",{style:e.normalizeStyle({...h.value[u.yGroupValue],width:"100%"}),class:"el-button custom-button",onClick:i=>K(u)},e.toDisplayString(u.yGroupText),13,H)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((d=e.unref(a))==null?void 0:d.xGroup,i=>(e.openBlock(),e.createElementBlock("td",{key:i.xGroupValue},[e.createVNode(e.unref(y.ElCheckboxGroup),{modelValue:r[i.xGroupValue+"-"+u.yGroupValue],"onUpdate:modelValue":s=>r[i.xGroupValue+"-"+u.yGroupValue]=s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T(i.xGroupValue,u.yGroupValue),s=>(e.openBlock(),e.createBlock(e.unref(y.ElCheckbox),{key:s.value,border:"",class:"el-button custom-button",label:s.text,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.text),1)]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]))),128))])}),128))])])]}),_:1})]))}});module.exports=Y;
1
+ "use strict";const e=require("vue"),j=require("../utils/style.js"),_=require("../utils/translate.js"),N=require("../_virtual/lodash.js"),y=require("element-plus");require("element-plus/theme-chalk/src/base.scss");require("element-plus/theme-chalk/src/button.scss");require("element-plus/theme-chalk/src/checkbox.scss");require("element-plus/theme-chalk/src/checkbox-group.scss");require("element-plus/theme-chalk/src/popper.scss");require("element-plus/theme-chalk/src/popover.scss");const O={class:"yahee-country-platform-shop-condition"},W={class:"popover-table"},P={id:"all"},R=["onClick"],U={id:"y"},H=["onClick"],M={style:{display:"flex","align-items":"center",outline:"none"}},Y=e.defineComponent({name:"YaheeCountryPlatformShopCondition",__name:"country-platform-shop-condition",props:{xyFilters:{},filterKey:{}},emits:["filterChange"],setup($,{emit:w}){const L=$,{filterKey:q,xyFilters:n}=e.toRefs(L),F=w,r=e.reactive({});let k=e.reactive({});const v=e.ref({}),h=e.ref({}),f=e.ref(!0),V=e.ref({}),G=e.ref({}),g=e.ref();n.value&&(g.value=[...n.value.xGroup]);function T(o,a){var l;return(l=n.value)==null?void 0:l.items.filter(t=>t.xGroupValue===o&&t.yGroupValue===a)}function b(o){var l;const a=o.xGroupValue;if(V.value[a]){for(const t in r)t.startsWith(a)&&delete r[t];V.value[a]=!1}else{for(const t of(l=n.value)==null?void 0:l.items)if(t.xGroupValue===a){let u=r[`${t.xGroupValue}-${t.yGroupValue}`];u?(u.push(t.value),u=[...new Set(u)]):u=[t.value],r[`${t.xGroupValue}-${t.yGroupValue}`]=u}V.value[a]=!0}}const C=o=>j.stylesUtils.getBackgroundColor(o),z=()=>{N.isEqual(k,r)||F("filterChange",[{filterKey:q.value,checkedValues:Object.values(Object.values(r)).flat()}])},D=()=>{k=N.cloneDeep(r)};function x(){if(f.value)f.value=!1,Object.keys(r).forEach(o=>{delete r[o]});else{f.value=!0;for(const o of n.value.items){let a=r[`${o.xGroupValue}-${o.yGroupValue}`];a?a.push(o.value):a=[o.value],r[`${o.xGroupValue}-${o.yGroupValue}`]=a}}console.log(r)}function K(o){const a=o.yGroupValue;if(G.value[a]){for(const l in r)l.endsWith(a)&&delete r[l];G.value[a]=!1}else{for(const l of n.value.items)if(l.yGroupValue===a){let t=r[`${l.xGroupValue}-${l.yGroupValue}`];t?(t.push(l.value),t=[...new Set(t)]):t=[l.value],r[`${l.xGroupValue}-${l.yGroupValue}`]=t}G.value[a]=!0}}return e.watch(r,(o,a)=>{var s,E,S,B;Object.keys(o).forEach(c=>{Array.isArray(o[c])&&o[c].length===0&&delete o[c]}),console.log("新的数组:",o),console.log("旧的数组:",a);const l={backgroundColor:"#3366CC",color:"#fff",borderColor:"#3366CC"},t={backgroundColor:"#00bfff",borderColor:"#00bfff"},u={},d=(s=n.value)==null?void 0:s.xGroup.length,i=(E=n.value)==null?void 0:E.yGroup.length;(S=n.value)==null||S.xGroup.forEach(c=>{let p=0;for(const m in r)m.startsWith(c.xGroupValue)&&p++;p===0?v.value[c.xGroupValue]=u:p===i?v.value[c.xGroupValue]=l:v.value[c.xGroupValue]=t}),(B=n.value)==null||B.yGroup.forEach(c=>{let p=0;for(const m in r)m.endsWith(c.yGroupValue)&&p++;p===0?h.value[c.yGroupValue]=u:p===d?h.value[c.yGroupValue]=l:h.value[c.yGroupValue]=t}),f.value=Object.keys(o).length===d*i},{deep:!0}),(o,a)=>(e.openBlock(),e.createElementBlock("div",O,[e.createVNode(e.unref(y.ElPopover),{placement:"bottom",trigger:"hover",width:"'auto'","popper-class":"custom-popover",onHide:z,onShow:D},{reference:e.withCtx(()=>[e.createElementVNode("div",M,[e.createVNode(e.unref(y.ElButton),{size:"small",class:"el-button custom-total-button",style:e.normalizeStyle(C(f.value)),onClick:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(_.M2)("全部")),1)]),_:1},8,["style"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createBlock(e.unref(y.ElButton),{key:l,style:e.normalizeStyle(v.value[l.xGroupValue]),class:"custom-button",onClick:t=>b(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(_.M2)(l.xGroupText)),1)]),_:2},1032,["style","onClick"]))),128))])]),default:e.withCtx(()=>{var l,t;return[e.createElementVNode("table",W,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",P,[e.createElementVNode("span",{style:e.normalizeStyle(C(f.value)),class:"el-button el-button--small custom-button",onClick:x}," 全部 ",4)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((l=e.unref(n))==null?void 0:l.xGroup,u=>(e.openBlock(),e.createElementBlock("th",{id:"x",key:u.xGroupValue},[e.createElementVNode("span",{style:e.normalizeStyle({...v.value[u.xGroupValue],width:"100%"}),class:"el-button--small el-button custom-button",onClick:d=>b(u)},e.toDisplayString(u.xGroupText),13,R)]))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((t=e.unref(n))==null?void 0:t.yGroup,u=>{var d;return e.openBlock(),e.createElementBlock("tr",{key:u.yGroupValue},[e.createElementVNode("th",U,[e.createElementVNode("span",{style:e.normalizeStyle({...h.value[u.yGroupValue],width:"100%"}),class:"el-button--small el-button custom-button",onClick:i=>K(u)},e.toDisplayString(u.yGroupText),13,H)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((d=e.unref(n))==null?void 0:d.xGroup,i=>(e.openBlock(),e.createElementBlock("td",{key:i.xGroupValue},[e.createVNode(e.unref(y.ElCheckboxGroup),{modelValue:r[i.xGroupValue+"-"+u.yGroupValue],"onUpdate:modelValue":s=>r[i.xGroupValue+"-"+u.yGroupValue]=s},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T(i.xGroupValue,u.yGroupValue),s=>(e.openBlock(),e.createBlock(e.unref(y.ElCheckbox),{key:s.value,border:"",class:"el-button el-button-small custom-button",label:s.text,value:s.value,size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.text),1)]),_:2},1032,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]))),128))])}),128))])])]}),_:1})]))}});module.exports=Y;
@@ -1,29 +1,42 @@
1
- .yahee-country-platform-shop-condition .popover-table {
1
+ .custom-popover .checkbox-group {
2
+ margin: 5px;
3
+ width: 100%;
4
+ }
5
+ .custom-popover .hover-trigger {
6
+ cursor: pointer;
7
+ color: blue;
8
+ }
9
+ .custom-popover .popover-table {
2
10
  width: auto;
3
11
  border: 1px solid transparent;
4
12
  border-collapse: separate;
5
13
  }
6
- .yahee-country-platform-shop-condition .popover-table tr,
7
- .yahee-country-platform-shop-condition .popover-table td {
14
+ .custom-popover .popover-table tr,
15
+ .custom-popover .popover-table td {
8
16
  text-align: left;
9
17
  cursor: pointer;
10
18
  min-height: 22px;
11
19
  }
12
- .yahee-country-platform-shop-condition .checkbox-group {
13
- margin: 5px;
14
- width: 100%;
15
- }
16
- .yahee-country-platform-shop-condition .popover-table th {
20
+ .custom-popover .popover-table th {
17
21
  text-align: left;
18
22
  cursor: pointer;
19
23
  min-height: 22px;
20
24
  border: 1px solid transparent;
21
25
  }
22
- .yahee-country-platform-shop-condition .popover-table td span {
26
+ .custom-popover .popover-table td span {
23
27
  display: block;
24
- margin-bottom: 4px;
25
28
  border: 1px solid transparent;
26
29
  }
30
+ .custom-popover .custom-total-button {
31
+ margin-right: 0;
32
+ padding: 1px 4px;
33
+ height: 22px;
34
+ }
35
+
36
+ .yahee-country-platform-shop-condition .checkbox-group {
37
+ margin: 5px;
38
+ width: 100%;
39
+ }
27
40
  .yahee-country-platform-shop-condition .hover-trigger {
28
41
  cursor: pointer;
29
42
  color: blue;
@@ -34,7 +47,6 @@
34
47
  height: 22px;
35
48
  }
36
49
  .yahee-country-platform-shop-condition .custom-button {
37
- width: 100%;
38
50
  min-height: 22px;
39
51
  min-width: 50px;
40
52
  height: 22px;
@@ -43,6 +55,6 @@
43
55
  .yahee-country-platform-shop-condition .custom-button.inner-el-button {
44
56
  margin-top: 5px;
45
57
  }
46
- .yahee-country-platform-shop-condition ::v-deep(.el-checkbox-button__inner) {
58
+ .yahee-country-platform-shop-condition :deep(.el-checkbox-button__inner) {
47
59
  width: 100%;
48
60
  }
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),c=require("../_virtual/lodash.js"),E=require("../utils/style.js"),q=require("../utils/storage.js"),p=require("../utils/translate.js"),Y={class:"yahee-drop-down-condition"},G={key:0},H={style:{display:"flex","align-items":"center",outline:"none"}},J={key:0},Q={style:{display:"flex",width:"auto",padding:"10px"}},X=["onClick"],Z={class:"scrollable-container"},ee={key:0},te=e.defineComponent({name:"YaheeDropDownCondition",__name:"drop-down-condition",props:{filterList:{},totalCount:{},level1Count:{},level2Count:{},filterKey:{},enumEntity:{},noNeedRefreshNumFilterName:{},initFilters:{type:Function}},emits:["filterChange","setNoNeedRefreshNumFilterName"],setup(z,{emit:T}){const U=e.ref(),n=e.reactive({});let V=e.reactive({});const i=e.reactive({}),d=e.reactive({}),v=e.ref(!0),k=z,S=T,{filterKey:m,filterList:w,totalCount:h,level1Count:y,level2Count:x,noNeedRefreshNumFilterName:F}=e.toRefs(k),D=e.ref(c.get(h,"value",0)),C=e.ref(c.get(y,"value",[])),_=e.ref(c.get(x,"value",[])),r=e.ref();w.value&&(r.value=[...w.value]);function L(t){const{text:o,value:s}=t,a=n[o];c.isNil(a)||c.isEmpty(a)?n[o]=[s]:n[o]=[],d[o]=!d[o],d[o]?(O(o),i[o]=E.stylesUtils.getBackgroundColor(!0),v.value=!1):(I(o),i[t.text]={},v.value=!0),v.value=b(),N()}function b(){const t=r.value.filter(a=>!c.isEmpty(a.subs)).flatMap(a=>a.subs).length,o=r.value.filter(a=>c.isEmpty(a.subs)).length;return Object.values(n).map(a=>a.length).reduce((a,f)=>a+f,0)===t+o||c.isEmpty(Object.values(n).flat())}function A(t){c.isEmpty(n[t.text])?(i[t.text]={},d[t.text]=!1):n[t.text].length===c.get(t,"subs.length",1)?(i[t.text]=E.stylesUtils.getBackgroundColor(!0),d[t.text]=!0):i[t.text]={backgroundColor:"#0F7535",color:"#fff",borderColor:"#0F7535"},v.value=b(),N()}function R(){v.value=b(),N()}function N(){S("setNoNeedRefreshNumFilterName",m.value)}function j(){v.value=!0;for(const t in i)i[t]={};for(const t in n)delete n[t];for(const t in d)delete d[t];M()}const K=t=>E.stylesUtils.getBackgroundColor(t);function $(t){if(t)V=c.cloneDeep(n);else{if(c.isEqual(V,n))return;M()}}function M(){S("filterChange",[{filterKey:m.value,checkedValues:Object.values(n).flat()}])}function O(t){const o=r.value.find(s=>s.text===t);o&&o.subs&&(n[t]=o.subs.map(s=>s.value))}function I(t){n[t]=[]}function W(){const t=`filter-key-${k.enumEntity}`,o=q.storage.getWithExpireTime(t);o?r.value=o:(console.log(k.enumEntity),k.initFilters(k.enumEntity).then(s=>{console.log(s),r.value=s.data,q.storage.setWithExpireTime(t,r.value,1200*1e3),console.log(r.value)}).catch(s=>{console.log(s)}))}return e.watch([()=>h.value,()=>y.value,()=>x.value],([t,o,s],[a,f,B])=>{console.log(t,o,s),console.log(a,f,B),(!F.value||!c.eq(F.value,m.value))&&(D.value=h.value,C.value=y.value,_.value=x.value)}),e.onMounted(()=>{W()}),(t,o)=>{const s=e.resolveComponent("el-button"),a=e.resolveComponent("el-checkbox"),f=e.resolveComponent("el-checkbox-group"),B=e.resolveComponent("el-dropdown");return e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(s,{size:"small",class:"el-button custom-total-button",style:e.normalizeStyle(K(v.value)),onClick:j},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p.M2)("全部"))+" ",1),e.unref(h)?(e.openBlock(),e.createElementBlock("span",G,"("+e.toDisplayString(D.value)+")",1)):e.createCommentVNode("",!0)]),_:1},8,["style"]),e.createVNode(B,{ref_key:"dropdown1",ref:U,onVisibleChange:$},{dropdown:e.withCtx(()=>[e.createElementVNode("div",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,l=>(e.openBlock(),e.createBlock(f,{key:l.value,modelValue:n[l.text],"onUpdate:modelValue":u=>n[l.text]=u,size:"small",class:"checkbox-group inner-checkbox-group",onChange:u=>A(l)},{default:e.withCtx(()=>[e.unref(c).isNil(l.subs)?(e.openBlock(),e.createBlock(a,{key:1,value:l.value,class:"checkbox custom-button",border:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p.M2)(l.text)),1)]),_:2},1032,["value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",{class:"el-button custom-button el-button--small inner-el-button",style:e.normalizeStyle(i[l.text]),onClick:u=>L(l)},e.toDisplayString(e.unref(p.M2)(l.text)),13,X),e.createElementVNode("div",Z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.subs,u=>(e.openBlock(),e.createBlock(a,{key:u.value,class:"checkbox custom-button",value:u.value,border:""},{default:e.withCtx(()=>{var g;return[e.createTextVNode(e.toDisplayString(e.unref(p.M2)(u.text)),1),e.unref(c).isEmpty(_.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ee,"("+e.toDisplayString((g=_.value.filter(P=>P.value==u.value)[0])==null?void 0:g.count)+")",1))]}),_:2},1032,["value"]))),128))])],64))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])]),default:e.withCtx(()=>[e.createElementVNode("div",H,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.isCheckbox?(e.openBlock(),e.createBlock(f,{key:l.value,modelValue:n[l.text],"onUpdate:modelValue":u=>n[l.text]=u,class:"checkbox-group",size:"small",onChange:R},{default:e.withCtx(()=>[l.isCheckbox?(e.openBlock(),e.createBlock(a,{key:0,class:"custom-button",value:l.value,border:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p.M2)(l.text)),1)]),_:2},1032,["value"])):e.createCommentVNode("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(s,{key:l.text,style:e.normalizeStyle(i[l.text]),class:"custom-button",size:"small",onClick:u=>L(l)},{default:e.withCtx(()=>{var u;return[e.createTextVNode(e.toDisplayString(e.unref(p.M2)(l.text)),1),e.unref(c).isEmpty(C.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",J,"("+e.toDisplayString((u=C.value.filter(g=>g.value==l.value)[0])==null?void 0:u.count)+")",1))]}),_:2},1032,["style","onClick"]))],64))),256))])]),_:1},512)])}}});module.exports=te;
1
+ "use strict";const e=require("vue"),r=require("../_virtual/lodash.js"),B=require("../utils/style.js"),D=require("../utils/storage.js"),v=require("../utils/translate.js"),i=require("element-plus");require("element-plus/theme-chalk/src/base.scss");require("element-plus/theme-chalk/src/button.scss");require("element-plus/theme-chalk/src/checkbox.scss");require("element-plus/theme-chalk/src/checkbox-group.scss");require("element-plus/theme-chalk/src/button-group.scss");require("element-plus/theme-chalk/src/popper.scss");require("element-plus/theme-chalk/src/scrollbar.scss");require("element-plus/theme-chalk/src/dropdown.scss");const G={class:"yahee-drop-down-condition"},I={key:0},P={style:{display:"flex","align-items":"center",outline:"none"}},W={key:0},Y={style:{display:"flex",width:"auto",padding:"10px"}},H=["onClick"],J={class:"scrollable-container"},Q={key:0},X=e.defineComponent({name:"YaheeDropDownCondition",__name:"drop-down-condition",props:{filterList:{},totalCount:{},level1Count:{},level2Count:{},filterKey:{},enumEntity:{},noNeedRefreshNumFilterName:{},initFilters:{type:Function}},emits:["filterChange","setNoNeedRefreshNumFilterName"],setup(L,{emit:M}){const z=e.ref(),a=e.reactive({});let E=e.reactive({});const s=e.reactive({}),d=e.reactive({}),f=e.ref(!0),p=L,_=M,{filterKey:h,filterList:V,totalCount:k,level1Count:g,level2Count:m,noNeedRefreshNumFilterName:S}=e.toRefs(p),w=e.ref(r.get(k,"value",0)),y=e.ref(r.get(g,"value",[])),x=e.ref(r.get(m,"value",[])),u=e.ref();V.value&&(u.value=[...V.value]);function q(l){const{text:n,value:t}=l,o=a[n];r.isNil(o)||r.isEmpty(o)?a[n]=[t]:a[n]=[],d[n]=!d[n],d[n]?(K(n),s[n]=B.stylesUtils.getBackgroundColor(!0),f.value=!1):($(n),s[l.text]={},f.value=!0),f.value=C(),b()}function C(){const l=u.value.filter(o=>!r.isEmpty(o.subs)).flatMap(o=>o.subs).length,n=u.value.filter(o=>r.isEmpty(o.subs)).length;return Object.values(a).map(o=>o.length).reduce((o,c)=>o+c,0)===l+n||r.isEmpty(Object.values(a).flat())}function T(l){r.isEmpty(a[l.text])?(s[l.text]={},d[l.text]=!1):a[l.text].length===r.get(l,"subs.length",1)?(s[l.text]=B.stylesUtils.getBackgroundColor(!0),d[l.text]=!0):s[l.text]={backgroundColor:"#0F7535",color:"#fff",borderColor:"#0F7535"},f.value=C(),b()}function U(){f.value=C(),b()}function b(){_("setNoNeedRefreshNumFilterName",h.value)}function A(){f.value=!0;for(const l in s)s[l]={};for(const l in a)delete a[l];for(const l in d)delete d[l];F()}const R=l=>B.stylesUtils.getBackgroundColor(l);function j(l){if(l)E=r.cloneDeep(a);else{if(r.isEqual(E,a))return;F()}}function F(){_("filterChange",[{filterKey:h.value,checkedValues:Object.values(a).flat()}])}function K(l){const n=u.value.find(t=>t.text===l);n&&n.subs&&(a[l]=n.subs.map(t=>t.value))}function $(l){a[l]=[]}function O(){const l=`filter-key-${p.enumEntity}`,n=D.storage.getWithExpireTime(l);n?u.value=n:(console.log(p.enumEntity),p.initFilters(p.enumEntity).then(t=>{console.log(t),u.value=t.data,D.storage.setWithExpireTime(l,u.value,1200*1e3),console.log(u.value)}).catch(t=>{console.log(t)}))}return e.watch([()=>k.value,()=>g.value,()=>m.value],([l,n,t],[o,c,N])=>{console.log(l,n,t),console.log(o,c,N),(!S.value||!r.eq(S.value,h.value))&&(w.value=k.value,y.value=g.value,x.value=m.value)}),e.onMounted(()=>{O()}),(l,n)=>(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(e.unref(i.ElButton),{size:"small",class:"el-button el-button--small custom-total-button",style:e.normalizeStyle(R(f.value)),onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v.M2)("全部"))+" ",1),e.unref(k)?(e.openBlock(),e.createElementBlock("span",I,"("+e.toDisplayString(w.value)+")",1)):e.createCommentVNode("",!0)]),_:1},8,["style"]),e.createVNode(e.unref(i.ElDropdown),{ref_key:"dropdown1",ref:z,"popper-class":"custom-dropdown",onVisibleChange:j},{dropdown:e.withCtx(()=>[e.createElementVNode("div",Y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,t=>(e.openBlock(),e.createBlock(e.unref(i.ElCheckboxGroup),{key:t.value,modelValue:a[t.text],"onUpdate:modelValue":o=>a[t.text]=o,size:"small",class:"checkbox-group inner-checkbox-group",onChange:o=>T(t)},{default:e.withCtx(()=>[e.unref(r).isNil(t.subs)?(e.openBlock(),e.createBlock(e.unref(i.ElCheckbox),{key:1,value:t.value,class:"checkbox custom-button",border:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v.M2)(t.text)),1)]),_:2},1032,["value"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",{class:"el-button custom-button el-button--small inner-el-button",style:e.normalizeStyle(s[t.text]),onClick:o=>q(t)},e.toDisplayString(e.unref(v.M2)(t.text)),13,H),e.createElementVNode("div",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subs,o=>(e.openBlock(),e.createBlock(e.unref(i.ElCheckbox),{key:o.value,class:"checkbox custom-button",value:o.value,border:""},{default:e.withCtx(()=>{var c;return[e.createTextVNode(e.toDisplayString(e.unref(v.M2)(o.text)),1),e.unref(r).isEmpty(x.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Q,"("+e.toDisplayString((c=x.value.filter(N=>N.value==o.value)[0])==null?void 0:c.count)+")",1))]}),_:2},1032,["value"]))),128))])],64))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"]))),128))])]),default:e.withCtx(()=>[e.createElementVNode("div",P,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isCheckbox?(e.openBlock(),e.createBlock(e.unref(i.ElCheckboxGroup),{key:t.value,modelValue:a[t.text],"onUpdate:modelValue":o=>a[t.text]=o,class:"checkbox-group",size:"small",onChange:U},{default:e.withCtx(()=>[t.isCheckbox?(e.openBlock(),e.createBlock(e.unref(i.ElCheckbox),{key:0,class:"custom-button",value:t.value,border:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v.M2)(t.text)),1)]),_:2},1032,["value"])):e.createCommentVNode("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue"])):(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:t.text,style:e.normalizeStyle(s[t.text]),class:"custom-button",size:"small",onClick:o=>q(t)},{default:e.withCtx(()=>{var o;return[e.createTextVNode(e.toDisplayString(e.unref(v.M2)(t.text)),1),e.unref(r).isEmpty(y.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",W,"("+e.toDisplayString((o=y.value.filter(c=>c.value==t.value)[0])==null?void 0:o.count)+")",1))]}),_:2},1032,["style","onClick"]))],64))),256))])]),_:1},512)]))}});module.exports=X;
@@ -3,10 +3,6 @@
3
3
  /* 滚动槽 */
4
4
  /* 滚动条滑块 */
5
5
  }
6
- .yahee-drop-down-condition .checkbox-group {
7
- display: flex;
8
- flex-direction: column;
9
- }
10
6
  .yahee-drop-down-condition .checkbox {
11
7
  margin-top: 5px;
12
8
  }
@@ -15,15 +11,9 @@
15
11
  padding: 1px 4px;
16
12
  height: 22px;
17
13
  }
18
- .yahee-drop-down-condition .custom-button {
19
- margin-right: 0;
20
- padding: 1px 4px;
21
- min-height: 22px;
22
- height: 22px;
23
- margin-left: 5px;
24
- }
25
- .yahee-drop-down-condition .custom-button.inner-el-button {
26
- margin-top: 5px;
14
+ .yahee-drop-down-condition .checkbox-group {
15
+ display: flex;
16
+ flex-direction: column;
27
17
  }
28
18
  .yahee-drop-down-condition .scrollable-container {
29
19
  max-height: 700px;
@@ -42,4 +32,18 @@
42
32
  border-radius: 10px;
43
33
  background: rgba(0, 0, 0, 0.1);
44
34
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
35
+ }
36
+
37
+ .custom-dropdown .checkbox {
38
+ margin-top: 5px;
39
+ }
40
+ .custom-dropdown .custom-button {
41
+ margin-right: 0;
42
+ padding: 1px 4px;
43
+ min-height: 22px;
44
+ height: 22px;
45
+ margin-left: 5px;
46
+ }
47
+ .custom-dropdown .custom-button.inner-el-button {
48
+ margin-top: 5px;
45
49
  }
package/lib/style.css CHANGED
@@ -107,10 +107,6 @@
107
107
  /* 滚动槽 */
108
108
  /* 滚动条滑块 */
109
109
  }
110
- .yahee-drop-down-condition .checkbox-group {
111
- display: flex;
112
- flex-direction: column;
113
- }
114
110
  .yahee-drop-down-condition .checkbox {
115
111
  margin-top: 5px;
116
112
  }
@@ -119,15 +115,9 @@
119
115
  padding: 1px 4px;
120
116
  height: 22px;
121
117
  }
122
- .yahee-drop-down-condition .custom-button {
123
- margin-right: 0;
124
- padding: 1px 4px;
125
- min-height: 22px;
126
- height: 22px;
127
- margin-left: 5px;
128
- }
129
- .yahee-drop-down-condition .custom-button.inner-el-button {
130
- margin-top: 5px;
118
+ .yahee-drop-down-condition .checkbox-group {
119
+ display: flex;
120
+ flex-direction: column;
131
121
  }
132
122
  .yahee-drop-down-condition .scrollable-container {
133
123
  max-height: 700px;
@@ -148,32 +138,59 @@
148
138
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
149
139
  }
150
140
 
151
- .yahee-country-platform-shop-condition .popover-table {
141
+ .custom-dropdown .checkbox {
142
+ margin-top: 5px;
143
+ }
144
+ .custom-dropdown .custom-button {
145
+ margin-right: 0;
146
+ padding: 1px 4px;
147
+ min-height: 22px;
148
+ height: 22px;
149
+ margin-left: 5px;
150
+ }
151
+ .custom-dropdown .custom-button.inner-el-button {
152
+ margin-top: 5px;
153
+ }
154
+
155
+ .custom-popover .checkbox-group {
156
+ margin: 5px;
157
+ width: 100%;
158
+ }
159
+ .custom-popover .hover-trigger {
160
+ cursor: pointer;
161
+ color: blue;
162
+ }
163
+ .custom-popover .popover-table {
152
164
  width: auto;
153
165
  border: 1px solid transparent;
154
166
  border-collapse: separate;
155
167
  }
156
- .yahee-country-platform-shop-condition .popover-table tr,
157
- .yahee-country-platform-shop-condition .popover-table td {
168
+ .custom-popover .popover-table tr,
169
+ .custom-popover .popover-table td {
158
170
  text-align: left;
159
171
  cursor: pointer;
160
172
  min-height: 22px;
161
173
  }
162
- .yahee-country-platform-shop-condition .checkbox-group {
163
- margin: 5px;
164
- width: 100%;
165
- }
166
- .yahee-country-platform-shop-condition .popover-table th {
174
+ .custom-popover .popover-table th {
167
175
  text-align: left;
168
176
  cursor: pointer;
169
177
  min-height: 22px;
170
178
  border: 1px solid transparent;
171
179
  }
172
- .yahee-country-platform-shop-condition .popover-table td span {
180
+ .custom-popover .popover-table td span {
173
181
  display: block;
174
- margin-bottom: 4px;
175
182
  border: 1px solid transparent;
176
183
  }
184
+ .custom-popover .custom-total-button {
185
+ margin-right: 0;
186
+ padding: 1px 4px;
187
+ height: 22px;
188
+ }
189
+
190
+ .yahee-country-platform-shop-condition .checkbox-group {
191
+ margin: 5px;
192
+ width: 100%;
193
+ }
177
194
  .yahee-country-platform-shop-condition .hover-trigger {
178
195
  cursor: pointer;
179
196
  color: blue;
@@ -184,7 +201,6 @@
184
201
  height: 22px;
185
202
  }
186
203
  .yahee-country-platform-shop-condition .custom-button {
187
- width: 100%;
188
204
  min-height: 22px;
189
205
  min-width: 50px;
190
206
  height: 22px;
@@ -193,7 +209,7 @@
193
209
  .yahee-country-platform-shop-condition .custom-button.inner-el-button {
194
210
  margin-top: 5px;
195
211
  }
196
- .yahee-country-platform-shop-condition ::v-deep(.el-checkbox-button__inner) {
212
+ .yahee-country-platform-shop-condition :deep(.el-checkbox-button__inner) {
197
213
  width: 100%;
198
214
  }
199
215
 
@@ -894,39 +910,6 @@
894
910
  margin-right: 45px;
895
911
  }
896
912
 
897
- :root {
898
- --el-color-primary: #3366cc;
899
- --el-text-color-regular: #000;
900
- --primary-color: #3d7eff;
901
- --success-color: #28c445;
902
- --error-color: #ff1e1e;
903
- --warning-color: #ff8746;
904
- --white-color: #fff;
905
- --black-color: #000;
906
- --text-color-primary: #252628;
907
- --text-color-regular: #1c1c1c;
908
- --text-color-secondary: #555;
909
- --text-color-list: #323233;
910
- --text-color-a4: #a4a4a4;
911
- --text-color-tag: #737373;
912
- --text-color-disabled: #eeeef5;
913
- --border-color-base: #e8ecf2;
914
- --border-color-light: #e4e7ed;
915
- --border-color-lighter: #ebeef5;
916
- --border-color-extra-light: #f2f6fc;
917
- --bg-color: #f0f3f9;
918
- --font-size-large: 18px;
919
- --font-size-medium: 16px;
920
- --font-size-base: 14px;
921
- --font-size-small: 12px;
922
- --font-size-extra-small: 10px;
923
- --font-family: "Hiragino Sans GB", "Microsoft YaHei","WenQuanYi Micro Hei",Verdana, arial,"Open Sans", sans-serif;
924
- --integer-font-family: avenir-heavy, pingfang sc, helvetica neue, arial, sans-serif;
925
- --box-shadow-base: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
926
- --el-menu-item-height: 40px;
927
- --el-card-padding: 10px;
928
- }
929
-
930
913
  :root {
931
914
  --el-color-primary: var(--primary-color);
932
915
  --el-color-primary-light-2: rgba(61, 126, 255, 0.8);
@@ -696,39 +696,6 @@
696
696
  margin-right: 45px;
697
697
  }
698
698
 
699
- :root {
700
- --el-color-primary: #3366cc;
701
- --el-text-color-regular: #000;
702
- --primary-color: #3d7eff;
703
- --success-color: #28c445;
704
- --error-color: #ff1e1e;
705
- --warning-color: #ff8746;
706
- --white-color: #fff;
707
- --black-color: #000;
708
- --text-color-primary: #252628;
709
- --text-color-regular: #1c1c1c;
710
- --text-color-secondary: #555;
711
- --text-color-list: #323233;
712
- --text-color-a4: #a4a4a4;
713
- --text-color-tag: #737373;
714
- --text-color-disabled: #eeeef5;
715
- --border-color-base: #e8ecf2;
716
- --border-color-light: #e4e7ed;
717
- --border-color-lighter: #ebeef5;
718
- --border-color-extra-light: #f2f6fc;
719
- --bg-color: #f0f3f9;
720
- --font-size-large: 18px;
721
- --font-size-medium: 16px;
722
- --font-size-base: 14px;
723
- --font-size-small: 12px;
724
- --font-size-extra-small: 10px;
725
- --font-family: "Hiragino Sans GB", "Microsoft YaHei","WenQuanYi Micro Hei",Verdana, arial,"Open Sans", sans-serif;
726
- --integer-font-family: avenir-heavy, pingfang sc, helvetica neue, arial, sans-serif;
727
- --box-shadow-base: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
728
- --el-menu-item-height: 40px;
729
- --el-card-padding: 10px;
730
- }
731
-
732
699
  :root {
733
700
  --el-color-primary: var(--primary-color);
734
701
  --el-color-primary-light-2: rgba(61, 126, 255, 0.8);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.27",
4
+ "version": "0.0.29",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",
package/types/index.d.ts CHANGED
@@ -991,7 +991,7 @@ export declare const YaheeDropDownCondition: SFCWithInstall<DefineComponent<{
991
991
  filterKey: string;
992
992
  enumEntity: string;
993
993
  noNeedRefreshNumFilterName?: string;
994
- initFilters: Function;
994
+ initFilters?: Function;
995
995
  }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
996
996
  filterChange: (...args: any[]) => void;
997
997
  setNoNeedRefreshNumFilterName: (...args: any[]) => void;
@@ -1009,7 +1009,7 @@ export declare const YaheeDropDownCondition: SFCWithInstall<DefineComponent<{
1009
1009
  filterKey: string;
1010
1010
  enumEntity: string;
1011
1011
  noNeedRefreshNumFilterName?: string;
1012
- initFilters: Function;
1012
+ initFilters?: Function;
1013
1013
  }> & Readonly<{
1014
1014
  onFilterChange?: (...args: any[]) => any;
1015
1015
  onSetNoNeedRefreshNumFilterName?: (...args: any[]) => any;