File tree 1 file changed +20
-15
lines changed
src/components/VApp/mixins
1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change @@ -42,33 +42,38 @@ export default {
42
42
}
43
43
44
44
return css
45
+ } ,
46
+ vueMeta ( ) {
47
+ return {
48
+ style : [ {
49
+ cssText : this . generatedStyles ,
50
+ type : 'text/css' ,
51
+ id : 'vuetify-theme-stylesheet'
52
+ } ]
53
+ }
45
54
}
46
55
} ,
47
56
57
+ // Regular vue-meta
58
+ metaInfo ( ) {
59
+ return this . vueMeta
60
+ } ,
61
+
62
+ // Nuxt
63
+ head ( ) {
64
+ return this . vueMeta
65
+ } ,
66
+
48
67
watch : {
49
68
generatedStyles ( ) {
50
69
! this . meta && this . applyTheme ( )
51
70
}
52
71
} ,
53
72
54
- beforeCreate ( ) {
55
- if ( this . $meta ) {
56
- // Vue-meta
57
- const keyName = this . $nuxt ? 'head' : 'metaInfo'
58
- this . $options [ keyName ] = ( ) => ( {
59
- style : [ {
60
- cssText : this . generatedStyles ,
61
- type : 'text/css' ,
62
- id : 'vuetify-theme-stylesheet'
63
- } ]
64
- } )
65
- }
66
- } ,
67
-
68
73
created ( ) {
69
74
if ( this . $meta ) {
70
75
// Vue-meta
71
- // Handled by beforeCreate hook
76
+ // Handled by metaInfo()/nuxt()
72
77
} else if ( typeof document === 'undefined' && this . $ssrContext ) {
73
78
// SSR
74
79
this . $ssrContext . head = this . $ssrContext . head || ''
You can’t perform that action at this time.
0 commit comments