1
- export default {
2
- install : ( Vue , options = { } ) => {
1
+ module . exports = {
2
+ install : function install ( Vue ) {
3
+ var options = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ;
4
+
3
5
Vue . directive ( options . name || 'ref' , {
4
- bind : function ( el , binding , vnode ) {
5
- binding . value ( vnode . componentInstance || el , vnode . key )
6
+ bind : function bind ( el , binding , vnode ) {
7
+ binding . value ( vnode . componentInstance || el , vnode . key ) ;
6
8
} ,
7
- update : function ( el , binding , vnode ) {
8
- binding . value ( vnode . componentInstance || el , vnode . key )
9
+ update : function update ( el , binding , vnode ) {
10
+ binding . value ( vnode . componentInstance || el , vnode . key ) ;
9
11
} ,
10
- unbind : function ( el , binding , vnode ) {
11
- if ( ! el . parentNode && ! el . parentElement ) {
12
- binding . value ( null , vnode . key )
12
+ unbind : function unbind ( el , binding , vnode ) {
13
+ if ( ! el . parentNode && ! el . parentElement ) {
14
+ binding . value ( null , vnode . key ) ;
13
15
}
14
- } ,
15
- } )
16
- } ,
17
- }
16
+ }
17
+ } ) ;
18
+ }
19
+ } ;
0 commit comments