fix(cli): fix anchor

This commit is contained in:
chenjiahan
2020-11-21 20:35:06 +08:00
parent 27c7d839c0
commit a13d43c802
4 changed files with 11 additions and 9 deletions
+5 -3
View File
@@ -88,9 +88,11 @@ export default {
},
mounted() {
if (this.$route.hash) {
scrollToAnchor(this.$route.hash);
}
setTimeout(() => {
if (this.$route.query.anchor) {
scrollToAnchor(this.$route.query.anchor);
}
});
},
methods: {