Skip to content

Commit 6ed8d17

Browse files
committed
version 0.1.6
1 parent 376e93b commit 6ed8d17

File tree

5 files changed

+158
-153
lines changed

5 files changed

+158
-153
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
3434
| `VueConfigProductionTip` | `Vue.config.productionTip = false` |
3535
| `vueExtend` | `Vue.extend( options )` |
3636
| `VueNextTick` | `Vue.nextTick( callback, [context] )` |
37+
| `VueNextTickThen` | `Vue.nextTick( callback, [context] ).then(function(){ })` |
3738
| `VueSet` | `Vue.set( target, key, value )` |
3839
| `VueDelete` | `Vue.delete( target, key )` |
3940
| `VueDirective` | `Vue.directive( id, [definition] )` |
4041
| `VueFilter` | `Vue.filter( id, [definition] )` |
4142
| `VueComponent` | `Vue.component( id, [definition] )` |
4243
| `VueUse` | `Vue.use( plugin )` |
43-
| `VueMixin` | `Vue.mixin( mixin )` |
44+
| `VueMixin` | `Vue.mixin({ mixin })` |
4445
| `VueCompile` | `Vue.compile( template )` |
45-
| `VueVersion` | `Vue.version.split('.')[]` |
46+
| `VueVersion` | `Vue.version` |
4647
| `vmData` | `vm.$data` |
4748
| `vmProps` | `vm.$props` |
4849
| `vmEl` | `vm.$el` |
@@ -55,7 +56,7 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
5556
| `vmRefs` | `vm.$refs` |
5657
| `vmIsServer` | `vm.$isServer` |
5758
| `vmAttrs` | `vm.$attrs`|
58-
| `vmListeners` | `vm.$listeners`|
59+
| `vmListeners` | `vm.listeners`|
5960
| `vmWatch` | `vm.$watch( expOrFn, callback, [options] )` |
6061
| `vmSet` | `vm.$set( object, key, value )` |
6162
| `vmDelete` | `vm.$delete( object, key )` |
@@ -72,6 +73,7 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
7273
| `preventDefault` | `preventDefault();` |
7374
| `stopPropagation` | `stopPropagation();` |
7475

76+
<br />
7577

7678
| Prefix | HTML Snippet Content |
7779
| ------ | ------------ |
@@ -80,12 +82,12 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
8082
| `style` | `<style></style>` |
8183
| `vText` | `v-text=msg` |
8284
| `vHtml` | `v-html=html` |
83-
| `vIf` | `v-if` |
8485
| `vShow` | `v-show` |
86+
| `vIf` | `v-if` |
8587
| `vElse` | `v-else` |
8688
| `vElseIf` | `v-else-if` |
87-
| `vFor` | `v-for` |
88-
| `vForWithKey` | `v-for="" :key=""` |
89+
| `vForWithoutKey` | `v-for` |
90+
| `vFor` | `v-for="" :key=""` |
8991
| `vOn` | `v-on` |
9092
| `vBind` | `v-bind` |
9193
| `vModel` | `v-model` |
@@ -96,6 +98,7 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
9698
| `ref` | `ref`|
9799
| `slotA` | `slot=""`|
98100
| `slotE` | `<slot></slot>`|
101+
| `slotScope` | `slot-scope=""`|
99102
| `component` | `<component :is=''></component>`|
100103
| `keepAlive` | `<keep-alive></keep-alive>` |
101104
| `transition` | `<transition></transition>` |
@@ -122,6 +125,7 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
122125
| `leaveCancelledEvent` | `@leave-cancelled=''`|
123126
| `appearCancelledEvent` | `@appear-cancelled=''`|
124127

128+
<br />
125129

126130
| Prefix | Vue Router Snippet Content |
127131
| ------ | ------------ |
@@ -140,6 +144,7 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
140144
| `beforeRouteLeave` | `beforeRouteLeave: (to, from, next) => { }` |
141145
| `scrollBehavior` | `scrollBehavior (to, from, savedPosition) { }` |
142146

147+
<br />
143148

144149
| Prefix | Vuex Snippet Content |
145150
| ------ | ------------ |
@@ -156,6 +161,9 @@ Including most of the API of Vue.js 2. You can type `vcom`, choose `VueConfigOpt
156161
[vue-syntax-highlight (vue.tmLanguage)](https://github.com/vuejs/vue-syntax-highlight/blob/master/vue.tmLanguage)
157162

158163
--------------------------------------
164+
##### 2018/05/22 (0.1.6)
165+
* Update sinppets
166+
159167
##### 2017/09/17 (0.1.5)
160168
* Fix and update sinppets
161169

package.json

Lines changed: 97 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,99 @@
11
{
2-
"name": "vue-snippets",
3-
"displayName": "Vue 2 Snippets",
4-
"author": "hollowtree",
5-
"publisher": "hollowtree",
6-
"icon": "img/logo.png",
7-
"description": "A Vue.js 2 Extension",
8-
"license": "MIT",
9-
"version": "0.1.5",
10-
"engines": {
11-
"vscode": "^1.5.0"
12-
},
13-
"keywords": [
14-
"javascript",
15-
"snippet",
16-
"vue",
17-
"vue 2"
18-
],
19-
"categories": [
20-
"Languages",
21-
"Snippets"
22-
],
23-
"repository": {
24-
"type": "git",
25-
"url": "https://github.com/hollowtree/vscode-vue-snippets"
26-
},
27-
"bugs": {
28-
"url": "https://github.com/hollowtree/vscode-vue-snippets/issues",
29-
"email": "[email protected]"
30-
},
31-
"contributes": {
32-
"languages": [
33-
{
34-
"id": "vue",
35-
"aliases": [
36-
"Vue",
37-
"vue"
38-
],
39-
"extensions": [
40-
".vue"
41-
],
42-
"configuration": "./syntaxes/vue.configuration.json"
43-
}
44-
],
45-
"grammars": [
46-
{
47-
"language": "vue",
48-
"scopeName": "text.html.vue",
49-
"path": "./syntaxes/vue.tmLanguage"
50-
}
51-
],
52-
"snippets": [
53-
{
54-
"language": "javascript",
55-
"path": "./snippets/javascript.json"
56-
},
57-
{
58-
"language": "typescript",
59-
"path": "./snippets/javascript.json"
60-
},
61-
{
62-
"language": "html",
63-
"path": "./snippets/javascript.json"
64-
},
65-
{
66-
"language": "html",
67-
"path": "./snippets/html.json"
68-
},
69-
{
70-
"language": "vue-html",
71-
"path": "./snippets/html.json"
72-
},
73-
{
74-
"language": "html",
75-
"path": "./snippets/vue.json"
76-
},
77-
{
78-
"language": "vue",
79-
"path": "./snippets/javascript.json"
80-
},
81-
{
82-
"language": "vue",
83-
"path": "./snippets/html.json"
84-
},
85-
{
86-
"language": "vue",
87-
"path": "./snippets/vue.json"
88-
},
89-
{
90-
"language": "jade",
91-
"path": "./snippets/pug.json"
92-
},
93-
{
94-
"language": "pug",
95-
"path": "./snippets/pug.json"
96-
}
97-
]
98-
}
2+
"name": "vue-snippets",
3+
"displayName": "Vue 2 Snippets",
4+
"author": "hollowtree",
5+
"publisher": "hollowtree",
6+
"icon": "img/logo.png",
7+
"description": "A Vue.js 2 Extension",
8+
"license": "MIT",
9+
"version": "0.1.6",
10+
"engines": {
11+
"vscode": "^1.5.0"
12+
},
13+
"keywords": [
14+
"javascript",
15+
"snippet",
16+
"vue",
17+
"vue 2"
18+
],
19+
"categories": [
20+
"Languages",
21+
"Snippets"
22+
],
23+
"repository": {
24+
"type": "git",
25+
"url": "https://github.com/hollowtree/vscode-vue-snippets"
26+
},
27+
"bugs": {
28+
"url": "https://github.com/hollowtree/vscode-vue-snippets/issues",
29+
"email": "[email protected]"
30+
},
31+
"contributes": {
32+
"languages": [
33+
{
34+
"id": "vue",
35+
"aliases": [
36+
"Vue",
37+
"vue"
38+
],
39+
"extensions": [
40+
".vue"
41+
],
42+
"configuration": "./syntaxes/vue.configuration.json"
43+
}
44+
],
45+
"grammars": [
46+
{
47+
"language": "vue",
48+
"scopeName": "text.html.vue",
49+
"path": "./syntaxes/vue.tmLanguage"
50+
}
51+
],
52+
"snippets": [
53+
{
54+
"language": "javascript",
55+
"path": "./snippets/javascript.json"
56+
},
57+
{
58+
"language": "typescript",
59+
"path": "./snippets/javascript.json"
60+
},
61+
{
62+
"language": "html",
63+
"path": "./snippets/javascript.json"
64+
},
65+
{
66+
"language": "html",
67+
"path": "./snippets/html.json"
68+
},
69+
{
70+
"language": "vue-html",
71+
"path": "./snippets/html.json"
72+
},
73+
{
74+
"language": "html",
75+
"path": "./snippets/vue.json"
76+
},
77+
{
78+
"language": "vue",
79+
"path": "./snippets/javascript.json"
80+
},
81+
{
82+
"language": "vue",
83+
"path": "./snippets/html.json"
84+
},
85+
{
86+
"language": "vue",
87+
"path": "./snippets/vue.json"
88+
},
89+
{
90+
"language": "jade",
91+
"path": "./snippets/pug.json"
92+
},
93+
{
94+
"language": "pug",
95+
"path": "./snippets/pug.json"
96+
}
97+
]
98+
}
9999
}

snippets/html.json

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
],
1414
"description": "Expects: string"
1515
},
16-
"v-if": {
17-
"prefix": "vIf",
16+
"v-show": {
17+
"prefix": "vShow",
1818
"body": [
19-
"v-if=\"${1:condition}\""
19+
"v-show=\"${1:condition}\""
2020
],
2121
"description": "Expects: any"
2222
},
23-
"v-show": {
24-
"prefix": "vShow",
23+
"v-if": {
24+
"prefix": "vIf",
2525
"body": [
26-
"v-show=\"${1:condition}\""
26+
"v-if=\"${1:condition}\""
2727
],
2828
"description": "Expects: any"
2929
},
@@ -41,15 +41,15 @@
4141
],
4242
"description": "Expects: any. previous sibling element must have v-if or v-else-if."
4343
},
44-
"v-for": {
45-
"prefix": "vFor",
44+
"v-for-without-key": {
45+
"prefix": "vForWithoutKey",
4646
"body": [
4747
"v-for=\"${1:item} in ${2:items}\""
4848
],
4949
"description": "Expects: Array | Object | number | string"
5050
},
51-
"v-for-with-key": {
52-
"prefix": "vForWithKey",
51+
"v-for": {
52+
"prefix": "vFor",
5353
"body": [
5454
"v-for=\"${1:item} in ${2:items}\" :key=\"${3:item.id}\""
5555
],
@@ -97,13 +97,12 @@
9797
],
9898
"description": "Does not expect expression"
9999
},
100-
101100
"key": {
102101
"prefix": "key",
103102
"body": [
104103
":key=\"${1:key}\""
105104
],
106-
"description":"Expects: string. The key special attribute is primarily used as a hint for Vue’s virtual DOM algorithm to identify VNodes when diffing the new list of nodes against the old list. Without keys, Vue uses an algorithm that minimizes element movement and tries to patch/reuse elements of the same type in-place as much as possible. With keys, it will reorder elements based on the order change of keys, and elements with keys that are no longer present will always be removed/destroyed. Children of the same common parent must have unique keys. Duplicate keys will cause render errors."
105+
"description": "Expects: string. The key special attribute is primarily used as a hint for Vue’s virtual DOM algorithm to identify VNodes when diffing the new list of nodes against the old list. Without keys, Vue uses an algorithm that minimizes element movement and tries to patch/reuse elements of the same type in-place as much as possible. With keys, it will reorder elements based on the order change of keys, and elements with keys that are no longer present will always be removed/destroyed. Children of the same common parent must have unique keys. Duplicate keys will cause render errors."
107106
},
108107
"ref": {
109108
"prefix": "ref",
@@ -126,12 +125,17 @@
126125
],
127126
"description": "<slot></slot>. Expects: string. Used on content inserted into child components to indicate which named slot the content belongs to."
128127
},
129-
128+
"slotScope": {
129+
"prefix": "slotScope",
130+
"body": [
131+
"slot-scope=\"$1\"$0"
132+
],
133+
"description": "Used to denote an element or component as a scoped slot. The attribute’s value should be a valid JavaScript expression that can appear in the argument position of a function signature. This means in supported environments you can also use ES2015 destructuring in the expression. Serves as a replacement for scope in 2.5.0+."
134+
},
130135
"component": {
131136
"prefix": "component",
132137
"body": [
133138
"<component :is=\"${1:componentId}\"></component>$0"
134-
135139
],
136140
"description": "component element"
137141
},
@@ -309,7 +313,6 @@
309313
],
310314
"description": "@appear-cancelled=''"
311315
},
312-
313316
"routerLink": {
314317
"prefix": "routerLink",
315318
"body": [

0 commit comments

Comments
 (0)