SIcon.js 871 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { ref as c, watch as n, openBlock as l, createBlock as s, resolveDynamicComponent as m, normalizeClass as i, normalizeStyle as u } from "vue";
  2. import { l as f } from "./index2.js";
  3. const p = {
  4. __name: "SIcon",
  5. props: {
  6. name: {
  7. type: String,
  8. required: !0
  9. },
  10. size: {
  11. type: Number,
  12. default: 16
  13. },
  14. color: {
  15. type: String,
  16. default: ""
  17. }
  18. },
  19. setup(e) {
  20. var o;
  21. const a = e, t = c(((o = window.$theme) == null ? void 0 : o.color) || "");
  22. return n(
  23. () => a.color,
  24. (r) => {
  25. t.value = r;
  26. },
  27. { immediate: !0 }
  28. ), (r, d) => (l(), s(m(e.name), {
  29. class: i(e.name),
  30. style: u({ fontSize: e.size + "px", color: t.value })
  31. }, null, 8, ["class", "style"]));
  32. }
  33. }, z = /* @__PURE__ */ f(p, [["__scopeId", "data-v-4888dff0"]]);
  34. export {
  35. z as default
  36. };