perf: 代码优化 统一将 props 运行时声明修改为类型声明

This commit is contained in:
pany
2023-06-20 18:40:18 +08:00
parent d1c7480a4f
commit 75eadd2094
9 changed files with 63 additions and 75 deletions

View File

@@ -1,13 +1,11 @@
<script lang="ts" setup>
import { type PropType } from "vue"
import { type ListItem } from "./data"
const props = defineProps({
list: {
type: Object as PropType<ListItem[]>,
required: true
}
})
interface Props {
list: ListItem[]
}
const props = defineProps<Props>()
</script>
<template>