vue—message消息提示


this.$message({
    type: 'success'/'warning'/'error'/'info',
    message: '消息提示內容',
    showClose: true/false,
    duration: Number,
    center: true/false,
    dangerouslyUseHtmlString: true/false      
})

type:定義消息提示框的不同狀態,默認為info

message:消息提示內容

showClose:默認的message是不可以手動關閉的,如果需要手動關閉,設置showClose為true,一般與duration搭配使用

duration:顯示時間, 毫秒。設為 0 則不會自動關閉,默認3000ms

center:是否居中

dangerouslyUseHTMLString:將此屬性設置為true,message會被當成html片段處理

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM