mirror of
https://gitee.com/xuliangzhan_admin/vxe-table.git
synced 2026-01-21 05:27:57 +08:00
65 lines
1.6 KiB
JavaScript
65 lines
1.6 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
|
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
var _default = {
|
|
name: 'VxeInput',
|
|
props: {
|
|
value: [String, Number],
|
|
type: {
|
|
type: String,
|
|
default: 'text'
|
|
},
|
|
disabled: Boolean,
|
|
placeholder: String,
|
|
size: String
|
|
},
|
|
computed: {
|
|
vSize: function vSize() {
|
|
return this.size || this.$parent.size || this.$parent.vSize;
|
|
}
|
|
},
|
|
render: function render(h) {
|
|
var _this = this,
|
|
_ref;
|
|
|
|
var $listeners = this.$listeners,
|
|
value = this.value,
|
|
type = this.type,
|
|
vSize = this.vSize,
|
|
placeholder = this.placeholder,
|
|
disabled = this.disabled;
|
|
var on = {
|
|
input: function input(evnt) {
|
|
return _this.$emit('input', evnt.target.value);
|
|
}
|
|
};
|
|
|
|
if ($listeners.change) {
|
|
on.change = function (evnt) {
|
|
return _this.$emit('change', evnt.target.value, evnt);
|
|
};
|
|
}
|
|
|
|
return h('div', {
|
|
class: ['vxe-input--wrapper', (_ref = {}, _defineProperty(_ref, "size--".concat(vSize), vSize), _defineProperty(_ref, 'is--disabled', this.disabled), _ref)]
|
|
}, [h('input', {
|
|
class: "vxe-input",
|
|
domProps: {
|
|
value: value
|
|
},
|
|
attrs: {
|
|
type: type,
|
|
placeholder: placeholder,
|
|
disabled: disabled
|
|
},
|
|
on: on
|
|
})]);
|
|
}
|
|
};
|
|
exports.default = _default; |