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

 

效果图:

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM