icon 自定义图标(1.14.0 新增) string|()=>VNode
一、利用自带的icon赋值个默认的icon名字就可以了,但是有时候我们需要用到实底风格的icon,所以只能用()=>VNode

this.$confirm({
    title: '确认设置当前位置为出险地点?',
    content: this.infoWindow.contents,
    icon: 'exclamation-circle',
    onOk: () => {
        this.onMapClose();
        console.log('点击确认')
    },
    onCancel() {
    },
});

二、通过()=>VNode修改

this.$confirm({
    title: '确认设置当前位置为出险地点?',
    content: this.infoWindow.contents,
    icon: () => this.$createElement('a-icon', {
        props: {
            type: 'exclamation-circle',
            theme: 'filled'
        },
    }),
    onOk: () => {
        this.onMapClose();
        console.log('点击确认')
    },
    onCancel() {
    },
}); 
版权声明:本文为李维亮博主的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:http://www.liweiliang.com/1076.html

标签: none

评论已关闭