refactor ts

This commit is contained in:
LiuHao
2023-04-02 01:01:56 +08:00
parent 5c87f1cb2c
commit 251d2411f2
264 changed files with 15432 additions and 13015 deletions

View File

@ -1,10 +1,4 @@
<template>
<component :is="type" v-bind="linkProps()">
<slot />
</component>
</template>
<script setup>
<script setup lang="ts">
import { isExternal } from '@/utils/validate'
const props = defineProps({
@ -15,7 +9,7 @@ const props = defineProps({
})
const isExt = computed(() => {
return isExternal(props.to)
return isExternal(props.to as string)
})
const type = computed(() => {
@ -38,3 +32,9 @@ function linkProps() {
}
}
</script>
<template>
<component :is="type" v-bind="linkProps()">
<slot />
</component>
</template>