From 251d2411f235e23209d57173857e05b637729ce8 Mon Sep 17 00:00:00 2001
From: LiuHao <liuhaoai545@gmail.com>
Date: 星期日, 02 四月 2023 01:01:56 +0800
Subject: [PATCH] refactor ts

---
 src/layout/components/Sidebar/Link.vue |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/layout/components/Sidebar/Link.vue b/src/layout/components/Sidebar/Link.vue
index 8011431..02f0307 100644
--- a/src/layout/components/Sidebar/Link.vue
+++ b/src/layout/components/Sidebar/Link.vue
@@ -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 isExt = computed(() => {
-  return isExternal(props.to)
+  return isExternal(props.to as string)
 })
 
 const type = computed(() => {
@@ -38,3 +32,9 @@
   }
 }
 </script>
+
+<template>
+	<component :is="type" v-bind="linkProps()">
+		<slot />
+	</component>
+</template>

--
Gitblit v1.9.3