vant-weapp/dist/tab/index.js
2018-09-27 14:27:00 +08:00

31 lines
683 B
JavaScript

import { VantComponent } from '../common/component';
VantComponent({
relation: {
name: 'tabs',
type: 'ancestor'
},
props: {
title: String,
disabled: Boolean
},
data: {
inited: false,
active: false
},
watch: {
disabled() {
const parent = this.getRelationNodes('../tabs/index')[0];
if (parent) {
parent.updateTabs();
}
},
title() {
const parent = this.getRelationNodes('../tabs/index')[0];
if (parent) {
parent.setLine();
parent.updateTabs();
}
}
}
});