perf[tagsView]: refactor the moveToTarget function (#1195)

* fix[tagsView]:fixed visited view move to currentTag

* edit the scroll regular friendly

* tweak
This commit is contained in:
frank10000
2018-10-16 10:56:01 +08:00
committed by 花裤衩
parent 0f6d830c19
commit 96bda5515c
2 changed files with 47 additions and 11 deletions

View File

@@ -75,8 +75,8 @@ export default {
const tags = this.$refs.tag
this.$nextTick(() => {
for (const tag of tags) {
if (tag.to.path === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag.$el)
if (tag.to === this.$route.fullPath) {
this.$refs.scrollPane.moveToTarget(tag)
// when query is different then update
if (tag.to.fullPath !== this.$route.fullPath) {