SFilterToolbar.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. import { ref as S, resolveComponent as i, openBlock as o, createElementBlock as s, createElementVNode as a, createVNode as l, withCtx as n, renderSlot as p, createTextVNode as w, toDisplayString as m, createBlock as v, createCommentVNode as c, withDirectives as B, vShow as C } from "vue";
  2. import { n as F, y as D, B as M } from "./index2.js";
  3. const N = { class: "s-filter-container" }, T = {
  4. key: 0,
  5. class: "filter-content"
  6. }, V = { class: "filter" }, x = { class: "reset-wrap" }, E = {
  7. key: 1,
  8. class: "filter-more-content"
  9. }, z = /* @__PURE__ */ Object.assign({ name: "SFilterToolbar" }, {
  10. __name: "SFilterToolbar",
  11. emits: ["reset", "toggle"],
  12. setup(j, { expose: y, emit: g }) {
  13. const r = g, e = S(!1);
  14. function u() {
  15. e.value = !e.value, r("toggle", e.value);
  16. }
  17. function _() {
  18. r("reset");
  19. }
  20. function h() {
  21. e.value && (e.value = !1, r("toggle", !1));
  22. }
  23. return y({ isMoreFilter: e, toggleFilter: u, filterReset: _, collapse: h }), (t, I) => {
  24. const f = i("s-filter-wrap"), d = i("double-right-outlined"), k = i("sync-outlined"), b = M, $ = D;
  25. return o(), s("div", N, [
  26. t.$slots.filter ? (o(), s("div", T, [
  27. a("div", V, [
  28. l(f, null, {
  29. default: n(() => [
  30. p(t.$slots, "filter", {}, void 0, !0)
  31. ]),
  32. _: 3
  33. })
  34. ]),
  35. t.$slots.filterMore ? (o(), s("a", {
  36. key: 0,
  37. class: "filter-more-btn",
  38. onClick: u
  39. }, [
  40. w(m(e.value ? t.$l("收起") : t.$l("更多")) + " ", 1),
  41. e.value ? (o(), v(d, {
  42. key: 1,
  43. style: { "font-size": "12px", transform: "rotate(-90deg)" }
  44. })) : (o(), v(d, {
  45. key: 0,
  46. style: { "font-size": "12px", transform: "rotate(90deg)" }
  47. }))
  48. ])) : c("", !0),
  49. a("div", x, [
  50. l($, {
  51. placement: "top",
  52. overlayStyle: { maxWidth: "500px" },
  53. mouseEnterDelay: 1.5,
  54. mouseLeaveDelay: 0.5
  55. }, {
  56. title: n(() => [
  57. a("span", null, m(t.$l("条件重置")), 1)
  58. ]),
  59. default: n(() => [
  60. l(b, {
  61. style: { "padding-bottom": "2px" },
  62. onClick: _
  63. }, {
  64. icon: n(() => [
  65. l(k)
  66. ]),
  67. _: 1
  68. })
  69. ]),
  70. _: 1
  71. })
  72. ])
  73. ])) : c("", !0),
  74. t.$slots.filterMore ? B((o(), s("div", E, [
  75. l(f, { type: "filter-more" }, {
  76. default: n(() => [
  77. p(t.$slots, "filterMore", {}, void 0, !0)
  78. ]),
  79. _: 3
  80. })
  81. ], 512)), [
  82. [C, e.value]
  83. ]) : c("", !0)
  84. ]);
  85. };
  86. }
  87. }), R = /* @__PURE__ */ F(z, [["__scopeId", "data-v-05fa378c"]]);
  88. export {
  89. R as default
  90. };