feat: 优化前端代码

This commit is contained in:
JaguarJack
2023-04-17 16:48:16 +08:00
parent 521f32dce0
commit dc0c86fcc2
3 changed files with 4 additions and 3 deletions

View File

@@ -191,7 +191,7 @@ export const usePermissionsStore = defineStore('PermissionsStore', {
*/
resolveRoutePathRoutePath(route: string, path: string): string {
if (path.length) {
return (path + (route.indexOf('/') === -1 ? '/' : '') + route).replace(/\/$/g, '')
return (path + (!route.startsWith('/') ? '/' : '') + route).replace(/\/$/g, '')
}
// 去除尾部的 /