@syncfusion/ej2-vue-schedule
Version:
Flexible scheduling library with more built-in features and enhanced customization options similar to outlook and google calendar, allowing the users to plan and manage their appointments with efficient data-binding support. for Vue
61 lines (60 loc) • 1.62 kB
JavaScript
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
import { isNullOrUndefined } from '@syncfusion/ej2-base';
export var ViewsDirective = 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-views';
}
}
});
export var ViewsPlugin = {
name: 'e-views',
install: function (Vue) {
Vue.component(ViewsPlugin.name, ViewsDirective);
}
};
/**
* `e-views` directive represent a view of the VueJS Schedule.
* It must be contained in a Schedule component(`ejs-schedule`).
* ```vue
* <ejs-schedule>
* <e-views>
* <e-view option='day' dateFormat='dd MMM'></e-view>
* <e-view option='week'></e-view>
* </e-views>
* </ejs-schedule>
* ```
*/
export var ViewDirective = vueDefineComponent({
render: function () {
return;
},
methods: {
getTag: function () {
return 'e-view';
}
}
});
export var ViewPlugin = {
name: 'e-view',
install: function (Vue) {
Vue.component(ViewPlugin.name, ViewDirective);
}
};