SFilterWrap.js 1006 B

12345678910111213141516171819202122232425262728293031323334
  1. import { onMounted as a, openBlock as s, createElementBlock as i, normalizeClass as n, renderSlot as p } from "vue";
  2. import { n as c } from "./index2.js";
  3. const m = {
  4. __name: "SFilterWrap",
  5. props: {
  6. // 统一子项标签宽度,单位 px
  7. labelWidth: {
  8. type: Number,
  9. default: 70
  10. },
  11. // filter-more:更多筛选区(紧凑样式)
  12. type: {
  13. type: String,
  14. default: "filter"
  15. }
  16. },
  17. setup(l) {
  18. const e = l;
  19. return a(() => {
  20. document.querySelectorAll(".filter-item .label").forEach((t) => {
  21. t.style.width = e.labelWidth + "px";
  22. }), e.type && e.type === "filter-more" && document.querySelectorAll(".filter-more .filter-item").forEach((o) => {
  23. o.style.marginBottom = "10px";
  24. });
  25. }), (r, t) => (s(), i("div", {
  26. class: n(["filter-wrap", e.type])
  27. }, [
  28. p(r.$slots, "default", {}, void 0, !0)
  29. ], 2));
  30. }
  31. }, u = /* @__PURE__ */ c(m, [["__scopeId", "data-v-938505c6"]]);
  32. export {
  33. u as default
  34. };