@opensig/opendesign
Version:
37 lines (36 loc) • 1.03 kB
JavaScript
;
const vue = require("vue");
const vueUtils = require("../_utils/vue-utils.js");
const _hoisted_1 = { class: "o-table-cell__inner-content" };
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "TableCellRenderer",
props: {
row: {},
column: {},
cellValue: {},
rowIndex: {},
colIndex: {}
},
setup(__props) {
const props = __props;
const renderContent = vue.computed(() => {
const { row, column, cellValue, rowIndex, colIndex } = props;
const { formatter } = column;
const formatterOptions = {
row,
column,
cellValue,
rowIndex,
colIndex
};
const content = formatter(formatterOptions);
return vueUtils.getRenderableComponent(content);
});
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("span", _hoisted_1, [
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderContent.value)))
]);
};
}
});
module.exports = _sfc_main;