TabMenu: initial inkbar fixes
parent
51df79c306
commit
e99174b576
|
@ -39,29 +39,29 @@ export default {
|
||||||
extends: BaseTabMenu,
|
extends: BaseTabMenu,
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
emits: ['update:activeIndex', 'tab-change'],
|
emits: ['update:activeIndex', 'tab-change'],
|
||||||
timeout: null,
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
d_activeIndex: this.activeIndex
|
d_activeIndex: this.activeIndex
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
activeIndex(newValue) {
|
activeIndex: {
|
||||||
this.d_activeIndex = newValue;
|
flush: 'post',
|
||||||
|
handler(newValue) {
|
||||||
|
this.d_activeIndex = newValue;
|
||||||
|
this.updateInkBar();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.updateInkBar();
|
this.$nextTick(() => {
|
||||||
|
this.updateInkBar();
|
||||||
|
});
|
||||||
|
|
||||||
const activeItem = this.findActiveItem();
|
const activeItem = this.findActiveItem();
|
||||||
|
|
||||||
activeItem && (activeItem.tabIndex = '0');
|
activeItem && (activeItem.tabIndex = '0');
|
||||||
},
|
},
|
||||||
updated() {
|
|
||||||
this.updateInkBar();
|
|
||||||
},
|
|
||||||
beforeUnmount() {
|
|
||||||
clearTimeout(this.timeout);
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getPTOptions(key, item, index) {
|
getPTOptions(key, item, index) {
|
||||||
return this.ptm(key, {
|
return this.ptm(key, {
|
||||||
|
|
Loading…
Reference in New Issue