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:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user