vant icon indicating copy to clipboard operation
vant copied to clipboard

Dialog组件在接口请求使用的时候,message..

Open YingZzz opened this issue 7 years ago • 2 comments

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可以人为的折行?

YingZzz avatar May 06 '19 03:05 YingZzz

直接使用 \n 换行符就可以换行

chenjiahan avatar May 06 '19 08:05 chenjiahan

直接使用 \n 换行符就可以换行

好的,谢谢..

YingZzz avatar May 06 '19 09:05 YingZzz