nantai-erp-wechat-mobile/miniprogram_npm/vant-weapp/tab/index.js

36 lines
738 B
JavaScript
Raw Normal View History

2024-10-31 21:29:57 +08:00
import { VantComponent } from '../common/component';
VantComponent({
relation: {
name: 'tabs',
type: 'ancestor'
},
props: {
dot: Boolean,
info: null,
title: String,
disabled: Boolean,
titleStyle: String
},
data: {
width: null,
inited: false,
active: false,
animated: false
},
watch: {
title: 'update',
disabled: 'update',
dot: 'update',
info: 'update',
titleStyle: 'update'
},
methods: {
update() {
const parent = this.getRelationNodes('../tabs/index')[0];
if (parent) {
parent.updateTabs();
}
}
}
});