chore: init nuxtLink

This commit is contained in:
Harlan Wilton 2024-01-25 22:21:38 +08:00
parent 09c638c8b7
commit 5e735005a5

View File

@ -1,4 +1,5 @@
import { defineUntypedSchema } from 'untyped' import { defineUntypedSchema } from 'untyped'
import {defu} from "defu";
export default defineUntypedSchema({ export default defineUntypedSchema({
/** /**
@ -298,6 +299,7 @@ export default defineUntypedSchema({
/** @type {typeof import('#app/components/nuxt-link')['NuxtLinkOptions']} */ /** @type {typeof import('#app/components/nuxt-link')['NuxtLinkOptions']} */
nuxtLink: { nuxtLink: {
$resolve: async (val, get) => { $resolve: async (val, get) => {
val = val || {}
val.componentName = val.componentName || 'NuxtLink' val.componentName = val.componentName || 'NuxtLink'
const { trailingSlash } = await get('app') const { trailingSlash } = await get('app')
if (trailingSlash && !val.trailingSlash) if (trailingSlash && !val.trailingSlash)