fix(components): [steps] fix type error (#8627)

This commit is contained in:
류한경 2022-07-05 09:22:36 +09:00 committed by GitHub
parent cc957d9d22
commit 3bacd01ce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,6 @@
</template>
<script lang="ts" setup>
// @ts-nocheck
import {
computed,
getCurrentInstance,
@ -62,7 +61,7 @@ import { ElIcon } from '@element-plus/components/icon'
import { Check, Close } from '@element-plus/icons-vue'
import { stepProps } from './item'
import type { Ref } from 'vue'
import type { CSSProperties, Ref } from 'vue'
export interface IStepsProps {
space: number | string
@ -152,7 +151,7 @@ const space = computed(() => {
})
const style = computed(() => {
const style: Record<string, unknown> = {
const style: CSSProperties = {
flexBasis:
typeof space.value === 'number'
? `${space.value}px`
@ -173,7 +172,7 @@ const setIndex = (val: number) => {
const calcProgress = (status: string) => {
let step = 100
const style: Record<string, unknown> = {}
const style: CSSProperties = {}
style.transitionDelay = `${150 * index.value}ms`
if (status === parent.props.processStatus) {
step = 0