Merge pull request '#6891 fix: hide across only on disable' (!379) from 6891-fixSearchbar into dev
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #379
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
This commit is contained in:
Jorge Penadés 2024-05-16 13:15:09 +00:00
commit 475f0eda48
1 changed files with 6 additions and 14 deletions

View File

@ -37,14 +37,6 @@ const styleAttrs = computed(() => {
: {};
});
const onEnterPress = () => {
emit('keyup.enter');
};
const handleValue = (val = null) => {
value.value = val;
};
const focus = () => {
vnInputRef.value.focus();
};
@ -73,7 +65,7 @@ const inputRules = [
v-bind="{ ...$attrs, ...styleAttrs }"
:type="$attrs.type"
:class="{ required: $attrs.required }"
@keyup.enter="onEnterPress()"
@keyup.enter="emit('keyup.enter')"
:clearable="false"
:rules="inputRules"
:lazy-rules="true"
@ -82,14 +74,14 @@ const inputRules = [
<template v-if="$slots.prepend" #prepend>
<slot name="prepend" />
</template>
<template #append v-if="!!$attrs.disabled">
<slot name="append" v-if="$slots.append" />
<template #append>
<slot name="append" v-if="$slots.append && !$attrs.disabled" />
<QIcon
name="close"
size="xs"
v-if="hover && value"
@click="handleValue(null)"
v-if="$slots.append && hover && value && !$attrs.disabled"
@click="value = null"
></QIcon>
</template>
</QInput>