perf: 代码优化 统一将 props 运行时声明修改为类型声明
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user