Forráskód Böngészése

feature(优化): 通知公告弹窗样式修改

ZZH-wl 2 éve
szülő
commit
0b906db3bd
2 módosított fájl, 15 hozzáadás és 14 törlés
  1. 4 14
      src/App.vue
  2. 11 0
      src/vab/styles/vab.scss

+ 4 - 14
src/App.vue

@@ -95,24 +95,14 @@
         if (data.type === 'SendMessage' && data.content.body) {
           this.$baseEventBus.$emit('receivedMessage')
           let msg = JSON.parse(item).content.body
-          const h = this.$createElement
-          let tag = {
-            style: {
-              cursor: 'pointer',
-            },
-            on: {
-              click: () => {
-                // this.handleItem(data.content.body)
-              },
-            },
-          }
           this.$notify({
             title: msg.msgTitle,
             position: 'top-right',
-            type: 'warning',
-            duration: 5000,
+            type: 'info',
+            customClass: 'notify-msg',
+            duration: 1000 * 60 * 5,
             dangerouslyUseHTMLString: true,
-            message: h('div', {}, [h('div', tag, msg.msgContent)]),
+            message: msg.msgContent,
           })
         }
       },

+ 11 - 0
src/vab/styles/vab.scss

@@ -44,16 +44,19 @@ html {
     background: $base-color-background;
     -webkit-font-smoothing: antialiased;
     -moz-osx-font-smoothing: grayscale;
+
     p,
     h3,
     h4 {
       margin: 0;
     }
+
     ul {
       margin: 0;
       padding: 0;
       list-style: none;
     }
+
     #app {
       height: 100vh;
       overflow: auto;
@@ -82,6 +85,7 @@ html {
           }
         }
       }
+
       .el-pagination {
         text-align: right;
       }
@@ -435,6 +439,7 @@ html {
       .vab-app-main {
         padding: calc(#{$base-padding} - 5px) !important;
         padding-bottom: 0;
+
         .el-card {
           margin-bottom: calc(#{$base-margin} - 5px) !important;
         }
@@ -504,5 +509,11 @@ html {
         }
       }
     }
+
+    .el-notification.notify-msg {
+      width: 600px !important;
+      max-height: 100vh;
+      overflow: auto;
+    }
   }
 }