Skip to content

feat(vue): Add Suspense vue-html snippet #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,23 @@ These snippets were made to speed up Vue 3 development. With it you can write bo

### Template

| Snippet | Purpose |
| -------------- | --------------------------------- |
| `vfor` | `v-for` statement |
| `vmodel` | `v-model` directive |
| `von` | `v-on` click handler |
| `vel-props` | Component element with `props` |
| `vslot-named` | Named slot |
| `vimg` | Image source binding |
| `vstyle` | Inline style binding |
| `vstyle-obj` | Inline style binding with objects |
| `vclass` | Class binding |
| `vclass-ter` | Ternary class binding |
| `vtrans` | Transition component |
| `vtrans-group` | Transition group component |
| `vrlink` | Router link |
| `vrlink-param` | Router link with param |
| Snippet | Purpose |
| -------------- | -------------------------------------- |
| `vfor` | `v-for` statement |
| `vmodel` | `v-model` directive |
| `von` | `v-on` click handler |
| `vel-props` | Component element with `props` |
| `vslot-named` | Named slot |
| `vimg` | Image source binding |
| `vstyle` | Inline style binding |
| `vstyle-obj` | Inline style binding with objects |
| `vclass` | Class binding |
| `vclass-ter` | Ternary class binding |
| `vtrans` | Transition component |
| `vtrans-group` | Transition group component |
| `vrlink` | Router link |
| `vrlink-param` | Router link with param |
| `vsuspense` | Suspense wrapper with fallback content |

### Script

Expand Down
11 changes: 11 additions & 0 deletions snippets/vue/vue-template.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,15 @@
],
"description": "vue router link with param"
},
"Vue Suspense Wrapper": {
"prefix": "vsuspense",
"body": [
"<Suspense>",
" <template #fallback>",
" ${1:Loading...}",
" </template>",
"</Suspense>"
],
"description": "Vue 3 Suspense component with fallback template"
}
}