mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
fix(components): [steps] fix type error (#8627)
This commit is contained in:
parent
cc957d9d22
commit
3bacd01ce5
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user