import {Component, Prop, Vue, Emit, Watch} from 'vue-property-decorator'; @Component export default class EflyTabs extends Vue { @Prop({default: () => ''}) private value!: any; @Prop({default: () => 'base'}) private type!: any; $children: any; $parent: any; private tabs: any = ''; private mounted() { this.tabs = this.value; } @Watch('value', {immediate: true}) private getValue(value: any) { this.tabs = value; for (let i in this.$children) { this.$children[i].getActive(); } } private getTabs(value: any) { if (value !== '') { this.$emit('change', value); } } }