mint-ui 全局使用 MessageBox

項目中出於方便,類似 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
      })

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章