1
1
{
2
- "Vue Data" : {
3
- "prefix" : " vdata" ,
4
- "body" : [
5
- " data() {" ,
6
- " \t return {" ,
7
- " \t\t ${1:key}: ${2:value}" ,
8
- " \t }" ,
9
- " },"
10
- ],
11
- "description" : " Vue Component Data"
12
- },
13
- "Vue Methods" : {
14
- "prefix" : " vmethod" ,
15
- "body" : [
16
- " methods: {" ,
17
- " \t ${1:name}() {" ,
18
- " \t\t ${0}" ,
19
- " \t }" ,
20
- " },"
21
- ],
22
- "description" : " vue method"
23
- },
24
- "Vue Computed" : {
25
- "prefix" : " vcomputed" ,
26
- "body" : [
27
- " computed: {" ,
28
- " \t ${1:name}() {" ,
29
- " \t\t return this.${2:data} ${0}" ,
30
- " \t }" ,
31
- " },"
32
- ],
33
- "description" : " computed value"
34
- },
35
- "Vue Watchers" : {
36
- "prefix" : " vwatcher" ,
37
- "body" : [
38
- " watch: {" ,
39
- " \t ${1:data}(${2:newValue}, ${3:oldValue}) {" ,
40
- " \t\t ${0}" ,
41
- " \t }" ,
42
- " },"
43
- ],
44
- "description" : " vue watcher"
45
- },
46
- "Vue Props with Default" : {
47
- "prefix" : " vprops" ,
48
- "body" : [
49
- " props: {" ,
50
- " \t ${1:propName}: {" ,
51
- " \t\t type: ${2:number}," ,
52
- " \t\t default: ${0}" ,
53
- " \t }," ,
54
- " },"
55
- ],
56
- "description" : " Vue Props with Default"
57
- },
58
- "Vue Import File" : {
59
- "prefix" : " vimport" ,
60
- "body" : [
61
- " import ${1:New} from './components/${1:New}.vue';"
62
- ],
63
- "description" : " Import one component into another"
64
- },
65
- "Vue Import into the Component" : {
66
- "prefix" : " vimport-c" ,
67
- "body" : [
68
- " components: {" ,
69
- " \t ${1:New}," ,
70
- " }"
71
- ],
72
- "description" : " Import one component into another, within export statement"
73
- },
74
- "Vue Import Export" : {
75
- "prefix" : " vimport-export" ,
76
- "body" : [
77
- " import ${1:Name} from '~components/${1:Name}.vue'" ,
78
- " " ,
79
- " export default {" ,
80
- " \t components: {" ,
81
- " \t\t ${1:Name}" ,
82
- " \t }," ,
83
- " }"
84
- ],
85
- "description" : " import a component and include it in export default"
86
- },
87
- "Vue Filter" : {
88
- "prefix" : " vfilter" ,
89
- "body" : [
90
- " filters: {" ,
91
- " \t ${1:fnName}: function(${2:value}) {" ,
92
- " \t\t return ${2:value}${0};" ,
93
- " \t }" ,
94
- " }"
95
- ],
96
- "description" : " vue filter"
97
- },
98
- "Vue Mixin" : {
99
- "prefix" : " vmixin" ,
100
- "body" : [
101
- " const ${1:mixinName} = {" ,
102
- " \t mounted() {" ,
103
- " \t\t console.log('hello from mixin!')" ,
104
- " \t }," ,
105
- " }"
106
- ],
107
- "description" : " vue mixin"
108
- },
109
- "Vue Use Mixin" : {
110
- "prefix" : " vmixin-use" ,
111
- "body" : [
112
- " mixins: [${1:mixinName}]"
113
- ],
114
- "description" : " vue use mixin"
115
- },
116
- "Vue Custom Directive" : {
117
- "prefix" : " vc-direct" ,
118
- "body" : [
119
- " Vue.directive('${1:directiveName}', {" ,
120
- " \t bind(el, binding, vnode) {" ,
121
- " \t\t el.style.${2:arg} = binding.value.${2:arg};" ,
122
- " \t }" ,
123
- " });"
124
- ],
125
- "description" : " vue custom directive"
126
- },
127
- "Vue Import Library" : {
128
- "prefix" : " vimport-lib" ,
129
- "body" : [
130
- " import { ${1:libName} } from '${1:libName}'"
131
- ],
132
- "description" : " import a library"
133
- },
134
- "Vue Import GSAP" : {
135
- "prefix" : " vimport-gsap" ,
136
- "body" : [
137
- " import { TimelineMax, ${1:Ease} } from 'gsap'"
138
- ],
139
- "description" : " component methods options that dispatch an action from vuex store."
140
- },
141
- "Vue Transition Methods with JavaScript Hooks" : {
142
- "prefix" : " vanimhook-js" ,
143
- "body" : [
144
- " methods: {" ,
145
- " \t beforeEnter(el) {" ,
146
- " \t\t console.log('beforeEnter');" ,
147
- " \t }," ,
148
- " \t enter(el, done) {" ,
149
- " \t\t console.log('enter');" ,
150
- " \t\t done();" ,
151
- " \t }," ,
152
- " \t beforeLeave(el) {" ,
153
- " \t\t console.log('beforeLeave');" ,
154
- " \t }," ,
155
- " \t leave(el, done) {" ,
156
- " \t\t console.log('leave');" ,
157
- " \t\t done();" ,
158
- " \t }," ,
159
- " },"
160
- ],
161
- "description" : " transition component js hooks"
162
- },
163
- "Incrementer" : {
164
- "prefix" : " vinc" ,
165
- "body" : [
166
- " return ${1:this.num} += ${2:1}"
167
- ],
168
- "description" : " increment"
169
- },
170
- "Decrementer" : {
171
- "prefix" : " vdec" ,
172
- "body" : [
173
- " return ${1:this.num} -= ${2:1}"
174
- ],
175
- "description" : " decrement"
176
- }
177
- }
2
+ "Vue Data" : {
3
+ "prefix" : " vdata" ,
4
+ "body" : [" data() {" , " \t return {" , " \t\t ${1:key}: ${2:value}" , " \t }" , " }," ],
5
+ "description" : " Vue Component Data"
6
+ },
7
+ "Vue Methods" : {
8
+ "prefix" : " vmethod" ,
9
+ "body" : [" methods: {" , " \t ${1:name}() {" , " \t\t ${0}" , " \t }" , " }," ],
10
+ "description" : " vue method"
11
+ },
12
+ "Vue Computed" : {
13
+ "prefix" : " vcomputed" ,
14
+ "body" : [
15
+ " computed: {" ,
16
+ " \t ${1:name}() {" ,
17
+ " \t\t return this.${2:data} ${0}" ,
18
+ " \t }" ,
19
+ " },"
20
+ ],
21
+ "description" : " computed value"
22
+ },
23
+ "Vue Watchers" : {
24
+ "prefix" : " vwatcher" ,
25
+ "body" : [
26
+ " watch: {" ,
27
+ " \t ${1:data}(${2:newValue}, ${3:oldValue}) {" ,
28
+ " \t\t ${0}" ,
29
+ " \t }" ,
30
+ " },"
31
+ ],
32
+ "description" : " vue watcher"
33
+ },
34
+ "Vue Props with Default" : {
35
+ "prefix" : " vprops" ,
36
+ "body" : [
37
+ " props: {" ,
38
+ " \t ${1:propName}: {" ,
39
+ " \t\t type: ${2:number}," ,
40
+ " \t\t default: ${0}" ,
41
+ " \t }," ,
42
+ " },"
43
+ ],
44
+ "description" : " Vue Props with Default"
45
+ },
46
+ "Vue Import File" : {
47
+ "prefix" : " vimport" ,
48
+ "body" : [" import ${1:New} from './components/${1:New}.vue';" ],
49
+ "description" : " Import one component into another"
50
+ },
51
+ "Vue Import into the Component" : {
52
+ "prefix" : " vimport-c" ,
53
+ "body" : [" components: {" , " \t ${1:New}," , " }" ],
54
+ "description" : " Import one component into another, within export statement"
55
+ },
56
+ "Vue Import Export" : {
57
+ "prefix" : " vimport-export" ,
58
+ "body" : [
59
+ " import ${1:Name} from '~components/${1:Name}.vue'" ,
60
+ " " ,
61
+ " export default {" ,
62
+ " \t components: {" ,
63
+ " \t\t ${1:Name}" ,
64
+ " \t }," ,
65
+ " }"
66
+ ],
67
+ "description" : " import a component and include it in export default"
68
+ },
69
+ "Vue Filter" : {
70
+ "prefix" : " vfilter" ,
71
+ "body" : [
72
+ " filters: {" ,
73
+ " \t ${1:fnName}: function(${2:value}) {" ,
74
+ " \t\t return ${2:value}${0};" ,
75
+ " \t }" ,
76
+ " }"
77
+ ],
78
+ "description" : " vue filter"
79
+ },
80
+ "Vue Mixin" : {
81
+ "prefix" : " vmixin" ,
82
+ "body" : [
83
+ " const ${1:mixinName} = {" ,
84
+ " \t mounted() {" ,
85
+ " \t\t console.log('hello from mixin!')" ,
86
+ " \t }," ,
87
+ " }"
88
+ ],
89
+ "description" : " vue mixin"
90
+ },
91
+ "Vue Use Mixin" : {
92
+ "prefix" : " vmixin-use" ,
93
+ "body" : [" mixins: [${1:mixinName}]" ],
94
+ "description" : " vue use mixin"
95
+ },
96
+ "Vue Custom Directive" : {
97
+ "prefix" : " vc-direct" ,
98
+ "body" : [
99
+ " Vue.directive('${1:directiveName}', {" ,
100
+ " \t bind(el, binding, vnode) {" ,
101
+ " \t\t el.style.${2:arg} = binding.value.${2:arg};" ,
102
+ " \t }" ,
103
+ " });"
104
+ ],
105
+ "description" : " vue custom directive"
106
+ },
107
+ "Vue Import Library" : {
108
+ "prefix" : " vimport-lib" ,
109
+ "body" : [" import { ${1:libName} } from '${1:libName}'" ],
110
+ "description" : " import a library"
111
+ },
112
+ "Vue Import GSAP" : {
113
+ "prefix" : " vimport-gsap" ,
114
+ "body" : [" import { TimelineMax, ${1:Ease} } from 'gsap'" ],
115
+ "description" :
116
+ " component methods options that dispatch an action from vuex store."
117
+ },
118
+ "Vue Transition Methods with JavaScript Hooks" : {
119
+ "prefix" : " vanimhook-js" ,
120
+ "body" : [
121
+ " beforeEnter(el) {" ,
122
+ " \t console.log('beforeEnter');" ,
123
+ " }," ,
124
+ " enter(el, done) {" ,
125
+ " \t console.log('enter');" ,
126
+ " \t done();" ,
127
+ " }," ,
128
+ " beforeLeave(el) {" ,
129
+ " \t console.log('beforeLeave');" ,
130
+ " }," ,
131
+ " leave(el, done) {" ,
132
+ " \t console.log('leave');" ,
133
+ " \t done();" ,
134
+ " },"
135
+ ],
136
+ "description" : " transition component js hooks"
137
+ },
138
+ "Incrementer" : {
139
+ "prefix" : " vinc" ,
140
+ "body" : [" return ${1:this.num} += ${2:1}" ],
141
+ "description" : " increment"
142
+ },
143
+ "Decrementer" : {
144
+ "prefix" : " vdec" ,
145
+ "body" : [" return ${1:this.num} -= ${2:1}" ],
146
+ "description" : " decrement"
147
+ }
148
+ }
0 commit comments