spread版本:13.0.0
下拉题因为选项过多,自定义了一个单元格类型,可以弹出窗口进行选择,该单元格的值是对象类型,页面上显示正常,打印时单元格上显示为[object Object]请问如何让打印也正常显示
效果图:
代码如下:
function create_select_window() { }
create_select_window.prototype = new GC.Spread.Sheets.CellTypes.Base();
create_select_window.prototype.createEditorElement = function (cell) {
//弹出窗口
};
create_select_window.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
// value 是一个object类型,{code: "...", name: "..."}
GC.Spread.Sheets.CellTypes.Base.prototype.paint.apply(this, [ctx, value.code, x, y, w, h, style, options]);
};
create_select_window.prototype.getEditorValue = function (editorContext) {
// 返回弹出窗口选择的对象
return {code: "...", name: "..."};
};
let myCellType = new create_select_window();
|
|