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

22 lines
510 B
Vue
Raw Normal View History

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)
};
},
filled() {
return (this.value != null && this.value.toString().length > 0)
2018-12-07 11:02:58 +00:00
}
}
}
</script>