Skip to content

Commit

Permalink
fix: incorrect default layout mode value (#31)
Browse files Browse the repository at this point in the history
* fix: incorrect default layout mode value

---------

Signed-off-by: Neko Ayaka <neko@ayaka.moe>
  • Loading branch information
nekomeowww committed Dec 12, 2023
1 parent b6610b9 commit 0f99515
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default defineConfig({
vite: { // [!code ++]
ssr: { // [!code ++]
noExternal: [ // [!code ++]
// If there are other packages that need to be processed by Vite, you can add them here. // [!code hl]
'@nolebase/vitepress-plugin-enhanced-readabilities', // [!code ++]
], // [!code ++]
}, // [!code ++]
Expand All @@ -104,6 +105,7 @@ export default defineConfig(() => {
return {
ssr: { // [!code ++]
noExternal: [ // [!code ++]
// If there are other packages that need to be processed by Vite, you can add them here. // [!code hl]
'@nolebase/vitepress-plugin-enhanced-readabilities', // [!code ++]
], // [!code ++]
}, // [!code ++]
Expand Down Expand Up @@ -277,7 +279,7 @@ export const Theme: ThemeConfig = {
export default Theme
```

For more information on configuration, see [Configuration](#Configuration).
For more information on configuration, see [Configuration](#configuration).

#### Import layout switching components on demand

Expand Down Expand Up @@ -330,7 +332,7 @@ export const Theme: ThemeConfig = {
}
```

For more information on internationalization configuration, see [Internationalization](#Internationalization).
For more information on internationalization configuration, see [Internationalization](#internationalization).

### Options inside

Expand Down Expand Up @@ -382,7 +384,7 @@ export interface Options {
/**
* Default mode for layout switch
*
* @default LayoutMode.FitContentWidth (3)
* @default LayoutMode.Original (3)
*/
defaultMode?: LayoutMode
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default defineConfig({
vite: { // [!code ++]
ssr: { // [!code ++]
noExternal: [ // [!code ++]
// 如果还有别的依赖需要添加的话,并排填写和配置到这里即可 // [!code hl]
'@nolebase/vitepress-plugin-enhanced-readabilities', // [!code ++]
], // [!code ++]
}, // [!code ++]
Expand All @@ -104,6 +105,7 @@ export default defineConfig(() => {
return {
ssr: { // [!code ++]
noExternal: [ // [!code ++]
// 如果还有别的依赖需要添加的话,并排填写和配置到这里即可 // [!code hl]
'@nolebase/vitepress-plugin-enhanced-readabilities', // [!code ++]
], // [!code ++]
}, // [!code ++]
Expand Down Expand Up @@ -381,7 +383,7 @@ export interface Options {
/**
* Default mode for layout switch
*
* @default LayoutMode.FitContentWidth (3)
* @default LayoutMode.Original (3)
*/
defaultMode?: LayoutMode
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const disabled = ref(false)
const mounted = useMounted()
const isLargerThanMobile = useMediaQuery('(min-width: 768px)')
const layoutMode = useLocalStorage(LayoutSwitchModeStorageKey, options.layoutSwitch?.defaultMode || LayoutMode.BothWidthAdjustable)
const layoutMode = useLocalStorage(LayoutSwitchModeStorageKey, options.layoutSwitch?.defaultMode || LayoutMode.Original)
const { t } = useI18n()
const { trigger: triggerAnimation } = useLayoutAppearanceChangeAnimation()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ watch(() => props.enabled, (val) => {
:style="boxStyles"
aria-hidden="true"
focusable="false"

pointer-events-none fixed z-50
border="1 $vp-c-brand"
class="VPNolebaseSpotlightHoverBlock"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export interface Options {
/**
* Default mode for layout switch
*
* @default LayoutMode.BothWidthAdjustable (4)
* @default LayoutMode.Original (3)
*/
defaultMode?: LayoutMode
/**
Expand Down

0 comments on commit 0f99515

Please sign in to comment.