Commit 33ab7437986f94169ab55abb88489ce2b62aff0b

Authored by Aresn
Committed by GitHub
2 parents 7dc6a8c3 93896627

Merge pull request #4014 from lison16/anchor

修复点击anchor-link后再滚动,然后点击刚刚点击的link,页面没有滚动反应的bug
Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
src/components/anchor/anchor-link.vue
@@ -39,6 +39,8 @@ export default { @@ -39,6 +39,8 @@ export default {
39 methods: { 39 methods: {
40 goAnchor () { 40 goAnchor () {
41 this.currentLink = this.href; 41 this.currentLink = this.href;
  42 + this.anchorCom.handleHashChange();
  43 + this.anchorCom.handleScrollTo();
42 this.anchorCom.$emit('on-select', this.href); 44 this.anchorCom.$emit('on-select', this.href);
43 const isRoute = this.$router; 45 const isRoute = this.$router;
44 if (isRoute) { 46 if (isRoute) {