UNPKG

@visactor/vtable

Version:

canvas table width high performance

45 lines (38 loc) 1.53 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: !0 }), exports.getFunctionalProp = exports.getRawProp = exports.getProp = void 0; const vutils_1 = require("@visactor/vutils"); function getProp(name, cellStyle, col, row, _table) { const prop = cellStyle && (0, vutils_1.isValid)(cellStyle[name]) ? cellStyle[name] : void 0; if ("function" == typeof prop) { return prop({ col: col, row: row, table: _table, value: _table.getCellValue(col, row), dataValue: _table.getCellOriginValue(col, row), cellHeaderPaths: _table.getCellHeaderPaths(col, row) }); } return prop; } function getRawProp(name, cellStyle, col, row, _table) { const prop = cellStyle && (0, vutils_1.isValid)(cellStyle[name]) ? cellStyle[name] : void 0; if ("function" != typeof prop) return prop; } function getFunctionalProp(name, cellStyle, col, row, _table) { const prop = cellStyle && (0, vutils_1.isValid)(cellStyle[name]) ? cellStyle[name] : void 0; if ("function" == typeof prop) { return prop({ col: col, row: row, table: _table, value: _table.getCellValue(col, row), dataValue: _table.getCellOriginValue(col, row), cellHeaderPaths: _table.getCellHeaderPaths(col, row) }); } } exports.getProp = getProp, exports.getRawProp = getRawProp, exports.getFunctionalProp = getFunctionalProp; //# sourceMappingURL=get-prop.js.map