UNPKG

@syncfusion/ej2-vue-layouts

Version:

A package of Essential JS 2 layout pure CSS components such as card and avatar. The card is used as small container to show content in specific structure, whereas the avatars are icons, initials or figures representing particular person. for Vue

61 lines (60 loc) 1.64 kB
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base'; import { isNullOrUndefined } from '@syncfusion/ej2-base'; export var PanelsDirective = 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-panels'; } } }); export var PanelsPlugin = { name: 'e-panels', install: function (Vue) { Vue.component(PanelsPlugin.name, PanelsDirective); } }; /** * 'e-panels' directive represent a presets of VueJS dashboardlayout component * It must be contained in a dashboardlayout component(`ejs-dashboardlayout`). * ```html * <ejs-dashboardlayout> * <e-panels> * <e-panel></e-panel> * <e-panel></e-panel> * </e-panels> * </ejs-dashboardlayout> * ``` */ export var PanelDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-panel'; } } }); export var PanelPlugin = { name: 'e-panel', install: function (Vue) { Vue.component(PanelPlugin.name, PanelDirective); } };