代码:
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 } }
效果图: