Skip to content

Commit 69d602f

Browse files
committed
feat: allow overriding vuetify config
1 parent a9bd051 commit 69d602f

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
addComponentsDir,
44
addImportsDir,
55
addLayout,
6+
addPlugin,
67
addRouteMiddleware,
78
createResolver,
89
defineNuxtModule,
@@ -84,6 +85,9 @@ export default defineNuxtModule<ModuleOptions>({
8485
},
8586
})
8687

88+
// Plugins
89+
addPlugin(resolver.resolve('./runtime/plugins/vuetify'))
90+
8791
// Components
8892
addComponentsDir({
8993
path: resolver.resolve('./runtime/components'),

src/runtime/components/app/AppNavigation.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const isExpanded = ref(false)
2323
:expand-on-hover="!xs"
2424
:rail="!xs"
2525
:permanent="!xs"
26-
floating
2726
@update:rail="isExpanded = !isExpanded"
2827
>
2928
<nav>

src/runtime/plugins/vuetify.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineNuxtPlugin } from '#imports'
2+
3+
export default defineNuxtPlugin((nuxtApp) => {
4+
// Override default Vuetify options
5+
nuxtApp.hook('vuetify:before-create', ({ vuetifyOptions }) => {
6+
vuetifyOptions.defaults = {
7+
VNavigationDrawer: { floating: true },
8+
}
9+
})
10+
})

0 commit comments

Comments
 (0)