Browse Source

style welcome modal

Michael Wang 6 years ago
parent
commit
1f2e0af469
2 changed files with 23 additions and 11 deletions
  1. 23 11
      src/features/OnlineExam/OnlineExamHome.vue
  2. BIN
      src/features/OnlineExam/smile-icon.png

+ 23 - 11
src/features/OnlineExam/OnlineExamHome.vue

@@ -38,18 +38,20 @@ export default {
     this.$nextTick(() => {
       if (this.previousUrl.startsWith("/login/")) {
         this.$Modal.info({
-          title: "欢迎",
           render: () => (
-            <div>
-              <div style="font-weight:bold">
-                {this.$store.state.user.name} -{" "}
-                {this.$store.state.user.studentCode}
-              </div>
-              <div style="font-weight:bold">
-                专业:{this.$store.state.user.specialty}{" "}
-              </div>
-              <div style="margin-top: 1.5em">
-                欢迎使用考试系统,祝顺利完成考试!
+            <div class="welcome-modal">
+              <div class="smile-png" />
+              <div style="margin-left: 20px">
+                <div style="margin-bottom: 1.5em">
+                  欢迎使用考试系统,祝顺利完成考试!
+                </div>
+                <div style="font-weight:bold; line-height: 25px;">
+                  姓名:{this.$store.state.user.name} -{" "}
+                  {this.$store.state.user.studentCode}
+                </div>
+                <div style="font-weight:bold; line-height: 25px;">
+                  专业:{this.$store.state.user.specialty}{" "}
+                </div>
               </div>
             </div>
           )
@@ -76,4 +78,14 @@ export default {
 .home {
   margin: 20px;
 }
+.welcome-modal {
+  display: flex;
+  margin-top: 26px;
+  margin-left: 20px;
+}
+.smile-png {
+  width: 40px;
+  height: 40px;
+  background: url(./smile-icon.png);
+}
 </style>

BIN
src/features/OnlineExam/smile-icon.png