<template>
  <div class="loading" v-show="loadingShow">
    <div class="loadingCon">
      <img src="./assets/loading.gif">
    </div>
  </div>
</template>
<script>
  export default {
    data () {
      return {
      }
    },
    props: {
      loadingShow: {
        type: Boolean,
        required: true,
        default: false
      },
    },
    mounted () {
    },
    methods: {
    }
  }
</script>

<style lang="scss">
/* 加载层 */
.loading{
    width: 100%;
    min-height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}
.loading>.loadingCon{
    background: rgba( 230, 230, 230,0.5);
    width: 50px;
    height: 50px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -25px;
    margin-top: -25px;
    border-radius: 4px;
    display: flex;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    justify-content: center;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-justify-content: center;
    -o-justify-content: center;
    align-items: center;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    -o-align-items: center;
}
.loading>.loadingCon>img{
  width: 38px;
  height: 38px;
}
</style>