This repository was archived by the owner on Apr 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +41
-13
lines changed Expand file tree Collapse file tree 1 file changed +41
-13
lines changed Original file line number Diff line number Diff line change @@ -15,26 +15,54 @@ with CSS.
15
15
16
16
## Installation
17
17
18
- 1 . Install package using ` yarn ` or ` npm ` :
18
+ ### yarn / npm
19
19
20
- ``` sh
21
- $ yarn add vue-float-label
20
+ Install package using ` yarn ` or ` npm ` :
22
21
23
- # or
22
+ ``` sh
23
+ $ yarn add vue-float-label
24
24
25
- $ npm install --save vue-float-label
26
- ```
25
+ # or
27
26
28
- 2. Load the plugin by calling `Vue.use ()` :
27
+ $ npm install --save vue-float-label
28
+ ```
29
29
30
- ` ` ` js
31
- import Vue from ' vue'
32
- import VueFloatLabel from ' vue-float-label'
30
+ #### Global
33
31
34
- Vue.use(VueFloatLabel)
35
- ```
32
+ Load the plugin by calling ` Vue.use() ` :
33
+
34
+ ``` js
35
+ import Vue from ' vue'
36
+ import VueFloatLabel from ' vue-float-label'
37
+
38
+ Vue .use (VueFloatLabel)
39
+ ```
36
40
37
- 3. Now you have access in your templates to the ` < float-label> ` component.
41
+ Now you have access in your templates to the ` <float-label> ` component.
42
+
43
+ #### Local
44
+
45
+ You may prefer to explicitly import the plugin and use it inside your components:
46
+
47
+ ``` vue
48
+ <template>
49
+ <div>
50
+ <float-label>
51
+ ...
52
+ </float-label>
53
+ </div>
54
+ </template>
55
+
56
+ <script>
57
+ import FloatLabel from 'vue-float-label/components/FloatLabel'
58
+
59
+ export default {
60
+ components: {
61
+ FloatLabel
62
+ }
63
+ }
64
+ </script>
65
+ ```
38
66
39
67
## Usage
40
68
You can’t perform that action at this time.
0 commit comments