tangning 1 年之前
父節點
當前提交
a0d4c47011
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/App.vue
  2. 2 2
      src/components/imgLoading.vue

+ 1 - 1
src/App.vue

@@ -16,7 +16,7 @@ onMounted(() => {
   watchEffect(() => {
     if (instance.proxy.$refs.fullpage) {
       fullpage.value = instance.proxy.$refs.fullpage;
-      // fullpage.value.api.setAllowScrolling(false);
+      fullpage.value.api.setAllowScrolling(false);
     }
   });
 });

+ 2 - 2
src/components/imgLoading.vue

@@ -30,8 +30,8 @@ const progress = ref(0);
 const framePro = ref(0)
 const imgPro = ref(0)
 watchEffect(() => {
-    if (progress.proxy.$refs.fullpage) {
-      fullpage.value = instance.proxy.$refs.fullpage;
+    if (props.fullpage && progress.value == 100) {
+        props.fullpage.api.setAllowScrolling(true);
     }
   });
 emitter.on("updatePress", (val) => {