chore: init `nuxtLink`

This commit is contained in:
Harlan Wilton 2024-01-25 22:21:38 +08:00
parent 09c638c8b7
commit 5e735005a5
1 changed files with 2 additions and 0 deletions

View File

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