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