<template>
  <view class="cv-dialog-loading">
    <view class="cv-dialog-loading-box" v-if="show">
      <image :src="img" mode="aspectFit" />
      <view class="cv-dialog-loading-text">{{ content }}</view>
    </view>
  </view>
</template>
<script>
import mpMixin from '../../libs/mixin/mpMixin.js';
import mixin from '../../libs/mixin/mixin.js';
export default {
  mixins: [mpMixin, mixin],
  name: 'cvDialogLoading',
  props: {
    show: {
      type: Boolean,
      default: false
    },
    img: {
      type: [String],
      default: '/static/logo.png'
    },
    content: {
      type: [String],
      default: '加载中...'
    }
  },
  watch: {},
  data() {
    return {};
  },
  created() {},
  methods: {}
};
</script>
<style>
.cv-dialog-loading-box {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 77px;
  left: 0;
  margin: auto;
  width: 143px;
  height: 143px;
  background-color: #ffffff;
  border-radius: 5px;
  box-shadow: 0 0 0px 1104px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 15px;
  z-index: 9999;
  line-height: 2.4em;
}
.cv-dialog-loading-box::after {
  content: '';
  position: absolute;
  background-color: #ffffff;
  border-radius: 50%;
  width: 110px;
  height: 110px;
  font-size: 10px;
  border-top: 3px solid rgba(0, 0, 0, 0.05);
  border-right: 3px solid rgba(0, 0, 0, 0.05);
  border-bottom: 3px solid rgba(0, 0, 0, 0.05);
  border-left: 3px solid #f37b1d;
  -webkit-animation: cuIcon-spin 1s infinite linear;
  animation: cuIcon-spin 1s infinite linear;
  z-index: -1;
}
.cv-dialog-loading-box uni-image {
  width: 38px;
  height: 38px;
}
.cv-dialog-loading-text {
  font-size: 14px;
  color: #666666;
}
@keyframes cuIcon-spin {
  0% {
    -webkit-transform: rotate(0);
    transform: rotate(0);
  }

  100% {
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}
</style>
