refactor: enhance type definition (#3062)

* chore: add vue-tsc for type check

* refactor(components): respect Vue's own style type

* refactor(components): improve props type

* chore(build): improve types

* fix(components): remove unnecessary props

* perf(components): use shallowRef

* fix(components): add missing property type for table

* refactor(components): improve time-picker types

* refactor(components): extract import type

* refactor(components): improve popper types

* refactor(components): upload list types

* fix(docs): fix type

* better type

* fix: remove index
This commit is contained in:
Sanxiaozhizi
2021-08-31 09:40:13 +08:00
committed by GitHub
parent 45c292c874
commit 6cc16bbd06
48 changed files with 700 additions and 150 deletions

View File

@@ -67,6 +67,7 @@
<script lang="ts">
import { computed, defineComponent } from 'vue'
import type { PropType, SVGAttributes } from 'vue'
type ProgressFuncType = (percentage: number) => string;
@@ -77,7 +78,7 @@ interface IProgressProps {
indeterminate: boolean
duration: number
strokeWidth: number
strokeLinecap: string
strokeLinecap: NonNullable<SVGAttributes['stroke-linecap']>
textInside: boolean
width: number
showText: boolean
@@ -117,8 +118,8 @@ export default defineComponent({
default: 6,
},
strokeLinecap: {
type: String,
default: 'round',
type: String as PropType<IProgressProps['strokeLinecap']>,
default: 'round' as IProgressProps['strokeLinecap'],
},
textInside: {
type: Boolean,