Prechádzať zdrojové kódy

显示当前题的分数

Michael Wang 3 rokov pred
rodič
commit
6249a9c19b
1 zmenil súbory, kde vykonal 33 pridanie a 9 odobranie
  1. 33 9
      src/features/mark/CommonMarkBody.vue

+ 33 - 9
src/features/mark/CommonMarkBody.vue

@@ -48,9 +48,29 @@
     <ZoomPaper v-if="store.isScanImage && store.currentTask" />
 
     <div class="kb-circle">
-      <span class="text">{{
-        store.currentSpecialTag || store.currentScore
-      }}</span>
+      <div
+        style="
+          text-align: center;
+          margin-top: -20px;
+          color: red;
+          font-weight: bold;
+          background-color: rgb(248, 250, 250);
+          height: 12px;
+          opacity: 0.7;
+        "
+      >
+        <!-- {{ store.currentQuestion?.title }} -->
+        {{ store.currentQuestion?.mainNumber }}-{{
+          store.currentQuestion?.subNumber
+        }}({{
+          store.currentTask?.markResult.scoreList[
+            store.currentQuestion?.__index || 0
+          ] || " "
+        }})
+      </div>
+      <div class="text">
+        {{ store.currentSpecialTag || store.currentScore }}
+      </div>
     </div>
   </div>
 </template>
@@ -565,13 +585,13 @@ let leftKB = $ref(10);
 const leftKBStyle = $computed(() => leftKB + "%");
 function moveCicle(event: KeyboardEvent) {
   // query mark-body-container and body to calc max/min topKB and max leftKB
-  if (event.key === "i") {
+  if (event.key === "k") {
     if (topKB > 1) topKB--;
   }
-  if (event.key === "k") {
+  if (event.key === "j") {
     if (topKB < 99) topKB++;
   }
-  if (event.key === "j") {
+  if (event.key === "h") {
     if (leftKB > 1) leftKB--;
   }
   if (event.key === "l") {
@@ -595,7 +615,7 @@ function giveScoreCicle(event: KeyboardEvent) {
     let { top, left } = circleElement.getBoundingClientRect();
     top = top + 45;
     left = left + 45;
-    console.log(top, left);
+    // console.log(top, left);
     // getBoundingClientRect().top left
     // capture => to the specific image
     const me = new MouseEvent("click", {
@@ -750,12 +770,16 @@ onUnmounted(() => {
   /* to click through div */
   pointer-events: none;
 
-  display: grid;
+  /* display: grid; */
 }
 
 .kb-circle .text {
   font-size: 2rem;
   color: #ff5050;
-  place-self: center;
+  margin-top: 10px;
+  display: block;
+  text-align: center;
+  width: 100%;
+  line-height: 90px;
 }
 </style>