From fe88a7c072659bf567caafc6db83d5e888da8bd3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 6 Sep 2020 15:19:37 +0800 Subject: [PATCH] fix(steps): fix error in deploy --- packages/steps/src/index.vue | 2 +- packages/steps/src/item.vue | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/steps/src/index.vue b/packages/steps/src/index.vue index c5c54d1b7f..b10886c00e 100644 --- a/packages/steps/src/index.vue +++ b/packages/steps/src/index.vue @@ -47,7 +47,7 @@ export default defineComponent({ watch(steps, () => { steps.value.forEach((instance, index) => { - instance.ctx.setIndex(index) + instance.setupState.setIndex(index) }) }) diff --git a/packages/steps/src/item.vue b/packages/steps/src/item.vue index e73f9654e9..d19206644a 100644 --- a/packages/steps/src/item.vue +++ b/packages/steps/src/item.vue @@ -58,7 +58,7 @@ interface IStepsProps { interface IStepInstance extends ComponentInternalInstance { // eslint-disable-next-line @typescript-eslint/no-explicit-any - ctx: any + setupState: any } interface IStepsInject { @@ -111,7 +111,7 @@ export default defineComponent({ }) const prevStatus = computed(() => { const prevStep = parent.steps[index.value - 1] - return prevStep ? prevStep.ctx.currentStatus : 'wait' + return prevStep ? prevStep.setupState.currentStatus : 'wait' }) const isCenter = computed(() => { return parent.props.alignCenter @@ -173,7 +173,7 @@ export default defineComponent({ internalStatus.value = 'wait' } const prevChild = parent.steps.value[stepsCount.value - 1] - if (prevChild) prevChild.ctx.calcProgress(internalStatus.value) + if (prevChild) prevChild.setupState.calcProgress(internalStatus.value) } return {