Ant Design Vue 列内容columns中customRender 返回一个自定义组件的写法
作者:互联网
代码:
element.customRender = (text, row, index) => { if (index === 0) { return { children: this.$createElement(MixSearch, { props: { name: 'purchaseProduct', placeholder: '请输入商品名称/编码/条码', width: '100%', valueMode: true, value: {}, next: () => { return this.chooseProductValid(null, null) } }, on: { change: args => { this.confirmHandleOfProduct('footer', args) } } }), attrs: { colSpan: colspanLen } } } else { return text } }
效果图:
标签:index,Vue,return,自定义,text,args,Ant,customRender,null 来源: https://www.cnblogs.com/feng-xl/p/15269301.html