index.vue 1.07 KB
Newer Older
Nature's avatar
Nature committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<template>
  <section :class="cusClass" class="h-bottom-tab">
    <slot/>
  </section>
</template>

<script>
import TabButton from './tab-button'

export default {
  name: 'BottomTab',
  component: {TabButton},
  props: {
    showDivider: {
      type: Boolean,
      default: false,
    },
    cusClass: {
      type: String,
      default: '',
    },
  },
  data () {
    return {}
  },
}
</script>

<style lang="less">
  .h-bottom-tab {
JingChao's avatar
JingChao committed
31
    height: 44px;
Nature's avatar
Nature committed
32 33 34
    width: 100%;
    background-color: #fff;
    position: fixed;
JingChao's avatar
JingChao committed
35
    z-index: 10;
Nature's avatar
Nature committed
36 37 38 39 40 41 42 43 44 45
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0px -1px 3px 0px rgba(0,0,0,.1)
  }
  // iPhoneX适配
  @media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
    .platform-ios {
      .h-bottom-tab {
Nature's avatar
Nature committed
46 47
        height: 78px;
        padding-bottom: 34px;
Nature's avatar
Nature committed
48 49 50 51 52 53
      }
    }
  }
  @media (device-width: 414px) and (device-height: 896px){
    .platform-ios {
      .h-bottom-tab {
Nature's avatar
Nature committed
54
        height: 78px;
JingChao's avatar
JingChao committed
55
        padding-bottom: 34px;
Nature's avatar
Nature committed
56 57 58 59 60
      }
    }
  }

</style>