@yl_lowcode/docs-theme 0.0.12 → 0.0.14

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.
package/color/index.ts CHANGED
@@ -38,4 +38,5 @@ export default (
38
38
  } else {
39
39
  document.documentElement.style.removeProperty("color-scheme");
40
40
  }
41
+ return themeColor['Brand-6'];
41
42
  };
package/layout.vue CHANGED
@@ -47,10 +47,10 @@ const colorConfig = [
47
47
  ...item,
48
48
  onClick: async () => {
49
49
  localStorage?.setItem("color", item.key);
50
- setTheme(isDark.value ? "dark" : "light", item.key);
50
+ const rgbColor = setTheme(isDark.value ? "dark" : "light", item.key);
51
51
  themeHooks.onThemeChange?.({
52
52
  theme: isDark.value ? "dark" : "light",
53
- color: item.key,
53
+ color: rgbColor,
54
54
  });
55
55
  },
56
56
  };
@@ -95,18 +95,18 @@ provide("toggle-appearance", async ({ clientX: x, clientY: y }: MouseEvent) => {
95
95
  onMounted(() => {
96
96
  watch(isDark, async (dark) => {
97
97
  const color = localStorage?.getItem("color") as any;
98
- setTheme(dark ? "dark" : "light", color);
98
+ const rgbColor = setTheme(dark ? "dark" : "light", color);
99
99
  themeHooks.onThemeChange?.({
100
100
  theme: dark ? "dark" : "light",
101
- color: color || "blue",
101
+ color: rgbColor || "blue",
102
102
  });
103
103
  });
104
104
  setTimeout(async () => {
105
105
  const color = localStorage?.getItem("color") as any;
106
- setTheme(isDark.value ? "dark" : "light", color);
106
+ const rgbColor = setTheme(isDark.value ? "dark" : "light", color);
107
107
  themeHooks.onThemeChange?.({
108
108
  theme: isDark.value ? "dark" : "light",
109
- color: color || "blue",
109
+ color: rgbColor || "blue",
110
110
  });
111
111
  }, 800);
112
112
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yl_lowcode/docs-theme",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "共享 VitePress 文档主题(React Demo 支持)",
5
5
  "type": "module",
6
6
  "main": "index.ts",