@progress/kendo-upload-vue-wrapper
Version:
Kendo UI Upload wrapper for Vue.js
46 lines (37 loc) • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _vue = require('vue');
var Vue = _interopRequireWildcard(_vue);
var _KendoUploadMixin = require('./KendoUploadMixin');
var _KendoUploadMixin2 = _interopRequireDefault(_KendoUploadMixin);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
const allVue = Vue;
const gh = allVue.h;
const isV3 = allVue.version && allVue.version[0] === '3';
exports.default = {
name: 'kendo-upload',
mixins: [_KendoUploadMixin2.default],
setup() {
const v3 = isV3;
return {
v3
};
},
render(createElement) {
const h = gh || createElement;
if (this.v3) {
return h('input', {
type: 'file'
});
} else {
return h('input', {
attrs: {
type: 'file'
}
});
}
}
};