在antdv中的notification中,加入换行格式
原创首先,要明确的是,antdv的notification如果组件需要换行,可使用ES6的 ` 符号+换行符,以及css设置whiteSpace: pre-wrap’属性,用于标识换行符。/n,可以实现断线效果。
具体代码如下:
定义弹出notification的方法:
openNotification(title, message) {
this.$notification.open({
message: title,
description: message,
onClick: () => {
},
style: {
//width: 600px,
whiteSpace: pre-wrap,
},
});
},
与换行符一起使用:
版权声明
所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除