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 + } }) } }