@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.72 kB
JavaScript
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
import { isNullOrUndefined } from '@syncfusion/ej2-base';
export var ResourcesDirective = 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-resources';
}
}
});
export var ResourcesPlugin = {
name: 'e-resources',
install: function (Vue) {
Vue.component(ResourcesPlugin.name, ResourcesDirective);
}
};
/**
* `e-resources` directive represent a resources of the VueJS Schedule.
* It must be contained in a Schedule component(`ejs-schedule`).
* ```vue
* <ejs-schedule>
* <e-resources>
* <e-resource field='RoomId' name='Rooms'></e-resource>
* <e-resource field='OwnerId' name='Owners'></e-resource>
* </e-resources>
* </ejs-schedule>
* ```
*/
export var ResourceDirective = vueDefineComponent({
render: function () {
return;
},
methods: {
getTag: function () {
return 'e-resource';
}
}
});
export var ResourcePlugin = {
name: 'e-resource',
install: function (Vue) {
Vue.component(ResourcePlugin.name, ResourceDirective);
}
};