parent
c6de66168c
commit
68335adb6c
1 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="prefixCls" v-show="show"><slot></slot></div>
|
<div :class="prefixCls" v-show="show" :style="contentStyle"><slot></slot></div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
const prefixCls = 'ivu-tabs-tabpane';
|
const prefixCls = 'ivu-tabs-tabpane';
|
||||||
|
@ -33,6 +33,13 @@
|
||||||
currentName: this.name
|
currentName: this.name
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
contentStyle () {
|
||||||
|
return {
|
||||||
|
visibility: this.$parent.activeKey !== this.currentName ? 'hidden' : 'visible'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
updateNav () {
|
updateNav () {
|
||||||
this.$parent.updateNav();
|
this.$parent.updateNav();
|
||||||
|
|
Loading…
Add table
Reference in a new issue