Commit 92d60088 authored by helondeng's avatar helondeng Committed by 杨奕

Table: add value as formatter parameter (#5709)

* 添加接口计算原来的列值

* export old value of column in formatter function

* Update table-column.js

* Update table-column.js
parent b1c67d51
......@@ -97,15 +97,13 @@ const getDefaultColumn = function(type, options) {
const DEFAULT_RENDER_CELL = function(h, { row, column }) {
const property = column.property;
const value = property && property.indexOf('.') === -1
? row[property]
: getValueByPath(row, property);
if (column && column.formatter) {
return column.formatter(row, column);
return column.formatter(row, column, value);
}
if (property && property.indexOf('.') === -1) {
return row[property];
}
return getValueByPath(row, property);
return value;
};
export default {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment