diff --git a/src/layout/components/TagsView/ScrollPane.vue b/src/layout/components/TagsView/ScrollPane.vue index d57d2ddba6f229d478f7991be88dbb467bd3d4be..e91a6fe191f8c6f6f4c2751677375f8eee962bbd 100644 --- a/src/layout/components/TagsView/ScrollPane.vue +++ b/src/layout/components/TagsView/ScrollPane.vue @@ -15,7 +15,7 @@ import { computed, onMounted, onBeforeUnmount, - getCurrentInstance, + getCurrentInstance } from 'vue'; import useStore from '@/store'; import { TagView } from '@/store/modules/types'; @@ -32,7 +32,9 @@ const { tagsView } = useStore(); const visitedViews = computed(() => tagsView.visitedViews); -const scrollWrapper = computed(() => proxy?.$refs.scrollContainer.$refs.wrap$); +const scrollWrapper = computed( + () => proxy?.$refs.scrollContainer.$refs.wrapRef +); onMounted(() => { scrollWrapper.value.addEventListener('scroll', emitScroll, true); @@ -68,7 +70,7 @@ function moveToTarget(currentTag: TagView) { } else { const tagListDom = document.getElementsByClassName('tags-view__item'); const currentIndex = visitedViews.value.findIndex( - (item) => item === currentTag + item => item === currentTag ); let prevTag = null; let nextTag = null; @@ -107,7 +109,7 @@ function moveToTarget(currentTag: TagView) { } defineExpose({ - moveToTarget, + moveToTarget });