修复点击anchor-link后再滚动,然后点击刚刚点击的link,页面没有滚动反应的bug

This commit is contained in:
zhigang.li 2018-07-02 18:17:15 +08:00
parent cf9a399e7e
commit 938966275f

View file

@ -39,6 +39,8 @@ export default {
methods: { methods: {
goAnchor () { goAnchor () {
this.currentLink = this.href; this.currentLink = this.href;
this.anchorCom.handleHashChange();
this.anchorCom.handleScrollTo();
this.anchorCom.$emit('on-select', this.href); this.anchorCom.$emit('on-select', this.href);
const isRoute = this.$router; const isRoute = this.$router;
if (isRoute) { if (isRoute) {