File tree Expand file tree Collapse file tree 7 files changed +15
-44
lines changed
Expand file tree Collapse file tree 7 files changed +15
-44
lines changed Original file line number Diff line number Diff line change 5151 width : 100% ;
5252 border-radius : 10px ;
5353 font-size : 0 ;
54- background-color : # FCC800 ;
54+ background-image : url ('/src/assets/images/logo.png' );
55+ background-size : contain;
5556 animation : rotate 1.5s infinite ;
5657 }
5758 .app-loading .app-img-container {
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ onMounted(() => {
123123 height : 28px ;
124124 width : 28px ;
125125 vertical-align : top ;
126+ border-radius : 6px ;
126127 }
127128 .s-name {
128129 font-size : $header-system-size ;
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ const _menus:IMenuData[] = [{
55 auth_name : '编辑器' ,
66 id : 2 ,
77 pid : 0 ,
8- path : '/editor/editor -page?runtimePathType=vue2' ,
9- path_type : 1
8+ path : '/editor-page?runtimePathType=vue2' ,
9+ path_type : 1 ,
1010} ] ;
1111
1212console . log ( '_menus' , _menus ) ;
Original file line number Diff line number Diff line change 11import routerErrorData from '@/router/modules/error' ; // 错误
2- import { createRouter , createWebHistory } from 'vue-router' ;
2+ import { createRouter , createWebHashHistory } from 'vue-router' ;
33import { redirectRoute } from './modules/reload' ;
44import { flat_multi_level_routes } from './utils' ;
55import { App } from 'vue' ;
@@ -21,9 +21,9 @@ routerData = flat_multi_level_routes(routerData);
2121console . log ( routerData ) ;
2222// app router
2323const router = createRouter ( {
24- history : createWebHistory ( import . meta. env . VITE_BASE_PATH as string ) ,
24+ history : createWebHashHistory ( import . meta. env . VITE_BASE_PATH as string ) ,
2525 routes : routerData ,
26- strict : true
26+ strict : true ,
2727} ) ;
2828
2929export function setup_router ( app : App ) {
Original file line number Diff line number Diff line change @@ -2,17 +2,17 @@ import { RouteRecordRaw } from 'vue-router';
22import { LAYOUT } from '../base' ;
33
44export const editorRoute : RouteRecordRaw = {
5- path : '/editor ' ,
5+ path : '/' ,
66 component : LAYOUT ,
77 name : 'Editor' ,
88 meta : {
99 title : 'Editor' ,
1010 // hideBreadcrumb: true,
1111 // hideMenu: true,
1212 id : 'editor' ,
13- pid : '0'
13+ pid : '0' ,
1414 } ,
15- redirect : '/editor/editor -page' ,
15+ redirect : '/editor-page?runtimePathType=vue2 ' ,
1616 children : [
1717 {
1818 path : 'editor-page' ,
@@ -21,8 +21,8 @@ export const editorRoute: RouteRecordRaw = {
2121 meta : {
2222 title : '编辑器' ,
2323 id : 'editorPage' ,
24- pid : 'editor'
25- }
24+ pid : 'editor' ,
25+ } ,
2626 }
27- ]
27+ ] ,
2828} ;
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ export function setup_outer_guard(router: Router) {
99 set_progress ( router ) ;
1010 create_http_guard ( router ) ;
1111 cancel_page_loading ( router ) ;
12- create_permission_route ( router ) ;
1312}
1413
1514// 基本router方法
@@ -33,7 +32,7 @@ function cancel_page_loading(router: Router) {
3332
3433// 设置进度条
3534function set_progress ( router : Router ) {
36- const { getShowNProgress } = useProjectSetting ( ) ;
35+ const { getShowNProgress, } = useProjectSetting ( ) ;
3736 if ( getShowNProgress . value ) {
3837 router . beforeEach ( async ( ) => {
3938 NProgress . start ( ) ;
@@ -65,33 +64,3 @@ function create_http_guard(router: Router) {
6564 return true ;
6665 } ) ;
6766}
68-
69- function create_permission_route ( router : Router ) { // 是否包含权限管理
70- const globalStore = useGlobalStore ( ) ;
71- if ( ! globalStore . authorityManage ) {
72- const _initRouter :RouteRecordRaw [ ] = [
73- {
74- path : '/' ,
75- redirect : '/editor/editor-page?runtimePathType=vue2' ,
76- name : 'first' ,
77- meta : {
78- title : '第一初始页面' ,
79- pid : '0' ,
80- id : 'first'
81- }
82- }
83- ] ;
84- _initRouter . forEach ( route => {
85- router . addRoute ( route ) ;
86- } ) ;
87- setTimeout ( ( ) => { // 路由的添加并不会及时刷新, 必须延时进行自行调用
88- const isInitPath = router . currentRoute . value . fullPath . split ( '/' ) . length === 2 ;
89- if ( isInitPath ) {
90- router . push ( {
91- path : '/'
92- } ) ;
93- }
94- } ) ;
95- }
96- }
97-
You can’t perform that action at this time.
0 commit comments