File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed
en/integrations/vitepress-plugin-enhanced-readabilities
zh-CN/integrations/vitepress-plugin-enhanced-readabilities
packages/vitepress-plugin-enhanced-readabilities/src/client Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,12 @@ export interface Options {
489489 * Spotlight configuration
490490 */
491491 spotlight? : {
492+ /**
493+ * Disable spotlight
494+ *
495+ * @default false
496+ */
497+ disabled? : boolean
492498 /**
493499 * Disable spotlight help tooltip
494500 *
Original file line number Diff line number Diff line change @@ -488,6 +488,12 @@ export interface Options {
488488 * Spotlight configuration
489489 */
490490 spotlight? : {
491+ /**
492+ * Disable spotlight
493+ *
494+ * @default false
495+ */
496+ disabled? : boolean
491497 /**
492498 * Disable spotlight help tooltip
493499 *
Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import { useMounted } from ' @vueuse/core'
3+ import { inject } from ' vue'
34import { useI18n } from ' ../composables/i18n'
5+ import { InjectionKey } from ' ../constants'
46import { VPFlyout } from ' ./deps'
57
68import LayoutSwitch from ' ./LayoutSwitch.vue'
@@ -9,6 +11,7 @@ import LayoutSwitchPageLayoutWidthInput from './LayoutSwitchPageLayoutMaxWidthSl
911import Spotlight from ' ./Spotlight.vue'
1012import SpotlightStyles from ' ./SpotlightStyles.vue'
1113
14+ const options = inject (InjectionKey , {})
1215const mounted = useMounted ()
1316const { t } = useI18n ()
1417 </script >
@@ -24,8 +27,8 @@ const { t } = useI18n()
2427 <LayoutSwitch />
2528 <LayoutSwitchPageLayoutWidthInput />
2629 <LayoutSwitchContentLayoutWidthInput />
27- <Spotlight />
28- <SpotlightStyles />
30+ <Spotlight v-if = " !options.spotlight?.disabled " />
31+ <SpotlightStyles v-if = " !options.spotlight?.disabled " />
2932 </div >
3033 </VPFlyout >
3134</template >
Original file line number Diff line number Diff line change @@ -345,6 +345,12 @@ export interface Options {
345345 * Spotlight configuration
346346 */
347347 spotlight ?: {
348+ /**
349+ * Disable spotlight
350+ *
351+ * @default false
352+ */
353+ disabled ?: boolean
348354 /**
349355 * Disable spotlight help tooltip
350356 *
You can’t perform that action at this time.
0 commit comments