this.$createElement用法

时间:2020-07-16 12:55:27   收藏:0   阅读:639

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
})

原文:https://www.cnblogs.com/wssdx/p/13321355.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!