element-ui message 显示重叠问题
生活随笔
收集整理的這篇文章主要介紹了
element-ui message 显示重叠问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
問題描述:在同一個方法中,觸發(fā)了多個 message 組件提示信息時,會出現(xiàn)消息重疊的問題。
解決方案:將方法定義為?async?異步函數(shù),然后使用?await?等待執(zhí)行。
async checkLogin () {if (this.username === '') {await this.$message.warning('請輸入用戶名')}if (this.password === '') {await this.$message.warning('請輸入用戶密碼')} }更多解決方案:請參考?element-ui Notification重疊問題,原因及解決辦法。
總結(jié)
以上是生活随笔為你收集整理的element-ui message 显示重叠问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Android Pie源码阅读 ----
- 下一篇: 测试一个教室和一个椅子