File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ Object.defineProperties(Vue.prototype, {
21
21
'$keys' : { get : ( ) => keys }
22
22
} )
23
23
24
- if ( isWindows ) document . body . classList . add ( 'platform-windows' )
25
- if ( isMac ) document . body . classList . add ( 'platform-mac' )
26
- if ( isLinux ) document . body . classList . add ( 'platform-linux' )
24
+ export function initBodyClass ( ) {
25
+ if ( isWindows ) document . body . classList . add ( 'platform-windows' )
26
+ if ( isMac ) document . body . classList . add ( 'platform-mac' )
27
+ if ( isLinux ) document . body . classList . add ( 'platform-linux' )
28
+ }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import App from './App.vue'
3
3
import store from './store'
4
4
import './plugins'
5
5
import { parse } from '../util'
6
- import { isChrome } from './env'
6
+ import { isChrome , initBodyClass } from './env'
7
7
8
8
// UI
9
9
@@ -134,10 +134,13 @@ function initApp (shell) {
134
134
135
135
app = new Vue ( {
136
136
extends : App ,
137
+
137
138
store,
139
+
138
140
data : {
139
141
isDark
140
142
} ,
143
+
141
144
watch : {
142
145
isDark : {
143
146
handler ( value ) {
@@ -149,6 +152,10 @@ function initApp (shell) {
149
152
} ,
150
153
immediate : true
151
154
}
155
+ } ,
156
+
157
+ mounted ( ) {
158
+ initBodyClass ( )
152
159
}
153
160
} ) . $mount ( '#app' )
154
161
You can’t perform that action at this time.
0 commit comments