在element表格中,需要有一列添加上% 后端只返回了数字 没有返回%号 要求我这边加上 求啊
收起
第一种在你要添加%的数据中el-table-column 添加
<template slot-scope="scope"> <span>{{scope.row.XXXXX}}%</span> </template>
第二种则是在这条数据中添加:formatter="batteryformatter"然后在methods中添加
batteryformatter(row) { return row.XXXX+ "%"; },
报告相同问题?