From 23e39d8b2e8c153b77b92f81e6fd46d210321c65 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 12 Apr 2021 11:03:27 +0800 Subject: [PATCH] docs: keep current path when switching versions --- antdv-demo/components/header.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/antdv-demo/components/header.vue b/antdv-demo/components/header.vue index 1234179ed2..83bdc2e241 100644 --- a/antdv-demo/components/header.vue +++ b/antdv-demo/components/header.vue @@ -64,6 +64,9 @@ export default { this.value = val; }, closeTopBanner() {}, + changeVersion() { + location.href = `https://2x.antdv.com${this.$route.fullPath}`; + }, }, render() { const name = this.name; @@ -179,7 +182,7 @@ export default { {packageInfo.version} - (location.href = 'https://2x.antdv.com')}> + 2.x