pull/12/head
cagataycivici 2019-05-23 12:01:43 +03:00
commit 71b928a3f2
3 changed files with 8 additions and 4 deletions

View File

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

View File

@ -327,6 +327,7 @@ export default {
currentMinute: null, currentMinute: null,
currentSecond: null, currentSecond: null,
pm: null, pm: null,
focused: false,
overlayVisible: false overlayVisible: false
} }
}, },
@ -1468,9 +1469,11 @@ export default {
if ($vm.showOnFocus && $vm.isEnabled()) { if ($vm.showOnFocus && $vm.isEnabled()) {
$vm.overlayVisible = true; $vm.overlayVisible = true;
} }
$vm.focused = true;
$vm.$emit('focus', event) $vm.$emit('focus', event)
}, },
blur: event => { blur: event => {
$vm.focused = false;
$vm.$emit('blur', event); $vm.$emit('blur', event);
}, },
keydown: event => { keydown: event => {
@ -1500,7 +1503,8 @@ export default {
{ {
'p-calendar-w-btn': this.showIcon, 'p-calendar-w-btn': this.showIcon,
'p-calendar-timeonly': this.timeOnly, '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> <template>
<div class="p-chips p-component"> <div :class="['p-chips p-component', {'p-inputwrapper-filled': value, 'p-inputwrapper-focus': focused}]">
<ul :class="['p-inputtext', {'p-disabled': disabled, 'p-focus': focused}]" @click="onWrapperClick()"> <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"> <li v-for="(val,i) of value" :key="val" class="p-chips-token p-highlight">
<slot name="chip" :value="val"> <slot name="chip" :value="val">
<span class="p-chips-token-icon pi pi-fw pi-times" @click="removeItem($event, i)"></span> <span class="p-chips-token-icon pi pi-fw pi-times" @click="removeItem($event, i)"></span>