File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ class EventManagment extends JSEventManagment {
8
8
$once = super . once
9
9
}
10
10
11
- function bindEvents ( obj : any , from : string , to : string ) : void {
11
+ function bindEvents ( context , obj : any , from : string , to : string ) : void {
12
12
let evts = obj [ from ] ;
13
13
if ( evts ) {
14
14
obj [ to ] = { }
15
15
for ( var k in evts ) {
16
- obj [ to ] [ k ] = ~ evts [ k ] . name . indexOf ( 'bound ' ) ? evts [ k ] : evts [ k ] . bind ( this )
16
+ obj [ to ] [ k ] = ~ evts [ k ] . name . indexOf ( 'bound ' ) ? evts [ k ] : evts [ k ] . bind ( context )
17
17
}
18
18
}
19
19
}
@@ -52,8 +52,8 @@ const eventsPlugins: PluginFunction<any> = (Vue) => {
52
52
beforeCreate ( ) {
53
53
let $this : any = this ;
54
54
let options = $this . $options ;
55
- bindEvents ( options , 'on' , '$setEventsOn' )
56
- bindEvents ( options , 'once' , '$setEventsOnce' )
55
+ bindEvents ( this , options , 'on' , '$setEventsOn' )
56
+ bindEvents ( this , options , 'once' , '$setEventsOnce' )
57
57
} ,
58
58
created ( ) {
59
59
let $this : any = this ;
You can’t perform that action at this time.
0 commit comments