@@ -34,68 +34,18 @@ Type part of a snippet, press `enter`, and the snippet unfolds.
34
34
35
35
## Snippets
36
36
37
- ### Support File ` .vue `
37
+ ### Nuxt
38
38
39
- - Nuxt
39
+ #### Components
40
40
41
41
| Prefix | Purpose |
42
42
| ------------- | --------------------------- |
43
- | ` npage ` | ` <NuxtPage /> ` |
44
- | ` nlayout ` | ` <NuxtLayout></NuxtLayout> ` |
43
+ | ` npage ` | ` <NuxtPage> ` |
44
+ | ` nlayout ` | ` <NuxtLayout> ` |
45
45
| ` nlink ` | Nuxt router link |
46
46
| ` nlink-param ` | Nuxt router link with param |
47
47
48
- - Vue
49
-
50
- | Prefix | Purpose |
51
- | --------------- | -------------------------------------------------------------------- |
52
- | ` vbase ` | Base for Vue 3 File with ` <script setup> ` No style |
53
- | ` vbase-scss ` | Base for Vue 3 File with ` <script setup> ` Style ` SCSS ` |
54
- | ` vbase-sass ` | Base for Vue 3 File with ` <script setup> ` Style ` SASS ` |
55
- | ` vbase-less ` | Base for Vue 3 File with ` <script setup> ` Style ` LESS ` |
56
- | ` vbase-pcss ` | Base for Vue 3 File with ` <script setup> ` Style ` PostCSS ` |
57
- | ` vbase-css ` | Base for Vue 3 File with ` <script setup> ` Style ` CSS ` |
58
- | ` vbase-ts ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , No Style |
59
- | ` vbase-ts-scss ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` SCSS ` |
60
- | ` vbase-ts-sass ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` SASS ` |
61
- | ` vbase-ts-less ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` LESS ` |
62
- | ` vbase-ts-pcss ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` PostCSS ` |
63
- | ` vbase-ts-css ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` CSS ` |
64
-
65
- | Prefix | Purpose |
66
- | ------------- | ----------------------------- |
67
- | ` vscript ` | ` <script setup> ` |
68
- | ` vscript-ts ` | ` <script setup lang='ts'> ` |
69
- | ` vtemplate ` | ` <template></template> ` |
70
- | ` vfor ` | ` v-for ` statement |
71
- | ` vslot-named ` | ` <template #name></template> ` |
72
-
73
- ### Support File ` .js, .ts `
74
-
75
- - Vue Router
76
-
77
- | Prefix | Purpose |
78
- | -------------------- | ----------------------------------------------- |
79
- | ` vrouter ` | Vue Router base |
80
- | ` vscrollbehavior ` | Vue Router ` scrollBehavior ` |
81
- | ` vbeforeeach ` | Vue Router global guards ` beforeEach ` |
82
- | ` vbeforeresolve ` | Vue Router global guards ` beforeResolve ` |
83
- | ` vaftereach ` | Vue Router global guards ` afterEach ` |
84
- | ` vbeforeenter ` | Vue Router per-route guard ` beforeEnter ` |
85
- | ` vbeforerouteenter ` | Vue Router component guards ` beforeRouteEnter ` |
86
- | ` vbeforerouteupdate ` | Vue Router component guards ` beforeRouteUpdate ` |
87
- | ` vbeforerouteleave ` | Vue Router component guards ` beforeRouteLeave ` |
88
-
89
- - Pinia
90
-
91
- | Prefix | Purpose |
92
- | --------- | ------------------------------------------------------------ |
93
- | ` pbase ` | Base code needed for a Pinia store file |
94
- | ` pbase-c ` | Base code needed for a Pinia store file with Composition API |
95
-
96
- ### Support File ` .vue, .js, .ts `
97
-
98
- - Nuxt
48
+ #### Composables & Utilities
99
49
100
50
| Prefix | Purpose |
101
51
| ----------------------- | -------------------------------------------------- |
@@ -130,7 +80,41 @@ Type part of a snippet, press `enter`, and the snippet unfolds.
130
80
| ` nroute ` | ` useRoute ` composable |
131
81
| ` nrouter ` | ` useRouter ` composable |
132
82
133
- - Vue
83
+ ### Vue
84
+
85
+ #### Templates
86
+
87
+ | Prefix | Purpose |
88
+ | --------------- | -------------------------------------------------------------------- |
89
+ | ` vbase ` | Base for Vue 3 File with ` <script setup> ` No style |
90
+ | ` vbase-scss ` | Base for Vue 3 File with ` <script setup> ` Style ` SCSS ` |
91
+ | ` vbase-sass ` | Base for Vue 3 File with ` <script setup> ` Style ` SASS ` |
92
+ | ` vbase-less ` | Base for Vue 3 File with ` <script setup> ` Style ` LESS ` |
93
+ | ` vbase-pcss ` | Base for Vue 3 File with ` <script setup> ` Style ` PostCSS ` |
94
+ | ` vbase-css ` | Base for Vue 3 File with ` <script setup> ` Style ` CSS ` |
95
+ | ` vbase-ts ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , No Style |
96
+ | ` vbase-ts-scss ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` SCSS ` |
97
+ | ` vbase-ts-sass ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` SASS ` |
98
+ | ` vbase-ts-less ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` LESS ` |
99
+ | ` vbase-ts-pcss ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` PostCSS ` |
100
+ | ` vbase-ts-css ` | Base for Vue 3 File with ` <script setup lang='ts'> ` , Style ` CSS ` |
101
+ | ` vscript ` | ` <script setup> ` |
102
+ | ` vscript-ts ` | ` <script setup lang='ts'> ` |
103
+ | ` vtemplate ` | ` <template></template> ` |
104
+ | ` vfor ` | ` v-for ` statement |
105
+ | ` vslot-named ` | ` <template #name></template> ` |
106
+
107
+ #### Components
108
+
109
+ | Prefix | Purpose |
110
+ | ------------- | ------------------- |
111
+ | ` vtrans ` | ` <Transition> ` |
112
+ | ` vtransgroup ` | ` <TransitionGroup> ` |
113
+ | ` vkeepalive ` | ` <KeepAlive> ` |
114
+ | ` vtp ` | ` <Teleport> ` |
115
+ | ` vsuspense ` | ` <Suspense> ` |
116
+
117
+ #### Scripts
134
118
135
119
| Prefix | Purpose |
136
120
| ------------------ | --------------------------- |
@@ -154,6 +138,25 @@ Type part of a snippet, press `enter`, and the snippet unfolds.
154
138
| ` vdefineoptions ` | Define Options |
155
139
| ` vdefinemodel ` | Define Model |
156
140
141
+ #### Router
142
+
143
+ | ` vrouter ` | Vue Router base |
144
+ | ` vscrollbehavior ` | Vue Router ` scrollBehavior ` |
145
+ | ` vbeforeeach ` | Vue Router global guards ` beforeEach ` |
146
+ | ` vbeforeresolve ` | Vue Router global guards ` beforeResolve ` |
147
+ | ` vaftereach ` | Vue Router global guards ` afterEach ` |
148
+ | ` vbeforeenter ` | Vue Router per-route guard ` beforeEnter ` |
149
+ | ` vbeforerouteenter ` | Vue Router component guards ` beforeRouteEnter ` |
150
+ | ` vbeforerouteupdate ` | Vue Router component guards ` beforeRouteUpdate ` |
151
+ | ` vbeforerouteleave ` | Vue Router component guards ` beforeRouteLeave ` |
152
+
153
+ ### Pinia
154
+
155
+ | Prefix | Purpose |
156
+ | --------- | ------------------------------------------------------------ |
157
+ | ` pbase ` | Base code needed for a Pinia store file |
158
+ | ` pbase-c ` | Base code needed for a Pinia store file with Composition API |
159
+
157
160
## Contributing
158
161
159
162
This is an open source project open to anyone. Contributions are welcome [ github] ( https://github.com/zhaolinlau/nuxt-vscode-snippets )
0 commit comments