Browse Source

动画没结束之前,还能下一页

黄琪勇 6 tháng trước cách đây
mục cha
commit
ac0d0f3fdd
3 tập tin đã thay đổi với 16 bổ sung7 xóa
  1. 1 1
      public/version.json
  2. 14 5
      src/views/attend-class/index.tsx
  3. 1 1
      vite.config.ts

+ 1 - 1
public/version.json

@@ -1 +1 @@
-{"version":1734921568773}
+{"version":1735191389349}

+ 14 - 5
src/views/attend-class/index.tsx

@@ -222,7 +222,8 @@ export default defineComponent({
       pptEl: null as any,
       slidesLen: 1,
       activeLen: 0,
-      disable: false
+      disable: false,
+      isAnimationed: true
     });
 
     const activeData = reactive({
@@ -892,7 +893,7 @@ export default defineComponent({
           return;
         } else if (
           type === 'down' &&
-          pptData.activeLen < pptData.slidesLen - 1
+          (pptData.activeLen < pptData.slidesLen - 1 || !pptData.isAnimationed)
         ) {
           pptData.pptEl?.handleChangeSlide('next');
           return;
@@ -1239,7 +1240,10 @@ export default defineComponent({
     const isDownArrow = computed(() => {
       if (data.coursewareType === 'PPT') {
         if (pptData.disable) return false;
-        if (pptData.activeLen < pptData.slidesLen - 1) {
+        if (
+          pptData.activeLen < pptData.slidesLen - 1 ||
+          !pptData.isAnimationed
+        ) {
           return true;
         }
       }
@@ -1977,13 +1981,18 @@ export default defineComponent({
                           onInit={() => {
                             pptData.disable = true;
                           }}
-                          onInitPPT={({ slidesLen }) => {
+                          onInitPPT={({ slidesLen, isAnimationed }) => {
                             pptData.disable = false;
                             pptData.slidesLen = slidesLen;
+                            pptData.isAnimationed = isAnimationed;
                             pptData.activeLen = 0;
                           }}
-                          onChangeSlideIndex={({ slideIndex }) => {
+                          onChangeSlideIndex={({
+                            slideIndex,
+                            isAnimationed
+                          }) => {
                             pptData.activeLen = slideIndex;
+                            pptData.isAnimationed = isAnimationed;
                           }}
                           instrumentId={data.instrumentId}
                           pptData={m}></PptList>

+ 1 - 1
vite.config.ts

@@ -23,7 +23,7 @@ function resolve(dir: string) {
 }
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
-const proxyUrl = 'https://dev.kt.colexiu.com/';
+const proxyUrl = 'https://test.kt.colexiu.com/';
 // const proxyUrl = 'https://test.kt.colexiu.com';
 // const proxyUrl = 'http://192.168.3.14:7989';
 const now = new Date().getTime();