Skip to content

Commit 0f99515

Browse files
authored
fix: incorrect default layout mode value (#31)
* fix: incorrect default layout mode value --------- Signed-off-by: Neko Ayaka <neko@ayaka.moe>
1 parent b6610b9 commit 0f99515

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

docs/pages/en/integrations/vitepress-plugin-enhanced-readabilities/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export default defineConfig({
8080
vite: { // [!code ++]
8181
ssr: { // [!code ++]
8282
noExternal: [ // [!code ++]
83+
// If there are other packages that need to be processed by Vite, you can add them here. // [!code hl]
8384
'@nolebase/vitepress-plugin-enhanced-readabilities', // [!code ++]
8485
], // [!code ++]
8586
}, // [!code ++]
@@ -104,6 +105,7 @@ export default defineConfig(() => {
104105
return {
105106
ssr: { // [!code ++]
106107
noExternal: [ // [!code ++]
108+
// If there are other packages that need to be processed by Vite, you can add them here. // [!code hl]
107109
'@nolebase/vitepress-plugin-enhanced-readabilities', // [!code ++]
108110
], // [!code ++]
109111
}, // [!code ++]
@@ -277,7 +279,7 @@ export const Theme: ThemeConfig = {
277279
export default Theme
278280
```
279281

280-
For more information on configuration, see [Configuration](#Configuration).
282+
For more information on configuration, see [Configuration](#configuration).
281283

282284
#### Import layout switching components on demand
283285

@@ -330,7 +332,7 @@ export const Theme: ThemeConfig = {
330332
}
331333
```
332334

333-
For more information on internationalization configuration, see [Internationalization](#Internationalization).
335+
For more information on internationalization configuration, see [Internationalization](#internationalization).
334336

335337
### Options inside
336338

@@ -382,7 +384,7 @@ export interface Options {
382384
/**
383385
* Default mode for layout switch
384386
*
385-
* @default LayoutMode.FitContentWidth (3)
387+
* @default LayoutMode.Original (3)
386388
*/
387389
defaultMode?: LayoutMode
388390
/**

docs/pages/zh-CN/integrations/vitepress-plugin-enhanced-readabilities/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export default defineConfig({
8080
vite: { // [!code ++]
8181
ssr: { // [!code ++]
8282
noExternal: [ // [!code ++]
83+
// 如果还有别的依赖需要添加的话,并排填写和配置到这里即可 // [!code hl]
8384
'@nolebase/vitepress-plugin-enhanced-readabilities', // [!code ++]
8485
], // [!code ++]
8586
}, // [!code ++]
@@ -104,6 +105,7 @@ export default defineConfig(() => {
104105
return {
105106
ssr: { // [!code ++]
106107
noExternal: [ // [!code ++]
108+
// 如果还有别的依赖需要添加的话,并排填写和配置到这里即可 // [!code hl]
107109
'@nolebase/vitepress-plugin-enhanced-readabilities', // [!code ++]
108110
], // [!code ++]
109111
}, // [!code ++]
@@ -381,7 +383,7 @@ export interface Options {
381383
/**
382384
* Default mode for layout switch
383385
*
384-
* @default LayoutMode.FitContentWidth (3)
386+
* @default LayoutMode.Original (3)
385387
*/
386388
defaultMode?: LayoutMode
387389
/**

packages/vitepress-plugin-enhanced-readabilities/src/components/LayoutSwitch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const disabled = ref(false)
1818
1919
const mounted = useMounted()
2020
const isLargerThanMobile = useMediaQuery('(min-width: 768px)')
21-
const layoutMode = useLocalStorage(LayoutSwitchModeStorageKey, options.layoutSwitch?.defaultMode || LayoutMode.BothWidthAdjustable)
21+
const layoutMode = useLocalStorage(LayoutSwitchModeStorageKey, options.layoutSwitch?.defaultMode || LayoutMode.Original)
2222
const { t } = useI18n()
2323
const { trigger: triggerAnimation } = useLayoutAppearanceChangeAnimation()
2424

packages/vitepress-plugin-enhanced-readabilities/src/components/SpotlightHoverBlock.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ watch(() => props.enabled, (val) => {
134134
:style="boxStyles"
135135
aria-hidden="true"
136136
focusable="false"
137-
138137
pointer-events-none fixed z-50
139138
border="1 $vp-c-brand"
140139
class="VPNolebaseSpotlightHoverBlock"

packages/vitepress-plugin-enhanced-readabilities/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export interface Options {
249249
/**
250250
* Default mode for layout switch
251251
*
252-
* @default LayoutMode.BothWidthAdjustable (4)
252+
* @default LayoutMode.Original (3)
253253
*/
254254
defaultMode?: LayoutMode
255255
/**

0 commit comments

Comments
 (0)