2022-09-06 12:03:37 +00:00
|
|
|
<template>
|
2023-12-05 11:06:32 +00:00
|
|
|
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="getPTOptions('root')" data-pc-name="inputtext" />
|
2022-09-06 12:03:37 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-05-24 11:23:36 +00:00
|
|
|
import BaseInputText from './BaseInputText.vue';
|
2023-05-05 12:53:35 +00:00
|
|
|
|
2022-09-06 12:03:37 +00:00
|
|
|
export default {
|
|
|
|
name: 'InputText',
|
2023-05-24 11:23:36 +00:00
|
|
|
extends: BaseInputText,
|
2022-09-06 12:03:37 +00:00
|
|
|
emits: ['update:modelValue'],
|
|
|
|
methods: {
|
|
|
|
onInput(event) {
|
|
|
|
this.$emit('update:modelValue', event.target.value);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
filled() {
|
2022-09-14 11:26:01 +00:00
|
|
|
return this.modelValue != null && this.modelValue.toString().length > 0;
|
2023-07-04 02:24:37 +00:00
|
|
|
},
|
2023-12-05 11:06:32 +00:00
|
|
|
getPTOptions(key) {
|
|
|
|
return this.ptm(key, {
|
2023-07-04 02:24:37 +00:00
|
|
|
context: {
|
2023-07-13 12:42:41 +00:00
|
|
|
filled: this.filled,
|
|
|
|
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
2023-07-04 02:24:37 +00:00
|
|
|
}
|
2023-12-05 11:06:32 +00:00
|
|
|
});
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
2022-09-14 11:26:01 +00:00
|
|
|
};
|
2022-09-06 12:03:37 +00:00
|
|
|
</script>
|