| 123456789101112131415161718192021222324252627282930 |
- import { VantComponent } from '../common/component';
- VantComponent({
- relation: {
- name: 'tabs',
- type: 'ancestor'
- },
- props: {
- title: String,
- disabled: Boolean
- },
- data: {
- inited: false,
- active: false,
- animated: false,
- width: null
- },
- watch: {
- title: 'update',
- disabled: 'update'
- },
- methods: {
- update: function update() {
- var parent = this.getRelationNodes('../tabs/index')[0];
- if (parent) {
- parent.updateTabs();
- }
- }
- }
- });
|