yahee-components 0.0.27 → 0.0.28

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,23 @@ 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
131
  size: "small",
131
132
  onClick: (l) => F(e)
132
133
  }, {
133
134
  default: V(() => [
134
- L(m(c(N)(e.xGroupText)), 1)
135
+ L(g(c(N)(e.xGroupText)), 1)
135
136
  ]),
136
137
  _: 2
137
138
  }, 1032, ["style", "onClick"]))), 128))
@@ -145,7 +146,7 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
145
146
  i("tr", null, [
146
147
  i("th", ne, [
147
148
  i("span", {
148
- style: g(T(y.value)),
149
+ style: b(T(y.value)),
149
150
  class: "el-button custom-button",
150
151
  onClick: j
151
152
  }, " 全部 ", 4)
@@ -155,10 +156,10 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
155
156
  key: t.xGroupValue
156
157
  }, [
157
158
  i("span", {
158
- style: g({ ...b.value[t.xGroupValue], width: "100%" }),
159
+ style: b({ ...m.value[t.xGroupValue], width: "100%" }),
159
160
  class: "el-button custom-button",
160
161
  onClick: (h) => F(t)
161
- }, m(t.xGroupText), 13, se)
162
+ }, g(t.xGroupText), 13, se)
162
163
  ]))), 128))
163
164
  ])
164
165
  ]),
@@ -170,10 +171,10 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
170
171
  }, [
171
172
  i("th", ce, [
172
173
  i("span", {
173
- style: g({ ..._.value[t.yGroupValue], width: "100%" }),
174
+ style: b({ ..._.value[t.yGroupValue], width: "100%" }),
174
175
  class: "el-button custom-button",
175
176
  onClick: (v) => Z(t)
176
- }, m(t.yGroupText), 13, ie)
177
+ }, g(t.yGroupText), 13, ie)
177
178
  ]),
178
179
  (s(!0), f(C, null, k((h = c(r)) == null ? void 0 : h.xGroup, (v) => (s(), f("td", {
179
180
  key: v.xGroupValue
@@ -194,7 +195,7 @@ const ae = { class: "yahee-country-platform-shop-condition" }, re = { class: "po
194
195
  value: p.value
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,30 @@
1
- .yahee-country-platform-shop-condition .popover-table {
1
+ .custom-popover .popover-table {
2
2
  width: auto;
3
3
  border: 1px solid transparent;
4
4
  border-collapse: separate;
5
5
  }
6
- .yahee-country-platform-shop-condition .popover-table tr,
7
- .yahee-country-platform-shop-condition .popover-table td {
6
+ .custom-popover .popover-table tr,
7
+ .custom-popover .popover-table td {
8
8
  text-align: left;
9
9
  cursor: pointer;
10
10
  min-height: 22px;
11
11
  }
12
- .yahee-country-platform-shop-condition .checkbox-group {
13
- margin: 5px;
14
- width: 100%;
15
- }
16
- .yahee-country-platform-shop-condition .popover-table th {
12
+ .custom-popover .popover-table th {
17
13
  text-align: left;
18
14
  cursor: pointer;
19
15
  min-height: 22px;
20
16
  border: 1px solid transparent;
21
17
  }
22
- .yahee-country-platform-shop-condition .popover-table td span {
18
+ .custom-popover .popover-table td span {
23
19
  display: block;
24
20
  margin-bottom: 4px;
25
21
  border: 1px solid transparent;
26
22
  }
23
+
24
+ .yahee-country-platform-shop-condition .checkbox-group {
25
+ margin: 5px;
26
+ width: 100%;
27
+ }
27
28
  .yahee-country-platform-shop-condition .hover-trigger {
28
29
  cursor: pointer;
29
30
  color: blue;
@@ -43,6 +44,6 @@
43
44
  .yahee-country-platform-shop-condition .custom-button.inner-el-button {
44
45
  margin-top: 5px;
45
46
  }
46
- .yahee-country-platform-shop-condition ::v-deep(.el-checkbox-button__inner) {
47
+ .yahee-country-platform-shop-condition :deep(.el-checkbox-button__inner) {
47
48
  width: 100%;
48
49
  }
@@ -1,9 +1,9 @@
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";
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 p, unref as i, createCommentVNode as F, createElementVNode as S, Fragment as C, renderList as $, createBlock as x } from "vue";
2
2
  import u from "../_virtual/lodash.js";
3
3
  import { stylesUtils as M } from "../utils/style.js";
4
4
  import { storage as H } from "../utils/storage.js";
5
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({
6
+ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, pe = { style: { display: "flex", "align-items": "center", outline: "none" } }, he = { key: 0 }, ge = { style: { display: "flex", width: "auto", padding: "10px" } }, me = ["onClick"], ye = { class: "scrollable-container" }, xe = { key: 0 }, Ee = /* @__PURE__ */ ce({
7
7
  name: "YaheeDropDownCondition",
8
8
  __name: "drop-down-condition",
9
9
  props: {
@@ -20,18 +20,18 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
20
20
  setup(J, { emit: Q }) {
21
21
  const X = y(), o = V({});
22
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();
23
+ const d = V({}), h = 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
24
  q.value && (r.value = [...q.value]);
25
25
  function P(e) {
26
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();
27
+ u.isNil(n) || u.isEmpty(n) ? o[l] = [s] : o[l] = [], h[l] = !h[l], h[l] ? (ne(l), d[l] = M.getBackgroundColor(!0), g.value = !1) : (se(l), d[e.text] = {}, g.value = !0), g.value = z(), U();
28
28
  }
29
29
  function z() {
30
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
31
  return Object.values(o).map((n) => n.length).reduce((n, m) => n + m, 0) === e + l || u.isEmpty(Object.values(o).flat());
32
32
  }
33
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] = {
34
+ u.isEmpty(o[e.text]) ? (d[e.text] = {}, h[e.text] = !1) : o[e.text].length === u.get(e, "subs.length", 1) ? (d[e.text] = M.getBackgroundColor(!0), h[e.text] = !0) : d[e.text] = {
35
35
  backgroundColor: "#0F7535",
36
36
  color: "#fff",
37
37
  borderColor: "#0F7535"
@@ -49,8 +49,8 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
49
49
  d[e] = {};
50
50
  for (const e in o)
51
51
  delete o[e];
52
- for (const e in p)
53
- delete p[e];
52
+ for (const e in h)
53
+ delete h[e];
54
54
  Y();
55
55
  }
56
56
  const le = (e) => M.getBackgroundColor(e);
@@ -103,14 +103,15 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
103
103
  onClick: te
104
104
  }, {
105
105
  default: f(() => [
106
- b(h(i(k)("全部")) + " ", 1),
107
- i(N) ? (a(), v("span", fe, "(" + h(W.value) + ")", 1)) : F("", !0)
106
+ b(p(i(k)("全部")) + " ", 1),
107
+ i(N) ? (a(), v("span", fe, "(" + p(W.value) + ")", 1)) : F("", !0)
108
108
  ]),
109
109
  _: 1
110
110
  }, 8, ["style"]),
111
111
  G(j, {
112
112
  ref_key: "dropdown1",
113
113
  ref: X,
114
+ "popper-class": "custom-dropdown",
114
115
  onVisibleChange: oe
115
116
  }, {
116
117
  dropdown: f(() => [
@@ -131,7 +132,7 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
131
132
  border: ""
132
133
  }, {
133
134
  default: f(() => [
134
- b(h(i(k)(t.text)), 1)
135
+ b(p(i(k)(t.text)), 1)
135
136
  ]),
136
137
  _: 2
137
138
  }, 1032, ["value"])) : (a(), v(C, { key: 0 }, [
@@ -139,7 +140,7 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
139
140
  class: "el-button custom-button el-button--small inner-el-button",
140
141
  style: K(d[t.text]),
141
142
  onClick: (c) => P(t)
142
- }, h(i(k)(t.text)), 13, me),
143
+ }, p(i(k)(t.text)), 13, me),
143
144
  S("div", ye, [
144
145
  (a(!0), v(C, null, $(t.subs, (c) => (a(), x(n, {
145
146
  key: c.value,
@@ -150,8 +151,8 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
150
151
  default: f(() => {
151
152
  var E;
152
153
  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))
154
+ b(p(i(k)(c.text)), 1),
155
+ i(u).isEmpty(R.value) ? F("", !0) : (a(), v("span", xe, "(" + p((E = R.value.filter((ae) => ae.value == c.value)[0]) == null ? void 0 : E.count) + ")", 1))
155
156
  ];
156
157
  }),
157
158
  _: 2
@@ -164,7 +165,7 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
164
165
  ])
165
166
  ]),
166
167
  default: f(() => [
167
- S("div", he, [
168
+ S("div", pe, [
168
169
  (a(!0), v(C, null, $(r.value, (t) => (a(), v(C, null, [
169
170
  t.isCheckbox ? (a(), x(m, {
170
171
  key: t.value,
@@ -182,7 +183,7 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
182
183
  border: ""
183
184
  }, {
184
185
  default: f(() => [
185
- b(h(i(k)(t.text)), 1)
186
+ b(p(i(k)(t.text)), 1)
186
187
  ]),
187
188
  _: 2
188
189
  }, 1032, ["value"])) : F("", !0)
@@ -198,8 +199,8 @@ const ve = { class: "yahee-drop-down-condition" }, fe = { key: 0 }, he = { style
198
199
  default: f(() => {
199
200
  var c;
200
201
  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))
202
+ b(p(i(k)(t.text)), 1),
203
+ i(u).isEmpty(D.value) ? F("", !0) : (a(), v("span", he, "(" + p((c = D.value.filter((E) => E.value == t.value)[0]) == null ? void 0 : c.count) + ")", 1))
203
204
  ];
204
205
  }),
205
206
  _: 2
@@ -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
  }
@@ -25,6 +21,10 @@
25
21
  .yahee-drop-down-condition .custom-button.inner-el-button {
26
22
  margin-top: 5px;
27
23
  }
24
+ .yahee-drop-down-condition .checkbox-group {
25
+ display: flex;
26
+ flex-direction: column;
27
+ }
28
28
  .yahee-drop-down-condition .scrollable-container {
29
29
  max-height: 700px;
30
30
  overflow-y: auto;
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
  }
@@ -129,6 +125,10 @@
129
125
  .yahee-drop-down-condition .custom-button.inner-el-button {
130
126
  margin-top: 5px;
131
127
  }
128
+ .yahee-drop-down-condition .checkbox-group {
129
+ display: flex;
130
+ flex-direction: column;
131
+ }
132
132
  .yahee-drop-down-condition .scrollable-container {
133
133
  max-height: 700px;
134
134
  overflow-y: auto;
@@ -148,32 +148,33 @@
148
148
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
149
149
  }
150
150
 
151
- .yahee-country-platform-shop-condition .popover-table {
151
+ .custom-popover .popover-table {
152
152
  width: auto;
153
153
  border: 1px solid transparent;
154
154
  border-collapse: separate;
155
155
  }
156
- .yahee-country-platform-shop-condition .popover-table tr,
157
- .yahee-country-platform-shop-condition .popover-table td {
156
+ .custom-popover .popover-table tr,
157
+ .custom-popover .popover-table td {
158
158
  text-align: left;
159
159
  cursor: pointer;
160
160
  min-height: 22px;
161
161
  }
162
- .yahee-country-platform-shop-condition .checkbox-group {
163
- margin: 5px;
164
- width: 100%;
165
- }
166
- .yahee-country-platform-shop-condition .popover-table th {
162
+ .custom-popover .popover-table th {
167
163
  text-align: left;
168
164
  cursor: pointer;
169
165
  min-height: 22px;
170
166
  border: 1px solid transparent;
171
167
  }
172
- .yahee-country-platform-shop-condition .popover-table td span {
168
+ .custom-popover .popover-table td span {
173
169
  display: block;
174
170
  margin-bottom: 4px;
175
171
  border: 1px solid transparent;
176
172
  }
173
+
174
+ .yahee-country-platform-shop-condition .checkbox-group {
175
+ margin: 5px;
176
+ width: 100%;
177
+ }
177
178
  .yahee-country-platform-shop-condition .hover-trigger {
178
179
  cursor: pointer;
179
180
  color: blue;
@@ -193,7 +194,7 @@
193
194
  .yahee-country-platform-shop-condition .custom-button.inner-el-button {
194
195
  margin-top: 5px;
195
196
  }
196
- .yahee-country-platform-shop-condition ::v-deep(.el-checkbox-button__inner) {
197
+ .yahee-country-platform-shop-condition :deep(.el-checkbox-button__inner) {
197
198
  width: 100%;
198
199
  }
199
200
 
@@ -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 m=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 C(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 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 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 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=n.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,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(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(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 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(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 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 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,29 +1,30 @@
1
- .yahee-country-platform-shop-condition .popover-table {
1
+ .custom-popover .popover-table {
2
2
  width: auto;
3
3
  border: 1px solid transparent;
4
4
  border-collapse: separate;
5
5
  }
6
- .yahee-country-platform-shop-condition .popover-table tr,
7
- .yahee-country-platform-shop-condition .popover-table td {
6
+ .custom-popover .popover-table tr,
7
+ .custom-popover .popover-table td {
8
8
  text-align: left;
9
9
  cursor: pointer;
10
10
  min-height: 22px;
11
11
  }
12
- .yahee-country-platform-shop-condition .checkbox-group {
13
- margin: 5px;
14
- width: 100%;
15
- }
16
- .yahee-country-platform-shop-condition .popover-table th {
12
+ .custom-popover .popover-table th {
17
13
  text-align: left;
18
14
  cursor: pointer;
19
15
  min-height: 22px;
20
16
  border: 1px solid transparent;
21
17
  }
22
- .yahee-country-platform-shop-condition .popover-table td span {
18
+ .custom-popover .popover-table td span {
23
19
  display: block;
24
20
  margin-bottom: 4px;
25
21
  border: 1px solid transparent;
26
22
  }
23
+
24
+ .yahee-country-platform-shop-condition .checkbox-group {
25
+ margin: 5px;
26
+ width: 100%;
27
+ }
27
28
  .yahee-country-platform-shop-condition .hover-trigger {
28
29
  cursor: pointer;
29
30
  color: blue;
@@ -43,6 +44,6 @@
43
44
  .yahee-country-platform-shop-condition .custom-button.inner-el-button {
44
45
  margin-top: 5px;
45
46
  }
46
- .yahee-country-platform-shop-condition ::v-deep(.el-checkbox-button__inner) {
47
+ .yahee-country-platform-shop-condition :deep(.el-checkbox-button__inner) {
47
48
  width: 100%;
48
49
  }
@@ -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"),c=require("../_virtual/lodash.js"),E=require("../utils/style.js"),q=require("../utils/storage.js"),f=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,w=T,{filterKey:g,filterList:S,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();S.value&&(r.value=[...S.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,p)=>a+p,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(){w("setNoNeedRefreshNumFilterName",g.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(){w("filterChange",[{filterKey:g.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,p,B])=>{console.log(t,o,s),console.log(a,p,B),(!F.value||!c.eq(F.value,g.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"),p=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(f.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,"popper-class":"custom-dropdown",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(p,{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(f.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(f.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 m;return[e.createTextVNode(e.toDisplayString(e.unref(f.M2)(u.text)),1),e.unref(c).isEmpty(_.value)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",ee,"("+e.toDisplayString((m=_.value.filter(P=>P.value==u.value)[0])==null?void 0:m.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(p,{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(f.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(f.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(m=>m.value==l.value)[0])==null?void 0:u.count)+")",1))]}),_:2},1032,["style","onClick"]))],64))),256))])]),_:1},512)])}}});module.exports=te;
@@ -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
  }
@@ -25,6 +21,10 @@
25
21
  .yahee-drop-down-condition .custom-button.inner-el-button {
26
22
  margin-top: 5px;
27
23
  }
24
+ .yahee-drop-down-condition .checkbox-group {
25
+ display: flex;
26
+ flex-direction: column;
27
+ }
28
28
  .yahee-drop-down-condition .scrollable-container {
29
29
  max-height: 700px;
30
30
  overflow-y: auto;
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
  }
@@ -129,6 +125,10 @@
129
125
  .yahee-drop-down-condition .custom-button.inner-el-button {
130
126
  margin-top: 5px;
131
127
  }
128
+ .yahee-drop-down-condition .checkbox-group {
129
+ display: flex;
130
+ flex-direction: column;
131
+ }
132
132
  .yahee-drop-down-condition .scrollable-container {
133
133
  max-height: 700px;
134
134
  overflow-y: auto;
@@ -148,32 +148,33 @@
148
148
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
149
149
  }
150
150
 
151
- .yahee-country-platform-shop-condition .popover-table {
151
+ .custom-popover .popover-table {
152
152
  width: auto;
153
153
  border: 1px solid transparent;
154
154
  border-collapse: separate;
155
155
  }
156
- .yahee-country-platform-shop-condition .popover-table tr,
157
- .yahee-country-platform-shop-condition .popover-table td {
156
+ .custom-popover .popover-table tr,
157
+ .custom-popover .popover-table td {
158
158
  text-align: left;
159
159
  cursor: pointer;
160
160
  min-height: 22px;
161
161
  }
162
- .yahee-country-platform-shop-condition .checkbox-group {
163
- margin: 5px;
164
- width: 100%;
165
- }
166
- .yahee-country-platform-shop-condition .popover-table th {
162
+ .custom-popover .popover-table th {
167
163
  text-align: left;
168
164
  cursor: pointer;
169
165
  min-height: 22px;
170
166
  border: 1px solid transparent;
171
167
  }
172
- .yahee-country-platform-shop-condition .popover-table td span {
168
+ .custom-popover .popover-table td span {
173
169
  display: block;
174
170
  margin-bottom: 4px;
175
171
  border: 1px solid transparent;
176
172
  }
173
+
174
+ .yahee-country-platform-shop-condition .checkbox-group {
175
+ margin: 5px;
176
+ width: 100%;
177
+ }
177
178
  .yahee-country-platform-shop-condition .hover-trigger {
178
179
  cursor: pointer;
179
180
  color: blue;
@@ -193,7 +194,7 @@
193
194
  .yahee-country-platform-shop-condition .custom-button.inner-el-button {
194
195
  margin-top: 5px;
195
196
  }
196
- .yahee-country-platform-shop-condition ::v-deep(.el-checkbox-button__inner) {
197
+ .yahee-country-platform-shop-condition :deep(.el-checkbox-button__inner) {
197
198
  width: 100%;
198
199
  }
199
200
 
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.28",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",