1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| <template> <div class="loading" v-if="loading"> <div class="loader-six"> <div></div> <div></div> <div></div> </div> </div> </template>
<script lang="ts"> import { Component, Vue } from 'vue-property-decorator'; import { State } from 'vuex-class';
@Component export default class Loading extends Vue { @State(state => state.app.loading) loading!: boolean; } </script>
<style scoped> .loading { display: flex; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.5); opacity: 0.6; align-items: center; justify-content: center; position: absolute; overflow: hidden; z-index: 9999; }
.loader-six { position: relative; width: 60px; height: 60px; } .loader-six div { width: 60px; height: 60px; border-radius: 50%; background: transparent; position: absolute; left: 0; top: 10px; border: 2px solid #fff; } @-webkit-keyframes loader6 { 0% { -webkit-transform: scale(0.1); opacity: 0.1; } 20% { -webkit-transform: scale(0.5); opacity: 1; } 100% { -webkit-transform: scale(0.8); opacity: 0.5; } } .loader-six div:nth-child(1) { -webkit-animation: loader6 0.8s -0.24s infinite cubic-bezier(0.21, 0.53, 0.56, 0.8); } .loader-six div:nth-child(2) { -webkit-animation: loader6 0.8s -0.12s infinite cubic-bezier(0.21, 0.53, 0.56, 0.8); } .loader-six div:nth-child(3) { -webkit-animation: loader6 0.8s 0s infinite cubic-bezier(0.21, 0.53, 0.56, 0.8); } </style>
|