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.61 kB
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base'; import { isNullOrUndefined } from '@syncfusion/ej2-base'; export var PanesDirective = 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-panes'; } } }); export var PanesPlugin = { name: 'e-panes', install: function (Vue) { Vue.component(PanesPlugin.name, PanesDirective); } }; /** * 'e-pane' directive represent a pane of Vue Splitter * It must be contained in a Splitter component(`ejs-splitter`). * ```html * <ejs-splitter id='splitter'> * <e-panes> * <e-pane size='150px'></e-pane> * <e-pane size='150px'></e-pane> * </e-panes> * </ejs-splitter> * ``` */ export var PaneDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-pane'; } } }); export var PanePlugin = { name: 'e-pane', install: function (Vue) { Vue.component(PanePlugin.name, PaneDirective); } };