在iview中table组件使用render函数渲染列数据的时候jsx的方式渲染组件标签失败。
return h('Button', {
props: {
type: 'warning',
size: 'small',
icon: 'checkmark-circled'
},
style: {
marginRight: '5px'
},
on: {
click: (e) => {
}
}
}, '查看详情')
这样的函数方式可以正常渲染按钮
return (
<div>
<i-button type="primary" icon="checkmark-circled">启用</i-button>
</div>
)
这样jxs的方式渲染结果为空
普通的button或者html标签在jsx却可以渲染成功。
遇到过的兄dei麻烦看看。。
这种方式下,应该用i-button

iview中很多标签存在这个问题,一般这种名字和原生HTML一样的标签,都要这样,具体看下文档