This commit is contained in:
梁灏 2019-01-07 14:50:29 +08:00
parent c6de66168c
commit 68335adb6c

View file

@ -1,5 +1,5 @@
<template>
<div :class="prefixCls" v-show="show"><slot></slot></div>
<div :class="prefixCls" v-show="show" :style="contentStyle"><slot></slot></div>
</template>
<script>
const prefixCls = 'ivu-tabs-tabpane';
@ -33,6 +33,13 @@
currentName: this.name
};
},
computed: {
contentStyle () {
return {
visibility: this.$parent.activeKey !== this.currentName ? 'hidden' : 'visible'
};
}
},
methods: {
updateNav () {
this.$parent.updateNav();