mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user