File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,17 @@ export function eventMixin(Base = class {}) {
25
25
sidebar . getAndActive ( this . router , 'nav' ) ;
26
26
}
27
27
}
28
- } ;
29
- }
30
28
31
- export function initEvent ( vm ) {
32
- // Bind toggle button
33
- sidebar . btn ( 'button.sidebar-toggle' , vm . router ) ;
34
- sidebar . collapse ( '.sidebar' , vm . router ) ;
35
- // Bind sticky effect
36
- if ( vm . config . coverpage ) {
37
- ! isMobile && on ( 'scroll' , sidebar . sticky ) ;
38
- } else {
39
- body . classList . add ( 'sticky' ) ;
40
- }
29
+ initEvent ( ) {
30
+ // Bind toggle button
31
+ sidebar . btn ( 'button.sidebar-toggle' , this . router ) ;
32
+ sidebar . collapse ( '.sidebar' , this . router ) ;
33
+ // Bind sticky effect
34
+ if ( this . config . coverpage ) {
35
+ ! isMobile && on ( 'scroll' , sidebar . sticky ) ;
36
+ } else {
37
+ body . classList . add ( 'sticky' ) ;
38
+ }
39
+ }
40
+ } ;
41
41
}
Original file line number Diff line number Diff line change 1
1
import config from '../config' ;
2
- import { initEvent } from '../event' ;
3
2
import { initFetch } from '../fetch' ;
4
3
5
4
export function initMixin ( Base = class { } ) {
@@ -12,7 +11,7 @@ export function initMixin(Base = class {}) {
12
11
this . callHook ( 'init' ) ;
13
12
this . initRouter ( ) ; // Add router
14
13
this . initRender ( ) ; // Render base DOM
15
- initEvent ( this ) ; // Bind events
14
+ this . initEvent ( ) ; // Bind events
16
15
initFetch ( this ) ; // Fetch data
17
16
this . callHook ( 'mounted' ) ;
18
17
}
You can’t perform that action at this time.
0 commit comments