瀏覽代碼

perf: the existing tab switching no longer displays animation and processbar

vben 4 年之前
父節點
當前提交
e9536b5b7c
共有 6 個文件被更改,包括 8 次插入13 次删除
  1. 1 6
      README.md
  2. 二進制
      src/assets/images/logo.png
  3. 1 1
      src/design/var/index.less
  4. 4 1
      src/router/guard/index.ts
  5. 1 4
      src/router/guard/progressGuard.ts
  6. 1 1
      src/views/sys/login/Login.vue

+ 1 - 6
README.md

@@ -202,11 +202,8 @@ yarn clean:lib # 删除node_modules,兼容window系统
 - [x] 页面加载 loading
 - [x] 页面加载 loading
 - [x] 滚动条组件
 - [x] 滚动条组件
 - [x] 弹窗扩展(可拖拽,全屏,自适应高度)
 - [x] 弹窗扩展(可拖拽,全屏,自适应高度)
-- [x] 全屏
 - [x] 模拟数据
 - [x] 模拟数据
-- [x] 剪贴板封装
 - [x] hook 封装
 - [x] hook 封装
-- [x] 项目可配置
 - [x] 表单组件
 - [x] 表单组件
 - [x] 右键菜单
 - [x] 右键菜单
 - [x] 水印插件
 - [x] 水印插件
@@ -214,12 +211,10 @@ yarn clean:lib # 删除node_modules,兼容window系统
 - [x] 二维码插件
 - [x] 二维码插件
 - [x] 国际化插件
 - [x] 国际化插件
 - [x] 详情组件
 - [x] 详情组件
-- [x] 验证码/验证组件
+- [x] 验证组件
 - [x] 树组件
 - [x] 树组件
-- [x] 兼容最新`vuex`,`vue-router`
 - [x] 图片预览组件
 - [x] 图片预览组件
 - [x] 表格组件
 - [x] 表格组件
-- [x] 可编辑表格
 
 
 ## 正在开发的功能
 ## 正在开发的功能
 
 

二進制
src/assets/images/logo.png


+ 1 - 1
src/design/var/index.less

@@ -9,7 +9,7 @@
 @header-height: 42px;
 @header-height: 42px;
 
 
 // logo width
 // logo width
-@logo-width: 32px;
+@logo-width: 40px;
 
 
 //
 //
 @sider-drag-z-index: 200;
 @sider-drag-z-index: 200;

+ 4 - 1
src/router/guard/index.ts

@@ -7,12 +7,15 @@ import { createProgressGuard } from './progressGuard';
 import { createPermissionGuard } from './permissionGuard';
 import { createPermissionGuard } from './permissionGuard';
 import { createPageLoadingGuard } from './pageLoadingGuard';
 import { createPageLoadingGuard } from './pageLoadingGuard';
 import { useSetting } from '/@/hooks/core/useSetting';
 import { useSetting } from '/@/hooks/core/useSetting';
+import { getIsOpenTab } from '/@/utils/helper/routeHelper';
 
 
 const { projectSetting } = useSetting();
 const { projectSetting } = useSetting();
 export function createGuard(router: Router) {
 export function createGuard(router: Router) {
   const axiosCanceler = new AxiosCanceler();
   const axiosCanceler = new AxiosCanceler();
 
 
-  router.beforeEach(async () => {
+  router.beforeEach(async (to) => {
+    const isOpen = getIsOpenTab(to.path);
+    to.meta.inTab = isOpen;
     try {
     try {
       Modal.destroyAll();
       Modal.destroyAll();
       notification.destroy();
       notification.destroy();

+ 1 - 4
src/router/guard/progressGuard.ts

@@ -2,16 +2,13 @@ import type { Router } from 'vue-router';
 
 
 import NProgress from 'nprogress';
 import NProgress from 'nprogress';
 import 'nprogress/nprogress.css';
 import 'nprogress/nprogress.css';
-import { getIsOpenTab } from '/@/utils/helper/routeHelper';
 
 
 export function createProgressGuard(router: Router) {
 export function createProgressGuard(router: Router) {
   // NProgress.inc(0.1);
   // NProgress.inc(0.1);
   // NProgress.configure({ easing: 'ease', speed: 200, showSpinner: false });
   // NProgress.configure({ easing: 'ease', speed: 200, showSpinner: false });
 
 
   router.beforeEach(async (to) => {
   router.beforeEach(async (to) => {
-    const isOpen = getIsOpenTab(to.path);
-    to.meta.inTab = isOpen;
-    !isOpen && NProgress.start();
+    !to.meta.inTab && NProgress.start();
     return true;
     return true;
   });
   });
   router.afterEach(async (to) => {
   router.afterEach(async (to) => {

+ 1 - 1
src/views/sys/login/Login.vue

@@ -173,7 +173,7 @@
 
 
           img {
           img {
             display: inline-block;
             display: inline-block;
-            width: 48px;
+            width: 80px;
           }
           }
 
 
           h1 {
           h1 {