File tree 1 file changed +10
-12
lines changed
1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -16,18 +16,6 @@ npm install vuejs-overlay --save
16
16
17
17
# Usage
18
18
19
- ``` js
20
- // ES6
21
- import vTitle from ' vuejs-overlay'
22
- Vue .use (vTitle)
23
-
24
- // ES5
25
- var vTitle = require (' vuejs-overlay' )
26
- Vue .use (vTitle)
27
- ```
28
-
29
- ### Example
30
-
31
19
``` html
32
20
<div id =" app" >
33
21
<overlay :opened =" opened" :visible =" visible" @closed =" opened = visible = false" >
@@ -39,13 +27,19 @@ Vue.use(vTitle)
39
27
```
40
28
41
29
``` js
30
+ // ES6
31
+ import {Overlay } from ' vuejs-overlay.js' ;
32
+
42
33
new Vue ({
43
34
el: ' #app' ,
44
35
data () {
45
36
return {
46
37
opened: false ,
47
38
visible: false
48
39
}
40
+ },
41
+ components: {
42
+ Overlay
49
43
}
50
44
});
51
45
```
@@ -88,6 +82,7 @@ Let's take an example of content data with ajax. In this example we used [`vuejs
88
82
89
83
``` js
90
84
import ajax from " vuejs-ajax" ;
85
+ import {Overlay } from ' vuejs-overlay.js' ;
91
86
Vue .use (ajax);
92
87
93
88
new Vue ({
@@ -112,6 +107,9 @@ new Vue({
112
107
this .opened = false ;
113
108
this .visible = false ;
114
109
}
110
+ },
111
+ components: {
112
+ Overlay
115
113
}
116
114
});
117
115
```
You can’t perform that action at this time.
0 commit comments