refactor(steps): correct requested changes

This commit is contained in:
Ryan 2020-09-06 23:28:12 +08:00 committed by jeremywu
parent 45f2efe88d
commit d28d0c30d8
2 changed files with 9 additions and 5 deletions

View File

@ -6,8 +6,7 @@
<script lang="ts">
import { defineComponent, watch, ref, provide } from 'vue'
const CHANGE_EVENT = 'change'
import { CHANGE_EVENT } from '@element-plus/utils/constants'
export default defineComponent({
name: 'ElSteps',

View File

@ -56,9 +56,14 @@ interface IStepsProps {
processStatus: string
}
interface IStepsSetupState {
currentStatus: string
setIndex: (val: number) => void
calcProgress: (status: string) => void
}
interface IStepInstance extends ComponentInternalInstance {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
setupState: any
setupState: IStepsSetupState
}
interface IStepsInject {
@ -84,7 +89,7 @@ export default defineComponent({
status: {
type: String,
default: '',
validator: (val: string): boolean => ['', 'wait', 'process', 'finish', 'error', 'success'].indexOf(val) > -1,
validator: (val: string): boolean => ['', 'wait', 'process', 'finish', 'error', 'success'].includes(val) > -1,
},
},
setup(props) {