perf: 完善首页预览功能

This commit is contained in:
奔跑的面条
2022-08-30 15:03:25 +08:00
parent c48517a89b
commit 094c7ed392
5 changed files with 29 additions and 28 deletions
+2 -2
View File
@@ -205,9 +205,9 @@ export const loginCheck = () => {
* * 预览地址
* @returns
*/
export const previewPath = () => {
export const previewPath = (id?: string | number) => {
const { origin, pathname } = document.location
const path = fetchPathByName(PreviewEnum.CHART_PREVIEW_NAME, 'href')
const previewPath = `${origin}${pathname}${path}/${fetchRouteParamsLocation()}`
const previewPath = `${origin}${pathname}${path}/${id || fetchRouteParamsLocation()}`
return previewPath
}