This commit is contained in:
梁灏 2019-03-15 15:44:27 +08:00
parent c9985ada18
commit 5b143a2b3f
3 changed files with 22 additions and 39 deletions

View file

@ -30,6 +30,11 @@
tab: {
type: String
},
// TabPane 使 v-if index
// 0
index: {
type: Number
}
},
data () {
return {

View file

@ -187,6 +187,14 @@
}
});
// TabPane 使 v-if index
TabPanes.sort((a, b) => {
if (a.index && b.index) {
return a.index > b.index ? 1 : -1;
} else {
return 1;
}
});
return TabPanes;
},
updateNav () {