From 27c7d839c0385955fd1cf77dafc19f80e08827d6 Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Sat, 21 Nov 2020 20:34:00 +0800 Subject: [PATCH] fix(@vant/markdown-loader): anchor not work --- packages/vant-markdown-loader/package.json | 2 +- packages/vant-markdown-loader/src/index.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/vant-markdown-loader/package.json b/packages/vant-markdown-loader/package.json index 401ab6cc7..de49dcd59 100644 --- a/packages/vant-markdown-loader/package.json +++ b/packages/vant-markdown-loader/package.json @@ -1,6 +1,6 @@ { "name": "@vant/markdown-loader", - "version": "3.0.0", + "version": "3.0.1", "description": "Simple and fast vue markdown loader", "main": "src/index.js", "publishConfig": { diff --git a/packages/vant-markdown-loader/src/index.js b/packages/vant-markdown-loader/src/index.js index 301ba7ead..bb903d2e7 100644 --- a/packages/vant-markdown-loader/src/index.js +++ b/packages/vant-markdown-loader/src/index.js @@ -29,8 +29,10 @@ export default { scrollToAnchor(event) { if (event.target.id) { this.$router.push({ - path: this.$route.path, - hash: event.target.id + name: this.$route.name, + query: { + anchor: event.target.id + } }) } }