<template>
  <div class="loadcon">
    <div class="loading">
      <img :src="require(`@/assets/images/logo.png`)" alt="" />
      <div class="progress">
        <div class="bar" :style="'width:' + barWidth + '%'"></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["barWidth"],
  data() {
    console.log(this.barWidth);
    return {};
  },
};
</script>

<style lang="less" scoped>
.loadcon {
  background-color: #70474D;
  background-repeat: repeat;
  background-size: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 999999;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  transform: translate(-50%, -50%);
  text-align: center;
  .progress {
    width: 100%;
    border-radius: 4px;
    height: 8px;
    border: 1px solid #a99979;
    margin-top: 40px;
    font-size: 0;
    position: relative;
  }

  .bar {
    height: 100%;
    position: absolute;
    border-radius: 4px;
    left: -1px;
    top: 0;
    line-height: 1;
    background: #a99979;
  }
  > img {
    width: 60%;
  }
}

@media screen and (max-width: 600px) {
   .loading{
    width: 50%;
   }
}

</style>
