Skip to content

Commit b796561

Browse files
committed
fix and update snippets
1 parent faf810f commit b796561

File tree

4 files changed

+326
-19
lines changed

4 files changed

+326
-19
lines changed

README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,25 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
2626
| `VueConfigSilent` | `Vue.config.silent = true` |
2727
| `VueConfigOptionMergeStrategies` | `Vue.config.optionMergeStrategies` |
2828
| `VueConfigDevtools` | `Vue.config.devtools = true` |
29-
| `VueConfigErrorHandler` | `Vue.config.errorHandler = function (err, vm) {...}` |
29+
| `VueConfigErrorHandler` | `Vue.config.errorHandler = function (err, vm, info) {...}` |
30+
| `VueConfigWarnHandler` | `Vue.config.warnHandler = function (msg, vm, trace) {...}` |
3031
| `VueConfigIgnoredElements` | `Vue.config.ignoredElements = ['']` \
3132
| `VueConfigKeyCodes` | `Vue.config.keyCodes` |
33+
| `VueConfigPerformance` | `Vue.config.performance = true` |
34+
| `VueConfigProductionTip` | `Vue.config.productionTip = false` |
3235
| `vueExtend` | `Vue.extend( options )` |
3336
| `VueNextTick` | `Vue.nextTick( callback, [context] )` |
34-
| `VueSet` | `Vue.set( object, key, value )` |
35-
| `VueDelete` | `Vue.delete( object, key )` |
37+
| `VueSet` | `Vue.set( target, key, value )` |
38+
| `VueDelete` | `Vue.delete( target, key )` |
3639
| `VueDirective` | `Vue.directive( id, [definition] )` |
3740
| `VueFilter` | `Vue.filter( id, [definition] )` |
3841
| `VueComponent` | `Vue.component( id, [definition] )` |
3942
| `VueUse` | `Vue.use( plugin )` |
4043
| `VueMixin` | `Vue.mixin( mixin )` |
4144
| `VueCompile` | `Vue.compile( template )` |
45+
| `VueVersion` | `Vue.version.split('.')[]` |
4246
| `vmData` | `vm.$data` |
47+
| `vmProps` | `vm.$props` |
4348
| `vmEl` | `vm.$el` |
4449
| `vmOptions` | `vm.$options` |
4550
| `vmParent` | `vm.$parent` |
@@ -49,6 +54,8 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
4954
| `vmScopedSlots` | `this.$scopedSlots.default({})` |
5055
| `vmRefs` | `vm.$refs` |
5156
| `vmIsServer` | `vm.$isServer` |
57+
| `vmAttrs` | `vm.$attrs`|
58+
| `vmListeners` | `vm.listeners`|
5259
| `vmWatch` | `vm.$watch( expOrFn, callback, [options] )` |
5360
| `vmSet` | `vm.$set( object, key, value )` |
5461
| `vmDelete` | `vm.$delete( object, key )` |
@@ -78,6 +85,7 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
7885
| `vElse` | `v-else` |
7986
| `vElseIf` | `v-else-if` |
8087
| `vFor` | `v-for` |
88+
| `vForWithKey` | `v-for="" :key=""` |
8189
| `vOn` | `v-on` |
8290
| `vBind` | `v-bind` |
8391
| `vModel` | `v-model` |
@@ -92,6 +100,27 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
92100
| `keepAlive` | `<keep-alive></keep-alive>` |
93101
| `transition` | `<transition></transition>` |
94102
| `transitionGroup` | `<transition-group></transition-group>` |
103+
| `enterClass` | `enter-class=''`|
104+
| `leaveClass` | `leave-class=''`|
105+
| `appearClass` | `appear-class=''`|
106+
| `enterToClass` | `enter-to-class=''`|
107+
| `leaveToClass` | `leave-to-class=''`|
108+
| `appearToClass` | `appear-to-class=''`|
109+
| `enterActiveClass` | `enter-active-class=''`|
110+
| `leaveActiveClass` | `leave-active-class=''`|
111+
| `appearActiveClass` | `appear-active-class=''`|
112+
| `beforeEnterEvent` | `@before-enter=''`|
113+
| `beforeLeaveEvent` | `@before-leave=''`|
114+
| `beforeAppearEvent` | `@before-appear=''`|
115+
| `enterEvent` | `@enter=''`|
116+
| `leaveEvent` | `@leave=''`|
117+
| `appearEvent` | `@appear=''`|
118+
| `afterEnterEvent` | `@after-enter=''`|
119+
| `afterLeaveEvent` | `@after-leave=''`|
120+
| `afterAppearEvent` | `@after-appear=''`|
121+
| `enterCancelledEvent` | `@enter-cancelled=''`|
122+
| `leaveCancelledEvent` | `@leave-cancelled=''`|
123+
| `appearCancelledEvent` | `@appear-cancelled=''`|
95124

96125

97126
| Prefix | Vue Router Snippet Content |

readme.marketplace.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,25 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
2323
| `VueConfigSilent` | `Vue.config.silent = true` |
2424
| `VueConfigOptionMergeStrategies` | `Vue.config.optionMergeStrategies` |
2525
| `VueConfigDevtools` | `Vue.config.devtools = true` |
26-
| `VueConfigErrorHandler` | `Vue.config.errorHandler = function (err, vm) {...}` |
26+
| `VueConfigErrorHandler` | `Vue.config.errorHandler = function (err, vm, info) {...}` |
27+
| `VueConfigWarnHandler` | `Vue.config.warnHandler = function (msg, vm, trace) {...}` |
2728
| `VueConfigIgnoredElements` | `Vue.config.ignoredElements = ['']` \
2829
| `VueConfigKeyCodes` | `Vue.config.keyCodes` |
30+
| `VueConfigPerformance` | `Vue.config.performance = true` |
31+
| `VueConfigProductionTip` | `Vue.config.productionTip = false` |
2932
| `vueExtend` | `Vue.extend( options )` |
3033
| `VueNextTick` | `Vue.nextTick( callback, [context] )` |
31-
| `VueSet` | `Vue.set( object, key, value )` |
32-
| `VueDelete` | `Vue.delete( object, key )` |
34+
| `VueSet` | `Vue.set( target, key, value )` |
35+
| `VueDelete` | `Vue.delete( target, key )` |
3336
| `VueDirective` | `Vue.directive( id, [definition] )` |
3437
| `VueFilter` | `Vue.filter( id, [definition] )` |
3538
| `VueComponent` | `Vue.component( id, [definition] )` |
3639
| `VueUse` | `Vue.use( plugin )` |
3740
| `VueMixin` | `Vue.mixin( mixin )` |
3841
| `VueCompile` | `Vue.compile( template )` |
42+
| `VueVersion` | `Vue.version.split('.')[]` |
3943
| `vmData` | `vm.$data` |
44+
| `vmProps` | `vm.$props` |
4045
| `vmEl` | `vm.$el` |
4146
| `vmOptions` | `vm.$options` |
4247
| `vmParent` | `vm.$parent` |
@@ -46,6 +51,8 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
4651
| `vmScopedSlots` | `this.$scopedSlots.default({})` |
4752
| `vmRefs` | `vm.$refs` |
4853
| `vmIsServer` | `vm.$isServer` |
54+
| `vmAttrs` | `vm.$attrs`|
55+
| `vmListeners` | `vm.listeners`|
4956
| `vmWatch` | `vm.$watch( expOrFn, callback, [options] )` |
5057
| `vmSet` | `vm.$set( object, key, value )` |
5158
| `vmDelete` | `vm.$delete( object, key )` |
@@ -75,6 +82,7 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
7582
| `vElse` | `v-else` |
7683
| `vElseIf` | `v-else-if` |
7784
| `vFor` | `v-for` |
85+
| `vForWithKey` | `v-for="" :key=""` |
7886
| `vOn` | `v-on` |
7987
| `vBind` | `v-bind` |
8088
| `vModel` | `v-model` |
@@ -89,6 +97,27 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
8997
| `keepAlive` | `<keep-alive></keep-alive>` |
9098
| `transition` | `<transition></transition>` |
9199
| `transitionGroup` | `<transition-group></transition-group>` |
100+
| `enterClass` | `enter-class=''`|
101+
| `leaveClass` | `leave-class=''`|
102+
| `appearClass` | `appear-class=''`|
103+
| `enterToClass` | `enter-to-class=''`|
104+
| `leaveToClass` | `leave-to-class=''`|
105+
| `appearToClass` | `appear-to-class=''`|
106+
| `enterActiveClass` | `enter-active-class=''`|
107+
| `leaveActiveClass` | `leave-active-class=''`|
108+
| `appearActiveClass` | `appear-active-class=''`|
109+
| `beforeEnterEvent` | `@before-enter=''`|
110+
| `beforeLeaveEvent` | `@before-leave=''`|
111+
| `beforeAppearEvent` | `@before-appear=''`|
112+
| `enterEvent` | `@enter=''`|
113+
| `leaveEvent` | `@leave=''`|
114+
| `appearEvent` | `@appear=''`|
115+
| `afterEnterEvent` | `@after-enter=''`|
116+
| `afterLeaveEvent` | `@after-leave=''`|
117+
| `afterAppearEvent` | `@after-appear=''`|
118+
| `enterCancelledEvent` | `@enter-cancelled=''`|
119+
| `leaveCancelledEvent` | `@leave-cancelled=''`|
120+
| `appearCancelledEvent` | `@appear-cancelled=''`|
92121

93122

94123
| Prefix | Vue Router Snippet Content |
@@ -113,7 +142,6 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
113142
| ------ | ------------ |
114143
| `newVuexStore` | `const store = new Vuex.Store({ })` |
115144

116-
117145
### Supported languages
118146
* vue(.vue)
119147
* HTML(.html)

snippets/html.json

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@
4848
],
4949
"description": "Expects: Array | Object | number | string"
5050
},
51+
"v-for-with-key": {
52+
"prefix": "vForWithKey",
53+
"body": [
54+
"v-for=\"${1:item} in ${2:items}\" :key=\"${3:item.id}\""
55+
],
56+
"description": "Expects: Array | Object | number | string"
57+
},
5158
"v-on": {
5259
"prefix": "vOn",
5360
"body": [
@@ -155,6 +162,153 @@
155162
],
156163
"description": "transition-group element"
157164
},
165+
"enter-class": {
166+
"prefix": "enterClass",
167+
"body": [
168+
"enter-class=\"$1\"$0"
169+
],
170+
"description": "enter-class=''. Expects: string."
171+
},
172+
"leave-class": {
173+
"prefix": "leaveClass",
174+
"body": [
175+
"leave-class=\"$1\"$0"
176+
],
177+
"description": "leave-class=''. Expects: string."
178+
},
179+
"appear-class": {
180+
"prefix": "appearClass",
181+
"body": [
182+
"appear-class=\"$1\"$0"
183+
],
184+
"description": "appear-class=''. Expects: string."
185+
},
186+
"enter-to-class": {
187+
"prefix": "enterToClass",
188+
"body": [
189+
"enter-to-class=\"$1\"$0"
190+
],
191+
"description": "enter-to-class=''. Expects: string."
192+
},
193+
"leave-to-class": {
194+
"prefix": "leaveToClass",
195+
"body": [
196+
"leave-to-class=\"$1\"$0"
197+
],
198+
"description": "leave-to-class=''. Expects: string."
199+
},
200+
"appear-to-class": {
201+
"prefix": "appearToClass",
202+
"body": [
203+
"appear-to-class=\"$1\"$0"
204+
],
205+
"description": "appear-to-class=''. Expects: string."
206+
},
207+
"enter-active-class": {
208+
"prefix": "enterActiveClass",
209+
"body": [
210+
"enter-active-class=\"$1\"$0"
211+
],
212+
"description": "enter-active-class=''. Expects: string."
213+
},
214+
"leave-active-class": {
215+
"prefix": "leaveActiveClass",
216+
"body": [
217+
"leave-active-class=\"$1\"$0"
218+
],
219+
"description": "leave-active-class=''. Expects: string."
220+
},
221+
"appear-active-class": {
222+
"prefix": "appearActiveClass",
223+
"body": [
224+
"appear-active-class=\"$1\"$0"
225+
],
226+
"description": "appear-active-class=''. Expects: string."
227+
},
228+
"before-enter": {
229+
"prefix": "beforeEnterEvent",
230+
"body": [
231+
"@before-enter=\"$1\"$0"
232+
],
233+
"description": "@before-enter=''"
234+
},
235+
"before-leave": {
236+
"prefix": "beforeLeaveEvent",
237+
"body": [
238+
"@before-leave=\"$1\"$0"
239+
],
240+
"description": "@before-leave=''"
241+
},
242+
"before-appear": {
243+
"prefix": "beforeAppearEvent",
244+
"body": [
245+
"@before-appear=\"$1\"$0"
246+
],
247+
"description": "@before-appear=''"
248+
},
249+
"enter": {
250+
"prefix": "enterEvent",
251+
"body": [
252+
"@enter=\"$1\"$0"
253+
],
254+
"description": "@enter=''"
255+
},
256+
"leave": {
257+
"prefix": "leaveEvent",
258+
"body": [
259+
"@leave=\"$1\"$0"
260+
],
261+
"description": "@leave=''"
262+
},
263+
"appear": {
264+
"prefix": "appearEvent",
265+
"body": [
266+
"@appear=\"$1\"$0"
267+
],
268+
"description": "@appear=''"
269+
},
270+
"after-enter": {
271+
"prefix": "afterEnterEvent",
272+
"body": [
273+
"@after-enter=\"$1\"$0"
274+
],
275+
"description": "@after-enter=''"
276+
},
277+
"after-leave": {
278+
"prefix": "afterLeaveEvent",
279+
"body": [
280+
"@after-leave=\"$1\"$0"
281+
],
282+
"description": "@after-leave=''"
283+
},
284+
"after-appear": {
285+
"prefix": "afterAppearEvent",
286+
"body": [
287+
"@after-appear=\"$1\"$0"
288+
],
289+
"description": "@after-appear=''"
290+
},
291+
"enter-cancelled": {
292+
"prefix": "enterCancelledEvent",
293+
"body": [
294+
"@enter-cancelled=\"$1\"$0"
295+
],
296+
"description": "@enter-cancelled=''"
297+
},
298+
"leave-cancelled": {
299+
"prefix": "leaveCancelledEvent",
300+
"body": [
301+
"@leave-cancelled=\"$1\"$0"
302+
],
303+
"description": "@leave-cancelled='' (v-show only)"
304+
},
305+
"appear-cancelled": {
306+
"prefix": "appearCancelledEvent",
307+
"body": [
308+
"@appear-cancelled=\"$1\"$0"
309+
],
310+
"description": "@appear-cancelled=''"
311+
},
158312

159313
"routerLink": {
160314
"prefix": "routerLink",

0 commit comments

Comments
 (0)