Tabs: add activeName and oldActiveName parameters to before-leave hook (#11713)

* Tabs: add activeName and oldActiveName parameters to before-leave hook

* Tabs: fix docs
This commit is contained in:
Jikkai Xiao
2018-06-25 15:59:49 +08:00
committed by 杨奕
parent 8397e12d1a
commit ef98b75aff
5 changed files with 5 additions and 5 deletions

View File

@@ -74,7 +74,7 @@
this.$emit('input', value);
};
if (this.currentName !== value && this.beforeLeave) {
const before = this.beforeLeave();
const before = this.beforeLeave(value, this.currentName);
if (before && before.then) {
before.then(() => {
changeCurrentName();