Skip to content

Commit

Permalink
fix: steps getCurrentInstance proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
szg2008 committed Apr 24, 2021
1 parent 8258d77 commit 9c3e08b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/packages/step/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ export default create({
},
setup(props, { emit, slots }) {
const instance = getCurrentInstance() as ComponentInternalInstance;
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const parent: any = inject('parent');
parent['relation'](instance);
parent['relation'](proxy);
const state = reactive({
dot: parent.props.progressDot
});
const index = computed(() => parent.state.children.indexOf(instance) + 1);
const index = computed(() => parent.state.children.indexOf(proxy) + 1);
const getCurrentStatus = () => {
const activeIndex = index.value;
Expand Down

0 comments on commit 9c3e08b

Please sign in to comment.