您好,可以参考下面的代码:
- const baseCellPaint = GC.Spread.Sheets.CellTypes.Base.prototype.paint;
- GC.Spread.Sheets.CellTypes.Base.prototype.paint = function (ctx, value1, x1, y1, a1, b1, style, options) {
- let text = GC.Spread.Sheets.CellTypes.Base.prototype.format(value1,style.formatter)
- console.log('value',value1)
- console.log('formatter',style.formatter)
- console.log('text',text)
- baseCellPaint.call(this, ctx, value1, x1, y1, a1, b1, style, options);
- }
复制代码
结果如下:
|