primevue-mirror/packages/primevue/src/inputtext/InputText.vue

33 lines
833 B
Vue
Raw Normal View History

2022-09-06 12:03:37 +00:00
<template>
<input type="text" :class="cx('root')" :value="d_value" :name="name" :disabled="disabled" :aria-invalid="$invalid || undefined" @input="onInput" v-bind="attrs" />
2022-09-06 12:03:37 +00:00
</template>
<script>
2024-10-18 14:56:50 +00:00
import { mergeProps } from 'vue';
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,
2024-02-11 23:47:53 +00:00
inheritAttrs: false,
2022-09-06 12:03:37 +00:00
methods: {
2023-12-05 12:36:59 +00:00
onInput(event) {
this.writeValue(event.target.value, event);
2023-12-05 12:36:59 +00:00
}
},
computed: {
2024-10-18 14:56:50 +00:00
attrs() {
return mergeProps(
this.ptmi('root', {
context: {
filled: this.$filled,
disabled: this.disabled
}
}),
this.formField
);
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>