Browse Source

题卡预览页展示客观题标签

zhangjie 3 years ago
parent
commit
b5d6975b71
2 changed files with 40 additions and 34 deletions
  1. 0 34
      card/assets/styles/card-design.scss
  2. 40 0
      card/assets/styles/card-preview.scss

+ 0 - 34
card/assets/styles/card-design.scss

@@ -140,40 +140,6 @@
         }
       }
     }
-
-    // 客观题强调标记
-    .elem-fill-question {
-      &::before {
-        content: "";
-        position: absolute;
-        right: 0;
-        top: 0;
-        z-index: 99;
-        color: #fff;
-        padding: 6px 10px;
-        line-height: 1;
-        font-size: 18px;
-        border-bottom-left-radius: 10px;
-      }
-    }
-    .elem-fill-question-simple {
-      &::before {
-        content: "单选";
-        background-color: mix(#fff, $--color-success, 20%);
-      }
-    }
-    .elem-fill-question-multiply {
-      &::before {
-        content: "多选";
-        background-color: $--color-primary-light;
-      }
-    }
-    .elem-fill-question-boolean {
-      &::before {
-        content: "判断";
-        background-color: mix(#fff, $--color-warning, 20%);
-      }
-    }
   }
 
   // page-main-outer

+ 40 - 0
card/assets/styles/card-preview.scss

@@ -19,6 +19,12 @@
     box-shadow: none;
     page-break-after: always;
   }
+  // 印刷模式:隐藏客观题强调标记
+  .elem-fill-question {
+    &::before {
+      display: none;
+    }
+  }
 }
 
 // page-box
@@ -1030,6 +1036,40 @@
 // elem-fill-question
 .elem-fill-question {
   white-space: normal;
+
+  // 客观题强调标记
+  &::before {
+    content: "";
+    position: absolute;
+    right: 0;
+    top: 0;
+    z-index: 99;
+    color: #fff;
+    padding: 6px 10px;
+    line-height: 1;
+    font-size: 18px;
+    border-bottom-left-radius: 10px;
+  }
+
+  &-simple {
+    &::before {
+      content: "单选";
+      background-color: mix(#fff, $--color-success, 20%);
+    }
+  }
+  &-multiply {
+    &::before {
+      content: "多选";
+      background-color: $--color-primary-light;
+    }
+  }
+  &-boolean {
+    &::before {
+      content: "判断";
+      background-color: mix(#fff, $--color-warning, 20%);
+    }
+  }
+
   .elem-body {
     padding: 18px 0 18px 16px;
   }