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;
 
       data.height = height;
-      data.width = height * 0.8 * 2;
+      data.width = height * (210 / 297) * 2;
       book.turn({
         autoCenter: true,
         duration: 1000,
@@ -133,7 +133,7 @@ export default defineComponent({
     });
     const getList = () => {
       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)
       const list = [];
       let listItem = [] as any[];