| | |
| | | } |
| | | if (col.format === 'percent') { |
| | | content = content * 100 |
| | | if (!col.round) { |
| | | content = +content.toFixed(2) |
| | | } |
| | | } else if (col.format === 'abs') { |
| | | content = Math.abs(content) |
| | | } |
| | |
| | | content = '' |
| | | } |
| | | } else { |
| | | if (col.eval === 'false' && col.noValue === 'hide') { // 空值隐藏 |
| | | Object.keys(record).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (record[key]) return |
| | | |
| | | content = content.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '') |
| | | }) |
| | | } |
| | | |
| | | Object.keys(record).forEach(key => { |
| | | let reg = new RegExp('@' + key + '@', 'ig') |
| | | content = content.replace(reg, record[key]) |