2020
11-03
11-03
vue element-ui中table合计指定列求和实例
注意点:1.<el-table>中加:summary-method="getSummaries"2.<el-table-column>中要加prop//房间号的合计去掉getSummaries(param){const{columns,data}=paramconstsums=[]columns.forEach((column,index)=>{if(index===0){sums[index]='总计'}elseif(index===5||index===6){constvalues=data.map(item=>Number(item[column.property]))if(!values.every(value=>i...
继续阅读 >