@syncfusion/ej2-vue-popups
Version:
A package of Essential JS 2 popup components such as Dialog and Tooltip that is used to display information or messages in separate pop-ups. for Vue
61 lines (60 loc) • 1.74 kB
JavaScript
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
import { isNullOrUndefined } from '@syncfusion/ej2-base';
export var ButtonsDirective = 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-buttons';
}
}
});
export var ButtonsPlugin = {
name: 'e-buttons',
install: function (Vue) {
Vue.component(ButtonsPlugin.name, ButtonsDirective);
}
};
/**
* 'e-button' directive represent a button of Vue Dialog
* It must be contained in a Dialog component(`ejs-dialog`).
* ```html
* <ejs-Dialog id='dialog' :showCloseIcon=true>
* <e-buttons>
* <e-dialogbutton :buttonModal='okButton'></e-dialogbutton>
* <e-dialogbutton :buttonModal='cancelButton'></e-dialogbutton>
* </e-buttons>
* </ejs-Dialog>
* ```
*/
export var DialogButtonDirective = vueDefineComponent({
render: function () {
return;
},
methods: {
getTag: function () {
return 'e-dialogbutton';
}
}
});
export var DialogButtonPlugin = {
name: 'e-dialogbutton',
install: function (Vue) {
Vue.component(DialogButtonPlugin.name, DialogButtonDirective);
}
};