ANTD模态 - 确认标题文字样式
我想在确认函数的标题字段中显示一些动态文本为粗体,但是它给了我[对象对象]。我如何解决它,请告知。
import { Modal} from 'antd'
const { confirm } = Modal
confirm({
title:
'Are you sure you want to delete ' +
<b>{name}</b> +
' ? This action cannot be undone.',
icon: <ExclamationCircleOutlined />,
async onOk() {}
},
onCancel() {
console.log('Cancel')
},
})
}
谢谢
I want to show some of the dynamic text as bold in title field of confirm function, but it's giving me [object object]. How I can resolve it, please advised.
import { Modal} from 'antd'
const { confirm } = Modal
confirm({
title:
'Are you sure you want to delete ' +
<b>{name}</b> +
' ? This action cannot be undone.',
icon: <ExclamationCircleOutlined />,
async onOk() {}
},
onCancel() {
console.log('Cancel')
},
})
}
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
title
prop可以是一个反应节点,因此您可以做:The
title
prop can be a ReactNode so you can do: