Commit 4811cce809453df78dc2c25cd9805eae483297fc

Authored by vben
1 parent f2bdf0b8

feat: first screen loading waiting animation

README.md
... ... @@ -217,16 +217,16 @@ yarn clean:lib # 删除node_modules,兼容window系统
217 217 - [x] 表格组件
218 218 - [x] 图表库
219 219 - [x] 数字动画
  220 +- [x] 首屏加载等待动画
220 221  
221 222 ## 正在开发的功能
222 223  
223   -- [ ] 主题配置
224 224 - [ ] 上传组件
225 225 - [ ] 富文本组件
226 226 - [ ] 数据导入导出
227   -- [ ] 黑暗主题
228 227 - [ ] 全局错误处理
229   -- [ ] 首屏加载等待动画
  228 +- [ ] 主题配置
  229 +- [ ] 黑暗主题
230 230 - [ ] 打包 Gzip
231 231 - [ ] 抽取生产环境配置文件
232 232 - [ ] 系统性能优化
... ...
index.html
... ... @@ -7,7 +7,77 @@
7 7 <title>Vue Vben admin 2.0</title>
8 8 </head>
9 9 <body>
10   - <div id="app"></div>
  10 + <div id="app">
  11 + <style>
  12 + @keyframes load {
  13 + 0% {
  14 + -webkit-transform: rotate(-360deg);
  15 + -moz-transform: rotate(-360deg);
  16 + -ms-transform: rotate(-360deg);
  17 + -o-transform: rotate(-360deg);
  18 + transform: rotate(-360deg);
  19 + }
  20 +
  21 + 100% {
  22 + -webkit-transform: rotate(0);
  23 + -moz-transform: rotate(0);
  24 + -ms-transform: rotate(0);
  25 + -o-transform: rotate(0);
  26 + transform: rotate(0);
  27 + }
  28 + }
  29 +
  30 + .g-loading {
  31 + -webkit-animation: load 2s linear infinite;
  32 + -moz-animation: load 2s linear infinite;
  33 + -ms-animation: load 2s linear infinite;
  34 + -o-animation: load 2s linear infinite;
  35 + animation: load 2s linear infinite;
  36 + -webkit-transform-origin: center center;
  37 + -moz-transform-origin: center center;
  38 + -ms-transform-origin: center center;
  39 + -o-transform-origin: center center;
  40 + transform-origin: center center;
  41 + }
  42 +
  43 + .app-loading {
  44 + width: 100%;
  45 + height: 100%;
  46 + background: rgba(255, 255, 255, 0, 3);
  47 + }
  48 +
  49 + .app-loading .app-loading-wrap {
  50 + position: absolute;
  51 + top: 45%;
  52 + left: 50%;
  53 + width: 64px;
  54 + -ms-transform: translate3d(-50%, -50%, 0);
  55 + -moz-transform: translate3d(-50%, -50%, 0);
  56 + -webkit-transform: translate3d(-50%, -50%, 0);
  57 + -o-transform: translate3d(-50%, -50%, 0);
  58 + transform: translate3d(-50%, -50%, 0);
  59 + }
  60 +
  61 + .app-loading .app-loading-wrap img.logo {
  62 + margin-bottom: 20px;
  63 + margin-left: -20px;
  64 + }
  65 +
  66 + .app-loading .app-loading-wrap .app-loading__tip {
  67 + display: block;
  68 + margin-top: 4px;
  69 + font-size: 13px;
  70 + color: #303133;
  71 + text-align: center;
  72 + }
  73 + </style>
  74 + <section class="app-loading">
  75 + <section class="app-loading-wrap">
  76 + <img src="./resource/img/logo.png" class="logo" alt="Logo" />
  77 + <img src="./resource/img/loading.svg" alt="" class="g-loading" />
  78 + </section>
  79 + </section>
  80 + </div>
11 81 <script type="module" src="/src/main.ts"></script>
12 82 </body>
13 83 </html>
... ...
public/resource/img/loading.svg 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<svg viewBox="0 0 200 200" version="1.1"
  3 + xmlns="http://www.w3.org/2000/svg"
  4 + xmlns:xlink="http://www.w3.org/1999/xlink">
  5 + <style type="text/css">
  6 + .left-linear {
  7 + fill: url(#left-linear);
  8 + }
  9 +
  10 + .right-linear {
  11 + fill: url(#right-linear);
  12 + }
  13 +
  14 + .top {
  15 + fill: #64acff;
  16 + }
  17 +
  18 + .bottom {
  19 + fill: #9dbfe4;
  20 + }
  21 + @keyframes load {
  22 + 0% {
  23 + transform: rotate(-360deg);
  24 + }
  25 +
  26 + 100% {
  27 + transform: rotate(0);
  28 + }
  29 + }
  30 +
  31 + .load {
  32 + animation: load 1.4s linear infinite;
  33 + transform-origin: center center;
  34 + }
  35 +
  36 + svg {
  37 + display: block;
  38 + }
  39 +
  40 + .tip {
  41 + display: block;
  42 + min-width: 100px;
  43 + margin-top: 4px;
  44 + font-size: 13px;
  45 + color: #303133;
  46 + text-align: left;
  47 + }
  48 + </style>
  49 + <circle cx="97" cy="97" r="81" stroke-width="16" stroke="#327fd8" fill="none"></circle>
  50 + <g class="load">
  51 + <!--右半圆环-->
  52 + <linearGradient id="left-linear" gradientUnits="userSpaceOnUse" x1="50" y1="0" x2="100" y2="180">
  53 + <stop offset="0" style="stop-color: #64acff;" />
  54 + <stop offset="1" style="stop-color: #9DBFE4;" />
  55 + </linearGradient>
  56 + <path class="left-linear" d="M20,100c0-44.1,35.9-80,80-80V0C44.8,0,0,44.8,0,100s44.8,100,100,100v-20C55.9,180,20,144.1,20,100z" />
  57 + <!--左半圆环-->
  58 + <circle class="bottom" cx="100" cy="190" r="10" />
  59 + <linearGradient id="right-linear" gradientUnits="userSpaceOnUse" x1="100" y1="120" x2="100" y2="180">
  60 + <stop offset="0" style="stop-color: transparent;" />
  61 + <stop offset="1" style="stop-color: transparent;" />
  62 + </linearGradient>
  63 + <path class="right-linear" d="M100,0v20c44.1,0,80,35.9,80,80c0,44.1-35.9,80-80,80v20c55.2,0,100-44.8,100-100S155.2,0,100,0z" />
  64 + <!--左半圆环-->
  65 + <circle class="top" cx="100" cy="10" r="10" />
  66 + </g>
  67 +</svg>
... ...
public/resource/img/logo.png 0 → 100644

3.95 KB

src/assets/images/header.jpg

1.04 MB | W: | H:

16.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
src/views/dashboard/workbench/components/ProdTotal.vue
... ... @@ -9,7 +9,7 @@
9 9 </template>
10 10 </Row>
11 11 </template>
12   -<script lang="tsx">
  12 +<script lang="ts">
13 13 import { defineComponent } from 'vue';
14 14 import { Row, Col } from 'ant-design-vue';
15 15  
... ...