File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/vitepress-theme-async/components Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const offset = ref(false);
2020const ratio = ref (0 );
2121const isRead = ref (false );
2222const isPost = useIsPost ();
23- const { theme, frontmatter, isDark } = useData <AsyncThemeConfig >();
23+ const { theme, frontmatter, isDark, site } = useData <AsyncThemeConfig >();
2424
2525const scrollFun = () => {
2626 const scrollTop = getScrollTop ();
@@ -89,7 +89,15 @@ const themePrimary = computed(() => {
8989 </template >
9090 <TrmIconTheme />
9191 </TrmPopover >
92- <div class =" trm-fixed-btn" :data-title =" $t(isDark ? 'rightside.theme.light' : 'rightside.theme.dark')" @click =" onSwitchThemeMode" >
92+ <div
93+ v-if ="
94+ site.appearance &&
95+ site.appearance !== 'force-dark' &&
96+ site.appearance !== 'force-auto'"
97+ class =" trm-fixed-btn"
98+ :data-title =" $t(isDark ? 'rightside.theme.light' : 'rightside.theme.dark')"
99+ @click =" onSwitchThemeMode"
100+ >
93101 <TrmIconSun class =" trm-dark-icon" />
94102 <TrmIconMoon class =" trm-light-icon" />
95103 </div >
You can’t perform that action at this time.
0 commit comments