2018-12-07 11:02:58 +00:00
|
|
|
<template>
|
2018-12-10 10:57:19 +00:00
|
|
|
<input :class="['p-inputtext p-component', {'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)
|
|
|
|
};
|
2018-12-07 20:53:24 +00:00
|
|
|
},
|
|
|
|
filled() {
|
|
|
|
return (this.value != null && this.value.toString().length > 0)
|
2018-12-07 11:02:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|