|
| 1 | +{ |
| 2 | + "Nuxt useFetch": { |
| 3 | + "prefix": "nfetch", |
| 4 | + "body": [ |
| 5 | + "const { data: ${1:name} } = await useFetch('${2:path}')" |
| 6 | + ], |
| 7 | + "description": "Nuxt useFetch composable" |
| 8 | + }, |
| 9 | + "Nuxt useLazyFetch": { |
| 10 | + "prefix": "nfetch-lazy", |
| 11 | + "body": [ |
| 12 | + "const { pending, data: ${1:name} } = await useLazyFetch('${2:path}')" |
| 13 | + ], |
| 14 | + "description": "Nuxt useLazyFetch composable" |
| 15 | + }, |
| 16 | + "Nuxt useAsyncData": { |
| 17 | + "prefix": "nasyncdata", |
| 18 | + "body": [ |
| 19 | + "const { data: ${1:name} } = await useAsyncData('${2:requestKey}', () => \\$fetch('${3:path}'))" |
| 20 | + ], |
| 21 | + "description": "Nuxt useAsyncData composable" |
| 22 | + }, |
| 23 | + "Nuxt useLazyAsyncData": { |
| 24 | + "prefix": "nasyncdata-lazy", |
| 25 | + "body": [ |
| 26 | + "const { pending, data: ${1:name} } = await useLazyAsyncData('${2:requestKey}', () => \\$fetch('${3:path}'))" |
| 27 | + ], |
| 28 | + "description": "Nuxt useLazyAsyncData composable" |
| 29 | + }, |
| 30 | + "Nuxt useHead": { |
| 31 | + "prefix": "nhead", |
| 32 | + "body": [ |
| 33 | + "useHead({", |
| 34 | + "\ttitle: ${1:pageTitle},", |
| 35 | + "})" |
| 36 | + ], |
| 37 | + "description": "Nuxt useHead composable" |
| 38 | + }, |
| 39 | + "Nuxt useHead with description": { |
| 40 | + "prefix": "nhead-description", |
| 41 | + "body": [ |
| 42 | + "useHead({", |
| 43 | + "\ttitle: ${1:pageTitle},", |
| 44 | + "\tmeta: [", |
| 45 | + "\t\t{ name: 'description', content: ${2:pageDescription} },", |
| 46 | + "\t],", |
| 47 | + "})" |
| 48 | + ], |
| 49 | + "description": "Nuxt useHead composable with description" |
| 50 | + }, |
| 51 | + "Nuxt useHead - Title template": { |
| 52 | + "prefix": "nhead-template", |
| 53 | + "body": [ |
| 54 | + "useHead({", |
| 55 | + "\ttitleTemplate: (titleChunk) => {", |
| 56 | + "\t\treturn titleChunk ? `\\${titleChunk} - ${1:siteTitle}` : '${1:siteTitle}'", |
| 57 | + "\t}", |
| 58 | + "})" |
| 59 | + ], |
| 60 | + "description": "Nuxt useHead composable with title template" |
| 61 | + }, |
| 62 | + "Nuxt definePageMeta": { |
| 63 | + "prefix": "npagemeta", |
| 64 | + "body": [ |
| 65 | + "definePageMeta({", |
| 66 | + "\ttitle: '${1:pageTitle}',", |
| 67 | + "})" |
| 68 | + ], |
| 69 | + "description": "Nuxt definePageMeta composable" |
| 70 | + }, |
| 71 | + "Nuxt definePageMeta with description": { |
| 72 | + "prefix": "npagemeta-description", |
| 73 | + "body": [ |
| 74 | + "definePageMeta({", |
| 75 | + "\ttitle: '${1:pageTitle}',", |
| 76 | + "\tmeta: [", |
| 77 | + "\t\t{ name: 'description', content: '${2:pageDescription}' },", |
| 78 | + "\t],", |
| 79 | + "})" |
| 80 | + ], |
| 81 | + "description": "Nuxt definePageMeta composable with description" |
| 82 | + }, |
| 83 | +} |
0 commit comments