Fix for float label

pull/12/head
Merve Özçifçi 2019-05-23 12:01:05 +03:00
parent dfa8f2f0c3
commit 2d662d293e
3 changed files with 8 additions and 4 deletions

View File

@ -357,7 +357,7 @@ export default {
return ['p-autocomplete p-component', {
'p-autocomplete-dd': this.dropdown,
'p-autocomplete-multiple': this.multiple,
'p-inputwrapper-filled': this.filled,
'p-inputwrapper-filled': this.value,
'p-inputwrapper-focus': this.focused
}];
},

View File

@ -327,6 +327,7 @@ export default {
currentMinute: null,
currentSecond: null,
pm: null,
focused: false,
overlayVisible: false
}
},
@ -1468,9 +1469,11 @@ export default {
if ($vm.showOnFocus && $vm.isEnabled()) {
$vm.overlayVisible = true;
}
$vm.focused = true;
$vm.$emit('focus', event)
},
blur: event => {
$vm.focused = false;
$vm.$emit('blur', event);
},
keydown: event => {
@ -1500,7 +1503,8 @@ export default {
{
'p-calendar-w-btn': this.showIcon,
'p-calendar-timeonly': this.timeOnly,
'p-inputwrapper-filled': this.value
'p-inputwrapper-filled': this.value,
'p-inputwrapper-focus': this.focused
}
];
},

View File

@ -1,6 +1,6 @@
<template>
<div class="p-chips p-component">
<ul :class="['p-inputtext', {'p-disabled': disabled, 'p-focus': focused}]" @click="onWrapperClick()">
<div :class="['p-chips p-component', {'p-inputwrapper-filled': value, 'p-inputwrapper-focus': focused}]">
<ul :class="['p-inputtext', {'p-disabled': $attrs.disabled, 'p-focus': focused}]" @click="onWrapperClick()">
<li v-for="(val,i) of value" :key="val" class="p-chips-token p-highlight">
<slot name="chip" :value="val">
<span class="p-chips-token-icon pi pi-fw pi-times" @click="removeItem($event, i)"></span>