vant
vant copied to clipboard
Dialog组件在接口请求使用的时候,message..
IMPORTANT: Please use the following link to create a new issue. If your issue was not created using the app above, it will be closed immediately.
注意:请按照下面的模板来新建 issue,不规范的 issue 会被立即关闭.
What problem does this feature solve? Dialog组件在接口请求使用的时候,message不可以人为折行
Describe the solution you'd like
instance.interceptors.response.use(
response => {
return response
},
error => {
console.log(error.response)
let { status, statusText } = error.response
let errortext = codeMessage[status] || statusText
Dialog.alert({
title: `请求错误 ${status}`,
message: error.config.url + ' ' + errortext
})
return Promise.reject(error)
}
)
What does the proposed API look like? 不知道有没有办法,在Dialog非组件的情况下,message可以人为的折行?
直接使用 \n 换行符就可以换行
直接使用
\n换行符就可以换行
好的,谢谢..