Skip to content

Commit e38af8a

Browse files
feat: 更新应用界面和路由配置,添加新的背景图并调整路径
1 parent 925d072 commit e38af8a

File tree

7 files changed

+15
-44
lines changed

7 files changed

+15
-44
lines changed

apps/playground/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
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 {
12.5 KB
Loading

apps/playground/src/components/layout/qm-header.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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;

apps/playground/src/menus/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

1212
console.log('_menus', _menus);

apps/playground/src/router/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import routerErrorData from '@/router/modules/error'; // 错误
2-
import { createRouter, createWebHistory } from 'vue-router';
2+
import { createRouter, createWebHashHistory } from 'vue-router';
33
import { redirectRoute } from './modules/reload';
44
import { flat_multi_level_routes } from './utils';
55
import { App } from 'vue';
@@ -21,9 +21,9 @@ routerData = flat_multi_level_routes(routerData);
2121
console.log(routerData);
2222
// app router
2323
const 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

2929
export function setup_router(app: App) {

apps/playground/src/router/modules/editor.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import { RouteRecordRaw } from 'vue-router';
22
import { LAYOUT } from '../base';
33

44
export 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
};

apps/playground/src/router/setup-router.ts

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff 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
// 设置进度条
3534
function 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-

0 commit comments

Comments
 (0)