zszq-celebration-88/src/components/Loading.vue

204 lines
4.0 KiB
Vue

<template>
<div class="loadCon" @touchmove.prevent>
<div class="load_container">
<div class="load_box">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
</div>
</template>
<script setup>
import {
onBeforeMount,
onMounted,
defineEmits,
defineProps,
reactive,
ref,
toRefs,
} from "vue";
import gsap from "gsap";
import axios from "axios";
import { Toast } from "vant";
import { useStore } from "vuex";
// 初始化
const emit = defineEmits(["RulesPop"]); // 声明触发事件,对应父组件上面的方法
const props = defineProps({ sendMessage: Object }); // 获取props
const store = useStore();
// 页面挂载前
onBeforeMount(() => {});
// 页面挂载后
onMounted(() => {});
const hidePop = () => {
emit("RulesPop");
};
</script>
<style lang="scss" scoped>
.loadCon {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-image: -moz-linear-gradient( 90deg, rgb(254,186,136) 37%, rgb(253,240,227) 100%);
background-image: -webkit-linear-gradient( 90deg, rgb(254,186,136) 37%, rgb(253,240,227) 100%);
background-image: -ms-linear-gradient( 90deg, rgb(254,186,136) 37%, rgb(253,240,227) 100%);
.load_container {
width: 750px;
height: 1180px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
@keyframes load_box {
0% {
opacity: 1
}
100% {
opacity: 0
}
}
.load_box{
width: 40px !important;
height: 100px !important;
}
.load_box div {
// left: 94px;
// top: 48px;
position: absolute;
animation: load_box linear 1s infinite;
background: #df1317;
width: 12px;
height: 24px;
border-radius: 6px / 12px;
transform-origin: 6px 52px;
}
.load_box div:nth-child(1) {
transform: rotate(0deg);
animation-delay: -0.9166666666666666s;
background: #df1317;
}
.load_box div:nth-child(2) {
transform: rotate(30deg);
animation-delay: -0.8333333333333334s;
background: #df1317;
}
.load_box div:nth-child(3) {
transform: rotate(60deg);
animation-delay: -0.75s;
background: #df1317;
}
.load_box div:nth-child(4) {
transform: rotate(90deg);
animation-delay: -0.6666666666666666s;
background: #df1317;
}
.load_box div:nth-child(5) {
transform: rotate(120deg);
animation-delay: -0.5833333333333334s;
background: #df1317;
}
.load_box div:nth-child(6) {
transform: rotate(150deg);
animation-delay: -0.5s;
background: #df1317;
}
.load_box div:nth-child(7) {
transform: rotate(180deg);
animation-delay: -0.4166666666666667s;
background: #df1317;
}
.load_box div:nth-child(8) {
transform: rotate(210deg);
animation-delay: -0.3333333333333333s;
background: #df1317;
}
.load_box div:nth-child(9) {
transform: rotate(240deg);
animation-delay: -0.25s;
background: #df1317;
}
.load_box div:nth-child(10) {
transform: rotate(270deg);
animation-delay: -0.16666666666666666s;
background: #df1317;
}
.load_box div:nth-child(11) {
transform: rotate(300deg);
animation-delay: -0.08333333333333333s;
background: #df1317;
}
.load_box div:nth-child(12) {
transform: rotate(330deg);
animation-delay: 0s;
background: #df1317;
}
.loadingio-spinner-spinner-z60ni5wxaaj {
width: 200px;
height: 200px;
display: inline-block;
overflow: hidden;
background: #f1f2f3;
}
.load_box {
width: 100%;
height: 100%;
position: relative;
transform: translateZ(0) scale(1);
backface-visibility: hidden;
transform-origin: 0 0;
/* see note above */
}
.load_box div {
box-sizing: content-box;
}
}
}
</style>