|
|
@@ -0,0 +1,163 @@
|
|
|
+<template>
|
|
|
+ <div class="loading" :class="{ dark: pageType === 'dark', light: pageType === 'dark' }">
|
|
|
+ <div class="loading-page"><span></span><span></span><span></span><span></span><span></span></div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ pageType: {
|
|
|
+ type: String,
|
|
|
+ default: 'dark'
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+@color1: #c8c9cc;
|
|
|
+@color2: #939599;
|
|
|
+
|
|
|
+.loading {
|
|
|
+ .flex();
|
|
|
+ justify-content: center;
|
|
|
+ height: 80px;
|
|
|
+}
|
|
|
+.loading-page {
|
|
|
+ position: relative;
|
|
|
+ width: 50px;
|
|
|
+ span {
|
|
|
+ display: block;
|
|
|
+ bottom: 0px;
|
|
|
+ width: 3px;
|
|
|
+ height: 5px;
|
|
|
+ background: @color1;
|
|
|
+ position: absolute;
|
|
|
+ animation: preloader_1 1.5s infinite ease-in-out;
|
|
|
+
|
|
|
+ &:nth-child(2) {
|
|
|
+ left: 6px;
|
|
|
+ -webkit-animation-delay: 0.2s;
|
|
|
+ -moz-animation-delay: 0.2s;
|
|
|
+ -ms-animation-delay: 0.2s;
|
|
|
+ -o-animation-delay: 0.2s;
|
|
|
+ animation-delay: 0.2s;
|
|
|
+ }
|
|
|
+ &:nth-child(3) {
|
|
|
+ left: 12px;
|
|
|
+ -webkit-animation-delay: 0.4s;
|
|
|
+ -moz-animation-delay: 0.4s;
|
|
|
+ -ms-animation-delay: 0.4s;
|
|
|
+ -o-animation-delay: 0.4s;
|
|
|
+ animation-delay: 0.4s;
|
|
|
+ }
|
|
|
+ &:nth-child(4) {
|
|
|
+ left: 18px;
|
|
|
+ -webkit-animation-delay: 0.6s;
|
|
|
+ -moz-animation-delay: 0.6s;
|
|
|
+ -ms-animation-delay: 0.6s;
|
|
|
+ -o-animation-delay: 0.6s;
|
|
|
+ animation-delay: 0.6s;
|
|
|
+ }
|
|
|
+ &:nth-child(5) {
|
|
|
+ left: 24px;
|
|
|
+ -webkit-animation-delay: 0.8s;
|
|
|
+ -moz-animation-delay: 0.8s;
|
|
|
+ -ms-animation-delay: 0.8s;
|
|
|
+ -o-animation-delay: 0.8s;
|
|
|
+ animation-delay: 0.8s;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+@keyframes preloader_1 {
|
|
|
+ 0% {
|
|
|
+ height: 5px;
|
|
|
+ transform: translateY(0px);
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ 25% {
|
|
|
+ height: 25px;
|
|
|
+ transform: translateY(10px);
|
|
|
+ background: @color2;
|
|
|
+ }
|
|
|
+ 50% {
|
|
|
+ height: 5px;
|
|
|
+ transform: translateY(0px);
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ 100% {
|
|
|
+ height: 5px;
|
|
|
+ transform: translateY(0px);
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.dark {
|
|
|
+ @color1: #ffffff;
|
|
|
+ @color2: #595959;
|
|
|
+
|
|
|
+ .loading-page {
|
|
|
+ span {
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @keyframes preloader_1 {
|
|
|
+ 0% {
|
|
|
+ height: 5px;
|
|
|
+ transform: translateY(0px);
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ 25% {
|
|
|
+ height: 20px;
|
|
|
+ transform: translateY(8px);
|
|
|
+ background: @color2;
|
|
|
+ }
|
|
|
+ 50% {
|
|
|
+ height: 5px;
|
|
|
+ transform: translateY(0px);
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ 100% {
|
|
|
+ height: 5px;
|
|
|
+ transform: translateY(0px);
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.light {
|
|
|
+ @color1: #c8c9cc;
|
|
|
+ @color2: #939599;
|
|
|
+
|
|
|
+ .loading-page {
|
|
|
+ span {
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @keyframes preloader_1 {
|
|
|
+ 0% {
|
|
|
+ height: 5px;
|
|
|
+ transform: translateY(0px);
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ 25% {
|
|
|
+ height: 20px;
|
|
|
+ transform: translateY(8px);
|
|
|
+ background: @color2;
|
|
|
+ }
|
|
|
+ 50% {
|
|
|
+ height: 5px;
|
|
|
+ transform: translateY(0px);
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ 100% {
|
|
|
+ height: 5px;
|
|
|
+ transform: translateY(0px);
|
|
|
+ background: @color1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|