Michael Wang 3 gadi atpakaļ
vecāks
revīzija
d7041be9e1

+ 4 - 2
src/App.vue

@@ -66,8 +66,10 @@ export default defineComponent({
   position: absolute;
   top: 0;
   left: 0;
-  height: 100vh;
-  width: 100vw;
+  height: 100%;
+  /* 不知道为啥在窗口宽度小于#app min-width 的时候,遮罩层覆盖不全 */
+  width: 200%;
+  overflow: hidden;
   display: flex;
   place-content: center;
   align-items: center;

+ 4 - 3
src/features/mark/MarkBoardTrack.vue

@@ -46,13 +46,14 @@
         height: calc(100vh - 56px - 200px);
         overflow: hidden;
         user-select: none;
+        position: relative;
       "
     >
       <div
         v-if="store.currentTask && store.currentTask.questionList"
         class="
           tw-flex
-          tw-gap-1
+          tw-gap-2
           tw-flex-wrap
           tw-justify-between
           tw-overflow-auto
@@ -386,8 +387,8 @@ function submit() {
   font-size: 32px;
 }
 .question {
-  min-width: 120px;
-  max-width: 120px;
+  min-width: 110px;
+  max-width: 110px;
   min-height: 72px;
   padding: 10px;
   /* border: 1px solid grey; */

+ 2 - 3
src/features/mark/use/splitPane.ts

@@ -2,7 +2,7 @@ import { onMounted, onUnmounted, ref, watchEffect } from "vue";
 
 export function dragSplitPane() {
   let pos = { y: 0 };
-  const dragSpliter = ref((null as unknown) as HTMLDivElement);
+  const dragSpliter = ref(null as unknown as HTMLDivElement);
   let topPercent = ref(30);
 
   const mouseDownHandler = function (e: MouseEvent) {
@@ -63,8 +63,7 @@ export function dragSplitPane() {
     // TODO: 暂时不知道为啥有 140
     if (parent)
       topPercent.value =
-        (100 * (target.offsetTop - 140)) /
-        parseFloat(getComputedStyle(parent).height);
+        (100 * target.offsetTop) / parseFloat(getComputedStyle(parent).height);
     // console.log({
     //   topPercent: topPercent.value,
     //   "parseFloat(getComputedStyle(parent).height)": parseFloat(