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

61 lines (60 loc) 1.61 kB
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base'; import { isNullOrUndefined } from '@syncfusion/ej2-base'; export var SheetsDirective = 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-sheets'; } } }); export var SheetsPlugin = { name: 'e-sheets', install: function (Vue) { Vue.component(SheetsPlugin.name, SheetsDirective); } }; /** * `e-sheet` directive represent a sheet of the VueJS Spreadsheet. * It must be contained in a Spreadsheet component(`ejs-spreadsheet`). * ```vue * <ejs-spreadsheet> * <e-sheets> * <e-sheet></e-sheet> * <e-sheet></e-sheet> * </e-sheets> * </ejs-spreadsheet> * ``` */ export var SheetDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-sheet'; } } }); export var SheetPlugin = { name: 'e-sheet', install: function (Vue) { Vue.component(SheetPlugin.name, SheetDirective); } };