parent
c6de66168c
commit
68335adb6c
1 changed files with 8 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue