fix(button): support RouteLocationRaw type for to (#112)

This commit is contained in:
Anthony Fu
2022-11-08 17:57:55 +08:00
committed by GitHub
parent 3337559b89
commit 1b56b50d4d

View File

@@ -15,7 +15,7 @@
<script setup lang="ts">
import { ref, computed, useSlots } from 'vue'
import type { PropType } from 'vue'
import type { RouteLocationNormalized } from 'vue-router'
import type { RouteLocationNormalized, RouteLocationRaw } from 'vue-router'
import NuxtLink from '#app/components/nuxt-link'
import Icon from '../elements/Icon.vue'
import { classNames } from '../../utils'
@@ -81,7 +81,7 @@ const props = defineProps({
default: false
},
to: {
type: [String, Object] as PropType<string | RouteLocationNormalized>,
type: [String, Object] as PropType<string | RouteLocationNormalized | RouteLocationRaw>,
default: null
},
target: {