項目中出於方便,類似 MessageBox 常規組件會選擇全局引用,但是,初次接觸 mint-ui 的寶寶發現當使用
this.$MessageBox({
title: '提示',
message: '確定執行此操作?',
showCancelButton: true
})
這時會報錯
Error in event handler for "click": "TypeError: this.$MessageBox is not a function"
試着this.$MessageBox 改爲this.$messageBox 依然同樣錯誤,最後爲 this.$messagebox
this.$messagebox({
title: '提示',
message: '確定執行此操作?',
showCancelButton: true
})