Filled state support for floating inputs
parent
466484fb37
commit
0640144ca5
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<input class="p-inputtext p-component" v-on="listeners" :value="value" />
|
<input :class="{'p-inputtext p-component':true, 'p-filled': filled}"
|
||||||
|
v-on="listeners" :value="value" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -13,6 +14,9 @@ export default {
|
||||||
...this.$listeners,
|
...this.$listeners,
|
||||||
input: event => this.$emit('input', event.target.value)
|
input: event => this.$emit('input', event.target.value)
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
filled() {
|
||||||
|
return (this.value != null && this.value.toString().length > 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue