File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 25
25
<script>
26
26
export default {
27
27
name: "$1",
28
- data: function data() {
29
- return {
28
+ data: () => ({
30
29
31
- }
32
- }
30
+ })
33
31
}
34
32
</script>
35
- <style${2: lang="${3:scss}"}>
33
+ <style${2: lang="${3:scss}"} ${4:scoped} >
36
34
</style>
37
35
"""
38
36
" description" : " Single file component template"
88
86
' beforeCreate Vuejs hook' :
89
87
' prefix' : ' beforeCreate'
90
88
' body' : """
91
- beforeCreate: function beforeCreate () {
89
+ beforeCreate() {
92
90
//do something before creating vue instance
93
91
$1
94
92
}
98
96
' created Vuejs hook' :
99
97
' prefix' : ' created'
100
98
' body' : """
101
- created: function created () {
99
+ created() {
102
100
//do something after creating vue instance
103
101
$1
104
102
}
108
106
' beforeMount Vuejs hook' :
109
107
' prefix' : ' beforeMount'
110
108
' body' : """
111
- beforeMount: function beforeMount () {
109
+ beforeMount() {
112
110
//do something before mounting vue instance
113
111
$1
114
112
}
118
116
' mounted Vuejs hook' :
119
117
' prefix' : ' mounted'
120
118
' body' : """
121
- mounted: function mounted () {
119
+ mounted() {
122
120
//do something after mounting vue instance
123
121
$1
124
122
}
128
126
' beforeUpdate Vuejs hook' :
129
127
' prefix' : ' beforeUpdate'
130
128
' body' : """
131
- beforeUpdate: function beforeUpdate () {
129
+ beforeUpdate() {
132
130
//do something before updating vue instance
133
131
$1
134
132
}
138
136
' updated Vuejs hook' :
139
137
' prefix' : ' updated'
140
138
' body' : """
141
- updated: function updated () {
139
+ updated() {
142
140
//do something after updating vue instance
143
141
$1
144
142
}
148
146
' beforeDestroy Vuejs hook' :
149
147
' prefix' : ' beforeDestroy'
150
148
' body' : """
151
- beforeDestroy: function beforeDestroy () {
149
+ beforeDestroy() {
152
150
//do something before destroying vue instance
153
151
$1
154
152
}
158
156
' destroyed Vuejs hook' :
159
157
' prefix' : ' destroyed'
160
158
' body' : """
161
- destroyed: function destroyed () {
159
+ destroyed() {
162
160
//do something after destroying vue instance
163
161
$1
164
162
}
181
179
' prefix' : ' methods'
182
180
' body' : """
183
181
methods: {
184
- ${1:methodName}: function ${1:methodName} () {
182
+ ${1:methodName}() {
185
183
$2
186
184
}
187
185
}
You can’t perform that action at this time.
0 commit comments