fix(Tab): can't match when name is 0 (#5017)

This commit is contained in:
neverland
2019-11-14 20:10:22 +08:00
committed by GitHub
parent 5d157c409b
commit d068286562
2 changed files with 22 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
import { createNamespace } from '../utils';
import { isDef, createNamespace } from '../utils';
import { ChildrenMixin } from '../mixins/relation';
import { routeProps } from '../utils/router';
@@ -22,7 +22,7 @@ export default createComponent({
computed: {
computedName() {
return this.name || this.index;
return isDef(this.name) ? this.name : this.index;
},
isActive() {