Commit 68335adb6c65457e36c1b094b4e6546f4a877173

Authored by 梁灏
1 parent c6de6616

fix #5111 , close #5137

Showing 1 changed file with 8 additions and 1 deletions   Show diff stats
src/components/tabs/pane.vue
1 1 <template>
2   - <div :class="prefixCls" v-show="show"><slot></slot></div>
  2 + <div :class="prefixCls" v-show="show" :style="contentStyle"><slot></slot></div>
3 3 </template>
4 4 <script>
5 5 const prefixCls = 'ivu-tabs-tabpane';
... ... @@ -33,6 +33,13 @@
33 33 currentName: this.name
34 34 };
35 35 },
  36 + computed: {
  37 + contentStyle () {
  38 + return {
  39 + visibility: this.$parent.activeKey !== this.currentName ? 'hidden' : 'visible'
  40 + };
  41 + }
  42 + },
36 43 methods: {
37 44 updateNav () {
38 45 this.$parent.updateNav();
... ...