| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- <template>
- <div class="form-loading" v-if="loadingAnimate">
- <div class="form-loading-container">
- <div class="loading3">
- <div class="circle circle1">
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- </div>
- <div class="circle circle2">
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- </div>
- <div class="circle circle3">
- <span></span>
- <span></span>
- <span></span>
- <span></span>
- </div>
- </div>
- <div class="form-loading-text">
- <p>正在为您匹配人才...</p>
- <p>倒计时{{times}}秒</p>
- </div>
- </div>
- </div>
- </template>
- <script>
- let timer
- export default {
- data() {
- return {
- times: 5,
- loadingAnimate: false
- }
- },
- destroy() {
- clearInterval(timer)
- timer = null
- },
- methods: {
- start() {
- return new Promise((resolve, reject) => {
- this.loadingAnimate = true;
- timer = setInterval(() => {
- this.times--
- if (this.times == 0) {
- clearInterval(timer)
- timer = null
- this.times = 5
- this.loadingAnimate = false
- resolve()
- }
- }, 1000)
- })
- },
- stop() {
- clearInterval(timer)
- timer = null
- this.times = 5
- this.loadingAnimate = false
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .form-loading {
- position: fixed;
- z-index: 100;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.7);
- }
- .form-loading-container {
- position: absolute;
- left: 50%;
- top: 45%;
- transform: translate(-50%, -50%);
- }
- .form-loading-text {
- text-align: center;
- p {
- line-height: 2em;
- color: #409EFF;
- }
- }
- .loading3 {
- width: 70px;
- height: 70px;
- margin: 50px auto;
- position: relative;
- }
- .circle {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- }
- .circle span {
- width: 8px;
- height: 8px;
- display: inline-block;
- background: #409EFF;
- border-radius: 100%;
- position: absolute;
- -webkit-animation: mycircle 1.2s infinite ease-in-out;
- animation: mycircle 1.2s infinite ease-in-out;
- -webkit-animation-fill-mode: both;
- animation-fill-mode: both;
- }
- .circle2 {
- -webkit-transform: rotateZ(45deg);
- transform: rotateZ(45deg);
- }
- .circle3 {
- -webkit-transform: rotateZ(90deg);
- transform: rotateZ(90deg);
- }
- .circle>span:nth-child(1) {
- top: 0;
- left: 0;
- }
- .circle>span:nth-child(2) {
- top: 0;
- right: 0;
- }
- .circle>span:nth-child(3) {
- right: 0;
- bottom: 0;
- }
- .circle>span:nth-child(4) {
- left: 0;
- bottom: 0;
- }
- .circle2>span:nth-child(1) {
- -webkit-animation-delay: -1.1s;
- animation-delay: -1.1s;
- }
- .circle3>span:nth-child(1) {
- -webkit-animation-delay: -1.0s;
- animation-delay: -1.0s;
- }
- .circle1>span:nth-child(2) {
- -webkit-animation-delay: -0.9s;
- animation-delay: -0.9s;
- }
- .circle2>span:nth-child(2) {
- -webkit-animation-delay: -0.8s;
- animation-delay: -0.8s;
- }
- .circle3>span:nth-child(2) {
- -webkit-animation-delay: -0.7s;
- animation-delay: -0.7s;
- }
- .circle1>span:nth-child(3) {
- -webkit-animation-delay: -0.6s;
- animation-delay: -0.6s;
- }
- .circle2>span:nth-child(3) {
- -webkit-animation-delay: -0.7s;
- animation-delay: -0.7s;
- }
- .circle3>span:nth-child(3) {
- -webkit-animation-delay: -0.4s;
- animation-delay: -0.4s;
- }
- .circle1>span:nth-child(4) {
- -webkit-animation-delay: -0.3s;
- animation-delay: -0.3s;
- }
- .circle2>span:nth-child(4) {
- -webkit-animation-delay: -0.2s;
- animation-delay: -0.2s;
- }
- .circle3>span:nth-child(4) {
- -webkit-animation-delay: -0.1s;
- animation-delay: -0.1s;
- }
- @-webkit-keyframes mycircle {
- 0% {
- transform: scale(0.0);
- }
- 40% {
- transform: scale(1.0);
- }
- 80% {
- transform: scale(0.0);
- }
- 100% {
- transform: scale(0.0);
- }
- }
- @keyframes mycircle {
- 0% {
- transform: scale(0.0);
- }
- 40% {
- transform: scale(1.0);
- }
- 80% {
- transform: scale(0.0);
- }
- 100% {
- transform: scale(0.0);
- }
- }
- </style>
|