pane.vue 654 Bytes
<template>
  <div :class="prefixCls" v-if="show">
    <slot></slot>
  </div>
</template>
<script>
const prefixCls = 'yoho-tabs-tabpane';

export default {
  name: 'TabPane',
  props: {
    label: {
      type: String,
      default: ''
    },
    disabled: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      prefixCls: prefixCls,
      show: this.disabled
    };
  },
  methods: {
    updateNav() {
      this.$parent.updateNav();
    }
  },
  created() {
    this.updateNav();
  }
};
</script>

<style lang="scss" scoped>
  .yoho-tabs-tabpane {
    background: #f0f0f0;
    width: 100%;
    height: 100%;
  }
</style>