使用:
error => {
console.log('request error' + error)
// for debug
Message({
message: error.message,
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error)
})
Message对象会生成弹出信息栏
以下六种提示类型:
/** Show an info message */
(text: string): ElMessageComponent
/** Show message */
(options: ElMessageOptions): ElMessageComponent
/** Show a success message */
success (text: string): ElMessageComponent
/** Show a warning message */
warning (text: string): ElMessageComponent
/** Show an info message */
info (text: string): ElMessageComponent
/** Show an error message */
error (text: string): ElMessageComponent