Skip to content

Commit 0074d76

Browse files
committed
⛓ put in nuxt routing link and remove method from anim script
1 parent 0b4c7e6 commit 0074d76

File tree

3 files changed

+238
-271
lines changed

3 files changed

+238
-271
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ You can enable tab completion (recommended) by opening `Code > Preferences > Set
5252
| `vclass-obj` | Class binding with objects |
5353
| `vclass-obj-mult` | Multiple conditional class bindings |
5454
| `vanim` | Transition component with JS hooks |
55+
| `vnuxtl` | Nuxt Routing Link |
5556

5657
### Script
5758

snippets/vue-script.json

Lines changed: 147 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -1,177 +1,148 @@
11
{
2-
"Vue Data": {
3-
"prefix": "vdata",
4-
"body": [
5-
"data() {",
6-
"\treturn {",
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\treturn 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\ttype: ${2:number},",
52-
"\t\tdefault: ${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-
"\tcomponents: {",
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\treturn ${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-
"\tmounted() {",
103-
"\t\tconsole.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-
"\tbind(el, binding, vnode) {",
121-
"\t\tel.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-
"\tbeforeEnter(el) {",
146-
"\t\tconsole.log('beforeEnter');",
147-
"\t},",
148-
"\tenter(el, done) {",
149-
"\t\tconsole.log('enter');",
150-
"\t\tdone();",
151-
"\t},",
152-
"\tbeforeLeave(el) {",
153-
"\t\tconsole.log('beforeLeave');",
154-
"\t}," ,
155-
"\tleave(el, done) {",
156-
"\t\tconsole.log('leave');",
157-
"\t\tdone();",
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() {", "\treturn {", "\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\treturn 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\ttype: ${2:number},",
40+
"\t\tdefault: ${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+
"\tcomponents: {",
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\treturn ${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+
"\tmounted() {",
85+
"\t\tconsole.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+
"\tbind(el, binding, vnode) {",
101+
"\t\tel.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+
"\tconsole.log('beforeEnter');",
123+
"},",
124+
"enter(el, done) {",
125+
"\tconsole.log('enter');",
126+
"\tdone();",
127+
"},",
128+
"beforeLeave(el) {",
129+
"\tconsole.log('beforeLeave');",
130+
"},",
131+
"leave(el, done) {",
132+
"\tconsole.log('leave');",
133+
"\tdone();",
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

Comments
 (0)