<template>
  <div class="network_error" v-show="isShowError">
    <div class="network_error_box">
      <img class="network_error_img" src="@/assets/img/no_network@2x.png" />
      <span>哎呀，网络出错了~</span>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    isShowError: {
      type: Boolean,
      required: true,
      default: false,
    },
  },
};
</script>

<style lang="less" scoped>
.network_error {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  position: fixed;
  top: 0px;
  left: 0px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  .network_error_box {
    width: 400px;
    height: 400px;
    border-radius: 4px;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    font-size: 24px;
    .network_error_img {
      width: 100%;
    }
  }
}
</style>