sys.js 995 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const sheep_store_app = require("./app.js");
  4. const sys = common_vendor.defineStore({
  5. id: "sys",
  6. state: () => ({
  7. theme: "",
  8. // 主题,
  9. mode: "light",
  10. // 明亮模式、暗黑模式(暂未支持)
  11. modeAuto: false,
  12. // 跟随系统
  13. fontSize: 1
  14. // 设置默认字号等级(0-4)
  15. }),
  16. getters: {},
  17. actions: {
  18. setTheme(theme = "") {
  19. var _a;
  20. if (theme === "") {
  21. this.theme = ((_a = sheep_store_app.app().template) == null ? void 0 : _a.basic.theme) || "orange";
  22. } else {
  23. this.theme = theme;
  24. }
  25. }
  26. },
  27. persist: {
  28. enabled: true,
  29. strategies: [
  30. {
  31. key: "sys-store"
  32. }
  33. ]
  34. }
  35. });
  36. const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  37. __proto__: null,
  38. default: sys
  39. }, Symbol.toStringTag, { value: "Module" }));
  40. exports.__vite_glob_0_3 = __vite_glob_0_3;
  41. exports.sys = sys;