UNPKG

@syncfusion/ej2-vue-spreadsheet

Version:

Feature-rich JavaScript Spreadsheet (Excel) control with built-in support for selection, editing, formatting, importing and exporting to Excel for Vue

68 lines (67 loc) 1.68 kB
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base'; import { isNullOrUndefined } from '@syncfusion/ej2-base'; export var CellsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-cells'; } } }); export var CellsPlugin = { name: 'e-cells', install: function (Vue) { Vue.component(CellsPlugin.name, CellsDirective); } }; /** * `e-cell` directive represent a cell of the VueJS Spreadsheet. * It must be contained in a `e-row` directive. * ```vue * <ejs-spreadsheet> * <e-sheets> * <e-sheet> * <e-rows> * <e-row> * <e-cells> * <e-cell value='A1'></e-cell> * </e-cells> * </e-row> * </e-rows> * </e-sheet> * </e-sheets> * </ejs-spreadsheet> * ``` */ export var CellDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-cell'; } } }); export var CellPlugin = { name: 'e-cell', install: function (Vue) { Vue.component(CellPlugin.name, CellDirective); } };