digivue
Version:
PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc
81 lines (75 loc) • 1.89 kB
JavaScript
import { nextTick, mergeProps, createElementBlock, openBlock } from 'vue';
import BaseInput from '@digivue/core/baseinput';
import InputTextStyle from 'digivue/inputtext/style';
var script$1 = {
name: 'BaseInputText',
"extends": BaseInput,
style: InputTextStyle,
props: {
focusOnMount: {
type: Boolean,
"default": false
},
themed: {
type: Boolean,
"default": false
},
datatable: {
type: Boolean,
"default": false
}
},
provide: function provide() {
return {
$pcInputText: this,
$parentInstance: this
};
}
};
var script = {
name: 'InputText',
"extends": script$1,
inheritAttrs: false,
methods: {
onInput: function onInput(event) {
this.writeValue(event.target.value, event);
}
},
computed: {
attrs: function attrs() {
return mergeProps(this.ptmi('root', {
context: {
filled: this.$filled,
disabled: this.disabled,
readonly: this.$attrs.readonly,
invalid: this.$invalid
}
}), this.formField);
}
},
mounted: function mounted() {
var _this = this;
if (this.focusOnMount) {
nextTick(function () {
_this.$refs.input.focus();
});
}
}
};
var _hoisted_1 = ["value", "disabled", "aria-invalid"];
function render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("input", mergeProps({
ref: "input",
type: "text",
"class": _ctx.cx('root'),
value: _ctx.d_value,
disabled: _ctx.disabled,
"aria-invalid": _ctx.$invalid || undefined,
onInput: _cache[0] || (_cache[0] = function () {
return $options.onInput && $options.onInput.apply($options, arguments);
})
}, $options.attrs), null, 16, _hoisted_1);
}
script.render = render;
export { script as default };
//# sourceMappingURL=index.mjs.map