|
1 | 1 | ".text.html.vue": |
2 | 2 | "Component include": |
3 | 3 | "prefix": "component" |
4 | | - "body": "<${1:componentName}></${1:componentName}>" |
| 4 | + "body": "<${1:componentName}>$2</${1:componentName}>" |
5 | 5 | "description": "Use a component in a template file" |
6 | 6 | "descriptionMoreURL": "https://vuejs.org/v2/guide/components.html" |
7 | 7 | "Router View": |
8 | 8 | "prefix": "router-view" |
9 | | - "body": "<router-view name=\"${1:routeName}\"></router-view>" |
| 9 | + "body": "<router-view name=\"${1:routeName}\">$2</router-view>" |
10 | 10 | "description": "Vuejs router-view component" |
11 | 11 | "descriptionMoreURL": "https://router.vuejs.org/en/api/router-view.html" |
12 | 12 | 'Router Link': |
13 | 13 | 'prefix': 'router-link' |
14 | | - 'body': '<router-link :to=\"{ name: \'${1:routeName}\', params: { ${2:property}: ${3:value}}}\"></router-link>' |
| 14 | + 'body': '<router-link :to=\"{ name: \'${1:routeName}\', params: { ${2:property}: ${3:value}}}\">$4</router-link>' |
15 | 15 | 'description': 'Vuejs router-link component with named route' |
16 | 16 | 'descriptionMoreURL': 'https://router.vuejs.org/en/api/router-link.html' |
17 | 17 | "Vue Component template": |
18 | 18 | "prefix": "template" |
19 | 19 | "body": """ |
20 | 20 | <template> |
21 | 21 | <div id="$1"> |
22 | | -
|
| 22 | + $2 |
23 | 23 | </div> |
24 | 24 | </template> |
25 | 25 | <script> |
|
51 | 51 | 'descriptionMoreURL': 'https://vuejs.org/v2/guide/conditional.html#v-if' |
52 | 52 | 'v-show': |
53 | 53 | 'prefix': 'v-show' |
54 | | - 'body': 'v-if=\"${1:condition}\"' |
| 54 | + 'body': 'v-show=\"${1:condition}\"' |
55 | 55 | 'description': 'Vuejs binding for show conditional rendering' |
56 | 56 | 'descriptionMoreURL': 'https://vuejs.org/v2/guide/conditional.html#v-show' |
57 | 57 | 'v-else-if': |
58 | | - 'prefix': 'v-if' |
| 58 | + 'prefix': 'v-else-if' |
59 | 59 | 'body': 'v-else-if=\"${1:condition}\"' |
60 | 60 | 'description': 'Vuejs binding for else-if conditional rendering' |
61 | 61 | 'descriptionMoreURL': 'https://vuejs.org/v2/guide/conditional.html#v-else-if' |
|
87 | 87 | 'body': """ |
88 | 88 | beforeCreate: function beforeCreate() { |
89 | 89 | //do something before creating vue instance |
| 90 | + $1 |
90 | 91 | } |
91 | 92 | """ |
92 | 93 | 'description': 'Vuejs instance lifecycle hook for beforeCreate' |
|
96 | 97 | 'body': """ |
97 | 98 | created: function created() { |
98 | 99 | //do something after creating vue instance |
| 100 | + $1 |
99 | 101 | } |
100 | 102 | """ |
101 | 103 | 'description': 'Vuejs instance lifecycle hook for created' |
|
105 | 107 | 'body': """ |
106 | 108 | beforeMount: function beforeMount() { |
107 | 109 | //do something before mounting vue instance |
| 110 | + $1 |
108 | 111 | } |
109 | 112 | """ |
110 | 113 | 'description': 'Vuejs instance lifecycle hook for beforeMount' |
|
114 | 117 | 'body': """ |
115 | 118 | mounted: function mounted() { |
116 | 119 | //do something after mounting vue instance |
| 120 | + $1 |
117 | 121 | } |
118 | 122 | """ |
119 | 123 | 'description': 'Vuejs instance lifecycle hook for mounted' |
|
123 | 127 | 'body': """ |
124 | 128 | beforeUpdate: function beforeUpdate() { |
125 | 129 | //do something before updating vue instance |
| 130 | + $1 |
126 | 131 | } |
127 | 132 | """ |
128 | 133 | 'description': 'Vuejs instance lifecycle hook for beforeUpdate' |
|
132 | 137 | 'body': """ |
133 | 138 | updated: function updated() { |
134 | 139 | //do something after updating vue instance |
| 140 | + $1 |
135 | 141 | } |
136 | 142 | """ |
137 | 143 | 'description': 'Vuejs instance lifecycle hook for updated' |
|
141 | 147 | 'body': """ |
142 | 148 | beforeDestroy: function beforeDestroy() { |
143 | 149 | //do something before destroying vue instance |
| 150 | + $1 |
144 | 151 | } |
145 | 152 | """ |
146 | 153 | 'description': 'Vuejs instance lifecycle hook for beforeDestroy' |
|
150 | 157 | 'body': """ |
151 | 158 | destroyed: function destroyed() { |
152 | 159 | //do something after destroying vue instance |
| 160 | + $1 |
153 | 161 | } |
154 | 162 | """ |
155 | 163 | 'description': 'Vuejs instance lifecycle hook for destroyed' |
|
160 | 168 | watch: { |
161 | 169 | ${1:propertyToWatch}: function ${1:propertyToWatch}Watcher() { |
162 | 170 | //do something when ${1:propertyToWatch} value changes |
| 171 | + $2 |
163 | 172 | } |
164 | 173 | } |
165 | 174 | """ |
|
170 | 179 | 'body': """ |
171 | 180 | methods: { |
172 | 181 | ${1:methodName}: function ${1:methodName}() { |
173 | | -
|
| 182 | + $2 |
174 | 183 | } |
175 | 184 | } |
176 | 185 | """ |
|
0 commit comments