feat(Tabs): add resize method (#5071)

This commit is contained in:
neverland
2019-11-21 17:18:38 +08:00
committed by GitHub
parent 659eb3eefc
commit a1a93ba11b
5 changed files with 43 additions and 22 deletions
+6 -1
View File
@@ -16,7 +16,7 @@ export default createComponent({
mixins: [
ParentMixin('vanTabs'),
BindEventMixin(function(bind) {
bind(window, 'resize', this.setLine, true);
bind(window, 'resize', this.resize, true);
})
],
@@ -139,6 +139,11 @@ export default createComponent({
},
methods: {
// @exposed-api
resize() {
this.setLine();
},
onShow() {
this.$nextTick(() => {
this.inited = true;