|
|
@@ -241,7 +241,13 @@ function scatterConfig(option, silent) {
|
|
|
function tableConfig(option, silent) {
|
|
|
const { columns, data } = option;
|
|
|
let o = {
|
|
|
- columns,
|
|
|
+ columns: columns.map(c => {
|
|
|
+ if(c.dataIndex === 'percent') {
|
|
|
+ return { ...c, render: (value, record, index) => {console.log(record);return ((+value*100).toFixed(2)) + '%'} };
|
|
|
+ }else {
|
|
|
+ return c;
|
|
|
+ }
|
|
|
+ }),
|
|
|
data: data.map((d, i) => {
|
|
|
return { ...d, key: i}
|
|
|
})
|