wip(Layout): Layout developing
This commit is contained in:
@@ -149,7 +149,3 @@ function subtractLight(color: string, amount: number) {
|
||||
const c = cc < 0 ? 0 : cc
|
||||
return c.toString(16).length > 1 ? c.toString(16) : `0${c.toString(16)}`
|
||||
}
|
||||
|
||||
export function setCssVar(prop: string, val: any, dom = document.documentElement) {
|
||||
dom.style.setProperty(prop, val)
|
||||
}
|
||||
|
||||
@@ -34,3 +34,7 @@ export function underlineToHump(str: string): string {
|
||||
return letter.toUpperCase()
|
||||
})
|
||||
}
|
||||
|
||||
export function setCssVar(prop: string, val: any, dom = document.documentElement) {
|
||||
dom.style.setProperty(prop, val)
|
||||
}
|
||||
|
||||
@@ -122,7 +122,8 @@ export function generateRoutesFn2(routes: AppRouteRecordRaw[]): AppRouteRecordRa
|
||||
}
|
||||
|
||||
export function pathResolve(parentPath: string, path: string) {
|
||||
return `${parentPath}/${path}`
|
||||
const childPath = path.startsWith('/') || !path ? path : `/${path}`
|
||||
return `${parentPath}${childPath}`
|
||||
}
|
||||
|
||||
// 路由降级
|
||||
|
||||
Reference in New Issue
Block a user