this.$createElement用法

this.$createElement创建元素

 

import CfUpload from '_cf/CfUpload/index'//图片组件 
 
detailColumns: [
                    {
                        title: '图片',
                        key: 'img',
                        align: 'center',
                        width:100,
                        render: (h, params) => {
                            return this.$createElement(CfUpload, {
                                props: {
                                    imgCodeList: [params.row.img],
                                    isView: true
                                },
                                key: `Img${params.index}${params.row.accessoryRequisitionsId}`
                            })
                        }
                    },
]
 
 
const h=this.$createElement
this.$notify({
  title:'标题',
  message:h('div',{on:{click:handleClick},'查看详情'),
  dangerouslyUseHTMLString:true
})
posted @ 2020-07-16 10:41  苏小白啊  阅读(7932)  评论(0编辑  收藏  举报