element table表格show-summary不生效
<el-tablev-loading="listLoading"
:data="list"
element-loading-text="Loading"
fit
border
show-summary
highlight-current-row
@row-click="rowClick"
>
<el-table-column label="入库单号" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.pushNo }}</span>
</template>
</el-table-column>
<el-table-column label="序号" width="90">
<template slot-scope="scope">
<span>{{ scope.row.serialNumber }}</span>
</template>
</el-table-column>
<el-table-column label="入库类型">
<template slot-scope="scope">
<template v-for="(item, index) in codeList.inboundTypeList">
<span
v-if="item.value.toString() === scope.row.pushType && item.predId != ''"
:key="index"
>{{ item.text }}</span>
</template>
</template>
</el-table-column>
<el-table-column label="品名" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.goodsName }}</span>
</template>
</el-table-column>
<el-table-column label="仓位" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.shippingNo }}</span>
</template>
</el-table-column>
<el-table-column label="存匹数">
<template slot-scope="scope">
<span>{{ scope.row.pushPieces }}</span>
</template>
</el-table-column>
<el-table-column label="存数量">
<template slot-scope="scope">
<span>{{ scope.row.pushCount }}</span>
</template>
</el-table-column>
<el-table-column label="客户编号">
<template slot-scope="scope">
<span>{{ scope.row.customerNo }}</span>
</template>
</el-table-column>
<el-table-column label="客户名称">
<template slot-scope="scope">
<span>{{ scope.row.customerName }}</span>
</template>
</el-table-column>
<el-table-column label="订单号" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ scope.row.orderNo }}</span>
</template>
</el-table-column>
回答
el-table-column上要绑定prop
你的表格使用了template
模版显示数据,这个table
就不自动合计就不生效,不显示了,你只需要将template
去掉,就直接在el-table-column上
绑定prop
就可以了,但是如果你不该目前结果,你就需要传入summary-method
,这个方法可以定义自己的合计逻辑。
以上是 element table表格show-summary不生效 的全部内容, 来源链接: utcz.com/a/30674.html