From 9376b349e31d2fe5d3aaeaedeb45f689cd6e53bc Mon Sep 17 00:00:00 2001 From: init-qy <953218204@qq.com> Date: Sat, 18 Nov 2023 13:21:15 +0800 Subject: [PATCH] fix: update --- docs/.vuepress/components/utils/url.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/.vuepress/components/utils/url.ts b/docs/.vuepress/components/utils/url.ts index 5dab0c81..9dcb3a62 100644 --- a/docs/.vuepress/components/utils/url.ts +++ b/docs/.vuepress/components/utils/url.ts @@ -1,7 +1,4 @@ -import { usePageData } from '@vuepress/client' -import { baseUrl } from '../constants/constants' - export function getAssetsUrl(assetsName: string) { - const pageData = usePageData() - return baseUrl.substring(0, baseUrl.length - 1) + pageData.value.path.replace(/\/e[ns]\//, '/').replace(/\/[^\/]*$/, '/') + assetsName + const pagepath = window.location.pathname + return pagepath.replace(/\/e[ns]\//, '/').replace(/\/[^\/]*$/, '/') + assetsName }