@vuepress/client
Advanced tools
Comparing version 2.0.0-beta.64 to 2.0.0-beta.65
@@ -32,3 +32,3 @@ import { | ||
withBase | ||
} from "./chunk-X6BS2PXP.js"; | ||
} from "./chunk-IKARB3UY.js"; | ||
export { | ||
@@ -35,0 +35,0 @@ ClientOnly, |
@@ -20,3 +20,3 @@ import { | ||
withBase | ||
} from "./chunk-X6BS2PXP.js"; | ||
} from "./chunk-IKARB3UY.js"; | ||
@@ -105,11 +105,19 @@ // src/app.ts | ||
}); | ||
let pendingPageData; | ||
let pendingToPath; | ||
router.beforeResolve(async (to, from) => { | ||
if (to.path !== from.path || from === START_LOCATION) { | ||
; | ||
[pageData.value] = await Promise.all([ | ||
[pendingPageData] = await Promise.all([ | ||
resolvers.resolvePageData(to.name), | ||
pagesComponents[to.name]?.__asyncLoader() | ||
]); | ||
pendingToPath = to.path; | ||
} | ||
}); | ||
router.afterEach((to, from) => { | ||
if (to.path !== from.path && to.path === pendingToPath) { | ||
pageData.value = pendingPageData; | ||
} | ||
}); | ||
return router; | ||
@@ -149,3 +157,5 @@ }; | ||
); | ||
const pageLang = computed(() => resolvers.resolvePageLang(pageData.value)); | ||
const pageLang = computed( | ||
() => resolvers.resolvePageLang(pageData.value, siteLocaleData.value) | ||
); | ||
const pageLayout = computed( | ||
@@ -152,0 +162,0 @@ () => resolvers.resolvePageLayout(pageData.value, layouts.value) |
@@ -281,3 +281,3 @@ import { PageData, PageFrontmatter, HeadConfig, SiteData } from '@vuepress/shared'; | ||
resolvePageHeadTitle: (page: PageData, siteLocale: SiteLocaleData) => PageHeadTitle; | ||
resolvePageLang: (page: PageData) => PageLang; | ||
resolvePageLang: (page: PageData, siteLocale: SiteLocaleData) => PageLang; | ||
resolvePageLayout: (page: PageData, layouts: Layouts) => Component; | ||
@@ -284,0 +284,0 @@ resolveRouteLocale: (locales: SiteData['locales'], routePath: string) => RouteLocale; |
@@ -32,3 +32,3 @@ import { | ||
withBase | ||
} from "./chunk-X6BS2PXP.js"; | ||
} from "./chunk-IKARB3UY.js"; | ||
export { | ||
@@ -35,0 +35,0 @@ ClientOnly, |
{ | ||
"name": "@vuepress/client", | ||
"version": "2.0.0-beta.64", | ||
"version": "2.0.0-beta.65", | ||
"description": "Client package of VuePress", | ||
@@ -39,4 +39,4 @@ "keywords": [ | ||
"vue": "^3.3.4", | ||
"vue-router": "^4.2.2", | ||
"@vuepress/shared": "2.0.0-beta.64" | ||
"vue-router": "^4.2.4", | ||
"@vuepress/shared": "2.0.0-beta.65" | ||
}, | ||
@@ -43,0 +43,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34462
1128
1
+ Added@vuepress/shared@2.0.0-beta.65(transitive)
- Removed@vuepress/shared@2.0.0-beta.64(transitive)
Updatedvue-router@^4.2.4