diff --git a/README.md b/README.md index 94d8b77..ff2e2f0 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,10 @@ These snippets were made to speed up Vue 3 development. With it you can write bo | `vdefineprops` | Define props | | `vdefineemits` | Define emits | | `vsingleemit` | Single emit for defineEmits | +| `vdefineslots` | Define slots | +| `vsingleslot` | Single slot for defineSlots | +| `vdefineoptions` | Define Options | +| `vdefinemodel` | Define Model | ### CSS @@ -171,12 +175,22 @@ These snippets were made to speed up Vue 3 development. With it you can write bo | `vitest-todo` | Vitest Test - Todo | | `visnapshot` | Vitest Match Snapshot | | `visnapshot-inline` | Vitest Match Snapshot - Inline | -| `vimount` | Vue Test Utils `mount` | -| `vicomponent` | Vue Test Utils Component | -| `vimount-suspended` | nuxt-vitest `mountSuspended` | -| `vimocknuxtimport` | nuxt-vitest `mockNuxtImport` | -| `vimockcomponent` | nuxt-vitest `mockComponent` | -| `viregisterendpoint` | nuxt-vitest `registerEndpoint` | + +### Vitest Vue + +| Snippet | Purpose | +| ------------- | ------------------------ | +| `vimount` | Vue Test Utils `mount` | +| `vicomponent` | Vue Test Utils Component | + +### Vitest Nuxt + +| Snippet | Purpose | +| -------------------- | ------------------------------ | +| `vimount-suspended` | nuxt-vitest `mountSuspended` | +| `vimocknuxtimport` | nuxt-vitest `mockNuxtImport` | +| `vimockcomponent` | nuxt-vitest `mockComponent` | +| `viregisterendpoint` | nuxt-vitest `registerEndpoint` | ## Contributing diff --git a/snippets/vue/vue-script.code-snippets b/snippets/vue/vue-script.code-snippets index f9ef317..f9e6325 100644 --- a/snippets/vue/vue-script.code-snippets +++ b/snippets/vue/vue-script.code-snippets @@ -123,4 +123,36 @@ ], "description": "Vue single emit for defineEmits" }, -} \ No newline at end of file + "Vue Define Slots": { + "prefix": "vdefineslots", + "body": [ + "defineSlots<{", + "\tdefault: (props: { ${0} }) => any", + "}>()" + ], + "description": "Vue defineSlots" + }, + "Vue Single Slot": { + "prefix": "vsingleslot", + "body": [ + "\t${1:slotName}: (props: { ${0} }) => any", + ], + "description": "Vue single slot for defineSlots" + }, + "Vue Define Options": { + "prefix": "vdefineoptions", + "body": [ + "defineOptions({", + "\t${0}", + "})" + ], + "description": "Vue defineOptions" + }, + "Vue Define Model": { + "prefix": "vdefinemodel", + "body": [ + "const modelValue = defineModel()", + ], + "description": "Vue defineModel" + }, +}