Browse Source

全局配置修改

黄琪勇 3 months ago
parent
commit
93b6eac3db
4 changed files with 80 additions and 68 deletions
  1. 63 44
      index.html
  2. 9 7
      src/assets/styles/variable.scss
  3. 1 3
      src/plugins/icon.ts
  4. 7 14
      src/views/Editor/EditorHeader/index.vue

+ 63 - 44
index.html

@@ -1,57 +1,76 @@
-<!DOCTYPE html>
+<!doctype html>
 <html lang="zh-CN">
   <head>
-    <meta charset="UTF-8">
-    <link rel="icon" href="/favicon.ico">
+    <meta charset="UTF-8" />
+    <link rel="icon" href="/favicon.ico" />
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
-    <meta name="renderer" content="webkit">
+    <meta name="renderer" content="webkit" />
     <meta name="force-rendering" content="webkit" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <meta name="description" content="ppt编辑器" />
     <meta name="keywords" content="ppt,powerpoint,office powerpoint,在线ppt,幻灯片,演示文稿,ppt在线制作,Vue3,TypeScript" />
     <title>%VITE_APP_TITLE%</title>
-
-    <style>
-      .first-screen-loading {
-        width: 200px;
-        height: 200px;
-        position: fixed;
-        top: 50%;
-        left: 50%;
-        margin-top: -100px;
-        margin-left: -100px;
-        display: flex;
-        flex-direction: column;
-        justify-content: center;
-        align-items: center;
-      }
-      .first-screen-loading-spinner {
-        width: 36px;
-        height: 36px;
-        border: 3px solid #d14424;
-        border-top-color: transparent;
-        border-radius: 50%;
-        animation: spinner .8s linear infinite;
-      }
-      .first-screen-loading-text {
-        margin-top: 20px;
-        color: #d14424;
-      }
-      @keyframes spinner {
-        0% {
-          transform: rotate(0deg);
-        }
-        100% {
-          transform: rotate(360deg);
-        }
-      }
-    </style>
   </head>
   <body>
     <div id="app">
-      <div class="first-screen-loading">
-        <div class="first-screen-loading-spinner"></div>
-        <div class="first-screen-loading-text">正在加载中,请稍等 ...</div>
+      <style>
+        .firstLoading {
+          position: fixed;
+          left: 0;
+          top: 0;
+          right: 0;
+          bottom: 0;
+          width: 100%;
+          height: 100%;
+          min-width: 100vw;
+          min-height: 100vh;
+          display: flex;
+          flex-direction: column;
+          justify-content: center;
+          align-items: center;
+          z-index: 10000;
+        }
+        .firstLoading .loadingBox {
+          width: 32px;
+          height: 32px;
+          display: flex;
+          justify-content: space-between;
+          flex-wrap: wrap;
+          align-content: space-between;
+          margin-bottom: 28px;
+          animation: rotate 1.5s linear infinite;
+        }
+        .firstLoading .loadingBox .loadingItem {
+          width: 14px;
+          height: 14px;
+          border-radius: 50%;
+          background: #569cfe;
+          opacity: 0.5;
+        }
+        .firstLoading .loadingBox .loadingItem:nth-child(2) {
+          opacity: 1;
+        }
+        .firstLoading .loadingTip {
+          font-size: 16px;
+          color: #569cfe;
+        }
+        @keyframes rotate {
+          from {
+            transform: rotate(0deg);
+          }
+          to {
+            transform: rotate(360deg);
+          }
+        }
+      </style>
+      <div class="firstLoading">
+        <div class="loadingBox">
+          <div class="loadingItem"></div>
+          <div class="loadingItem"></div>
+          <div class="loadingItem"></div>
+          <div class="loadingItem"></div>
+        </div>
+        <div class="loadingTip">正在加载中,请稍等…</div>
       </div>
     </div>
     <script type="module" src="/src/main.ts"></script>

+ 9 - 7
src/assets/styles/variable.scss

@@ -1,13 +1,15 @@
-$themeColor: #d14424;
-$themeHoverColor: #de6949;
+$themeColor: #569cfe;
+$themeHoverColor: #1cacf1;
 $textColor: #41464b;
 $borderColor: #e5e7eb;
 $lightGray: #f9f9f9;
 
-$boxShadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
+$boxShadow:
+  0 4px 6px -1px rgba(0, 0, 0, 0.1),
+  0 2px 4px -2px rgba(0, 0, 0, 0.1);
 
-$transitionDelay: .2s;
-$transitionDelayFast: .1s;
-$transitionDelaySlow: .3s;
+$transitionDelay: 0.2s;
+$transitionDelayFast: 0.1s;
+$transitionDelaySlow: 0.3s;
 
-$borderRadius: 2px;
+$borderRadius: 2px;

+ 1 - 3
src/plugins/icon.ts

@@ -55,7 +55,6 @@ import {
   Connection,
   BringToFrontOne,
   SentToBack,
-  Github,
   ChartProportion,
   ChartHistogram,
   ChartHistogramOne,
@@ -185,7 +184,6 @@ export const icons: Icons = {
   IconConnection: Connection,
   IconBringToFrontOne: BringToFrontOne,
   IconSentToBack: SentToBack,
-  IconGithub: Github,
   IconChartProportion: ChartProportion,
   IconChartHistogram: ChartHistogram,
   IconChartHistogramOne: ChartHistogramOne,
@@ -263,4 +261,4 @@ export default {
       app.component(key, icons[key])
     }
   }
-}
+}

+ 7 - 14
src/views/Editor/EditorHeader/index.vue

@@ -25,14 +25,14 @@
       </Popover>
 
       <div class="title">
-        <Input 
-          class="title-input" 
+        <Input
+          class="title-input"
           ref="titleInputRef"
-          v-model:value="titleValue" 
-          @blur="handleUpdateTitle()" 
-          v-if="editingTitle" 
+          v-model:value="titleValue"
+          @blur="handleUpdateTitle()"
+          v-if="editingTitle"
         ></Input>
-        <div 
+        <div
           class="title-text"
           @click="startEditTitle()"
           :title="title"
@@ -57,9 +57,6 @@
       <div class="menu-item" v-tooltip="'导出'" @click="setDialogForExport('pptx')">
         <IconDownload class="icon" />
       </div>
-      <a class="github-link" v-tooltip="'Copyright © 2020-PRESENT pipipi-pikachu'" href="https://github.com/pipipi-pikachu/PPTist" target="_blank">
-        <div class="menu-item"><IconGithub class="icon" /></div>
-      </a>
     </div>
 
     <Drawer
@@ -212,8 +209,4 @@ const setDialogForExport = (type: DialogForExportTypes) => {
     }
   }
 }
-.github-link {
-  display: inline-block;
-  height: 30px;
-}
-</style>
+</style>