vxe-table的render寫法中添加element ui的組件


使用的是vxe-table的表格組件,但是項目中主要還是使用element ui的組件,如下要在vxe-table表格中添加評分組件:

 

 

this.columns = [
                {
                    title: '序號', type: 'seq', width: 80 } { title: '滿意度評價', field: 'rateVal', minWidth: 200, maxWidth: 200, cellRender: { name: 'rateVal_1' } } ]

let _this = this; VXETable.renderer.mixin({ "rateVal_1": { renderDefault(h, renderOpts, params) { let { row, column } = params; return [ h('el-rate', { attrs: { value: row.rateVal, disabled: true, "disabled-void-color": "rgb(205, 205, 205)", colors: { 1: 'rgb(229, 92, 92)', 3: { value: 'rgb(255, 152, 0)', excluded: true }, 5: 'rgb(42, 139, 253)' } } }, row.rateVal ), ] } } })

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM