@syncfusion/ej2-vue-buttons
Version:
A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch. for Vue
60 lines (59 loc) • 1.54 kB
JavaScript
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
import { isNullOrUndefined } from '@syncfusion/ej2-base';
export var ChipsDirective = 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-chips';
}
}
});
export var ChipsPlugin = {
name: 'e-chips',
install: function (Vue) {
Vue.component(ChipsPlugin.name, ChipsDirective);
}
};
/**
* `e-chip` directive represent a chip of the Vue ChipList.
* ```html
* <ejs-chiplist >
* <e-chips>
* <e-chip text='chip1'></e-chip>
* <e-chip text='chip2'></e-chip>
* </e-chips>
* </ejs-chiplist>
* ```
*/
export var ChipDirective = vueDefineComponent({
render: function () {
return;
},
methods: {
getTag: function () {
return 'e-chip';
}
}
});
export var ChipPlugin = {
name: 'e-chip',
install: function (Vue) {
Vue.component(ChipPlugin.name, ChipDirective);
}
};