liushengqiang преди 2 години
родител
ревизия
085a72b00f
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/views/courseware-list/component/book/index.tsx

+ 2 - 2
src/views/courseware-list/component/book/index.tsx

@@ -64,7 +64,7 @@ export default defineComponent({
       const height = document.body.clientHeight * 0.8;
       const height = document.body.clientHeight * 0.8;
 
 
       data.height = height;
       data.height = height;
-      data.width = height * 0.8 * 2;
+      data.width = height * (210 / 297) * 2;
       book.turn({
       book.turn({
         autoCenter: true,
         autoCenter: true,
         duration: 1000,
         duration: 1000,
@@ -133,7 +133,7 @@ export default defineComponent({
     });
     });
     const getList = () => {
     const getList = () => {
       if (!props.bookData?.lessonList) return;
       if (!props.bookData?.lessonList) return;
-      const step = (document.body.clientHeight * 0.8 - 40) / 50;
+      const step = Math.floor((document.body.clientHeight * 0.8 - 40) / 50);
       console.log("🚀 ~ step:", step)
       console.log("🚀 ~ step:", step)
       const list = [];
       const list = [];
       let listItem = [] as any[];
       let listItem = [] as any[];