之前没用这套UI,今天踩坑记录一下。
Modal 对话框这样就可以修改默认图标,但是需求图标要是实心的,
confirm() {
this.$confirm({
title: 'Confirm',
content: '确认内容',
okText: '确认',
cancelText: '取消',
icon:'info-circle'
});
},
icon | 自定义图标(1.14.0 新增) | string|()=>VNode | <Icon type="question-circle"> |
可以通过VNode修改,但是之前没用过antdv,用之前其他UI的写法,都报错,最后改成实现需求效果
confirm() {
const h = this.$createElement;
this.$confirm({
title: 'Confirm',
content: '确认内容',
okText: '确认',
cancelText: '取消',
icon:() => h('a-icon', {
props: {
type: 'info-circle',
theme: 'filled'
},
})
});
},