2
0
mirror of https://github.com/tenrok/vue-form-wizard.git synced 2026-06-23 12:00:32 +03:00

#27 Emit on-complete on nextTab method upon last step

This commit is contained in:
cristijora
2017-08-28 19:45:39 +03:00
parent ce4aaba6c1
commit 3c75843c7b
+2 -8
View File
@@ -51,7 +51,7 @@
<template> <template>
<span @click="finish" class="wizard-footer-right" v-if="isLastStep"> <span @click="finish" class="wizard-footer-right" v-if="isLastStep">
<slot name="finish"> <slot name="nextTab">
<wizard-button :style="fillButtonStyle"> <wizard-button :style="fillButtonStyle">
{{finishButtonText}} {{finishButtonText}}
</wizard-button> </wizard-button>
@@ -242,7 +242,7 @@
this.changeTab(this.activeTabIndex, this.activeTabIndex + 1) this.changeTab(this.activeTabIndex, this.activeTabIndex + 1)
} else { } else {
this.isLastStep = true this.isLastStep = true
this.$emit('finished') this.$emit('on-complete')
} }
} }
this.beforeTabChange(this.activeTabIndex, cb) this.beforeTabChange(this.activeTabIndex, cb)
@@ -262,12 +262,6 @@
cb() cb()
} }
}, },
finish () {
let cb = () => {
this.$emit('on-complete')
}
this.beforeTabChange(this.activeTabIndex, cb)
},
setLoading (value) { setLoading (value) {
this.loading = value this.loading = value
this.$emit('on-loading', value) this.$emit('on-loading', value)