File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
- import { util } from 'vue' ;
1
+ import Vue from 'vue' ;
2
+
3
+ export var version = '1.1.3' ;
4
+
5
+ var compatible = ( / ^ 1 \. / ) . test ( Vue . version ) ;
6
+ if ( ! compatible ) {
7
+ Vue . util . warn ( 'VueClickaway ' + version + ' only supports Vue 1.x, and does not support Vue ' + Vue . version ) ;
8
+ }
2
9
3
10
export var directive = {
4
11
@@ -8,7 +15,7 @@ export var directive = {
8
15
update : function ( handler ) {
9
16
if ( typeof handler !== 'function' ) {
10
17
if ( process . env . NODE_ENV !== 'production' ) {
11
- util . warn (
18
+ Vue . util . warn (
12
19
this . name + '="' +
13
20
this . expression + '" expects a function value, ' +
14
21
'got ' + handler
@@ -33,11 +40,11 @@ export var directive = {
33
40
}
34
41
} ;
35
42
36
- util . on ( document . documentElement , 'click' , this . handler ) ;
43
+ Vue . util . on ( document . documentElement , 'click' , this . handler ) ;
37
44
} ,
38
45
39
46
reset : function ( ) {
40
- util . off ( document . documentElement , 'click' , this . handler ) ;
47
+ Vue . util . off ( document . documentElement , 'click' , this . handler ) ;
41
48
} ,
42
49
43
50
unbind : function ( ) {
You can’t perform that action at this time.
0 commit comments