
typescript
宝拉不想努力了
宝拉天天想放假.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
typescript 中 [propName: string]的使用
其他没有使用的属性名 可以统一使用[propName: string]: number | string | boolean | Array<string>;定义类型 属性值的类型是把所有的类型都展示 interface DataState { id: number | string; createTime: number; commentUserAvatar: string; commentDeleted: boolean; commentUserNam原创 2022-01-17 17:58:00 · 2902 阅读 · 0 评论 -
vue3 ts proptype
目的: 类型补充 属性校验 使用: import { computed, PropType, onMounted } from 'vue'; interface otherBread { title: string; path: string; } export default { components: {}, props: { otherBreadcrumb: { type: Array as PropType<otherBread[]>原创 2021-12-06 10:31:47 · 861 阅读 · 0 评论