本文小编为大家详细介绍“html文件的扩展名和类型是什么”,内容详细,步骤清晰,细节处理妥当,希望这篇“html文件的扩展名和类型是什么”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习
顺晟科技
2022-09-25 07:33:56
109
import { TCartType } from '@src/types/basic'
const props = defineProps({
data: {
type: Object,
default: () => {},
},
})
这个data的类型怎么能用引入的TCartType呢?
import { TCartType } from '@src/types/basic'
import { PropType } from 'vue'
const props = defineProps({
data: {
type: Object as PropType<TCartType>,
default: () => {},
},
})
interface Props {
data?: TCartType
}
const props = withDefaults(defineProps<Props>(), {
data: {
tip: '默认值'
}
})
19
2022-10
16
2022-10
16
2022-10
25
2022-09
25
2022-09
25
2022-09