@syncfusion/ej2-vue-gantt
Version:
Essential JS 2 Gantt Component for Vue
61 lines (60 loc) • 1.92 kB
JavaScript
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
import { isNullOrUndefined } from '@syncfusion/ej2-base';
export var DayWorkingTimeCollectionDirective = 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-day-working-time-collection';
}
}
});
export var DayWorkingTimeCollectionPlugin = {
name: 'e-day-working-time-collection',
install: function (Vue) {
Vue.component(DayWorkingTimeCollectionPlugin.name, DayWorkingTimeCollectionDirective);
}
};
/**
* `e-day-working-time-collection` directive represent a working time ranges in a day.
* It must be contained in a Gantt component(`ejs-gantt`).
* ```vue
* <ejs-gantt :dataSource]='data' allowSelection='true' allowSorting='true'>
* <e-day-working-time-collection>
* <e-day-working-time from='8' to='12'/>
* <e-day-working-time from='13' to='17'/>
* </e-day-working-time-collection>
* </ejs-gantt>
* ```
*/
export var DayWorkingTimeDirective = vueDefineComponent({
render: function () {
return;
},
methods: {
getTag: function () {
return 'e-day-working-time';
}
}
});
export var DayWorkingTimePlugin = {
name: 'e-day-working-time',
install: function (Vue) {
Vue.component(DayWorkingTimePlugin.name, DayWorkingTimeDirective);
}
};