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

23 lines
518 B
Vue
Raw Normal View History

2018-12-07 11:02:58 +00:00
<template>
<input :class="{'p-inputtext p-component':true, 'p-filled': filled}"
v-on="listeners" :value="value" />
2018-12-07 11:02:58 +00:00
</template>
<script>
export default {
props: {
value: null
},
computed: {
listeners() {
return {
...this.$listeners,
input: event => this.$emit('input', event.target.value)
};
},
filled() {
return (this.value != null && this.value.toString().length > 0)
2018-12-07 11:02:58 +00:00
}
}
}
</script>