From 198e7fd0c073542898ba7f7d58171b16cd69bbc8 Mon Sep 17 00:00:00 2001 From: wuyangfan <1102042793@qq.com> Date: Thu, 24 Feb 2022 18:03:21 +0800 Subject: [PATCH] fix(ui/step): watch the cols children directly --- packages/varlet-vue2-ui/src/step/Step.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/varlet-vue2-ui/src/step/Step.vue b/packages/varlet-vue2-ui/src/step/Step.vue index 1a89916..bf15eb4 100644 --- a/packages/varlet-vue2-ui/src/step/Step.vue +++ b/packages/varlet-vue2-ui/src/step/Step.vue @@ -60,9 +60,6 @@ export default defineComponent({ isActive({ index, active }) { return index !== -1 && active > index }, - length() { - return this.steps.step.length - }, activeColor() { return this.steps.activeColor }, @@ -74,7 +71,7 @@ export default defineComponent({ }, }, watch: { - length() { + 'steps.step': function () { const { newLength, index } = this this.isLastChild = newLength - 1 === index const main = this.$refs.main