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.66 kB
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base'; import { isNullOrUndefined } from '@syncfusion/ej2-base'; export var ItemsDirective = 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-items'; } } }); export var ItemsPlugin = { name: 'e-items', install: function (Vue) { Vue.component(ItemsPlugin.name, ItemsDirective); } }; /** * 'e-timelineItem' directive represents a item of the Vue Timeline * It must be contained in a Timeline component(`ejs-timeline`). * ```html * <ejs-timeline> * <e-items> * <e-item :dotCss='e-icons e-folder' :content='Item 1' /> * <e-item :dotCss='e-icons e-folder' :content='Item 2' /> * </e-items> * </ejs-timeline> * ``` */ export var ItemDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-item'; } } }); export var ItemPlugin = { name: 'e-item', install: function (Vue) { Vue.component(ItemPlugin.name, ItemDirective); } };