Просмотр исходного кода

bug fix: 在切换场景时,不要画蛇添足地对场景列表调用scrollIntoView,否则会有外观bug。

任一存 2 лет назад
Родитель
Сommit
38e894deab
1 измененных файлов с 0 добавлено и 9 удалено
  1. 0 9
      src/components/UIGather/mobile/list.vue

+ 0 - 9
src/components/UIGather/mobile/list.vue

@@ -175,15 +175,6 @@ const currentScene = computed(() => store.getters["scene/currentScene"]);
 
 
 const isLargeScreen = window.innerWidth > 750
 const isLargeScreen = window.innerWidth > 750
 
 
-watch(currentScene, (newV, oldV) => {
-  nextTick(() => {
-    const activeLiElem = document.querySelector(`#scene-item-${newV.sceneCode}`)
-    if (activeLiElem) {
-      activeLiElem.scrollIntoView()
-    }
-  })
-})
-
 const currentCatalogRoot = computed(
 const currentCatalogRoot = computed(
   () => store.getters["scene/currentCatalogRoot"]
   () => store.getters["scene/currentCatalogRoot"]
 );
 );