revert: refs #7404 #7404 VnSelect hover
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-10-07 20:05:04 +02:00
parent 68f8037db4
commit 5e75bb29fb
4 changed files with 53 additions and 48 deletions

View File

@ -71,7 +71,7 @@ defineExpose({ orderBy });
]" ]"
class="no-box-shadow" class="no-box-shadow"
:clickable="true" :clickable="true"
style="min-width: 20px; padding: 0 0.9.em" style="min-width: 40px"
> >
<div <div
class="column flex-center" class="column flex-center"

View File

@ -453,7 +453,7 @@ function handleOnDataSaved(_) {
<template #header-cell="{ col }"> <template #header-cell="{ col }">
<QTh v-if="col.visible ?? true"> <QTh v-if="col.visible ?? true">
<div <div
class="column self-start ellipsis" class="column self-start q-ml-xs ellipsis"
:class="`text-${col?.align ?? 'left'}`" :class="`text-${col?.align ?? 'left'}`"
:style="$props.columnSearch ? 'height: 75px' : ''" :style="$props.columnSearch ? 'height: 75px' : ''"
> >

View File

@ -104,8 +104,7 @@ const noOneOpt = ref({
[optionValue.value]: false, [optionValue.value]: false,
[optionLabel.value]: noOneText, [optionLabel.value]: noOneText,
}); });
const getVal = (val) => ($props.useLike ? { like: `%${val}%` } : val);
const hover = ref(false);
const value = computed({ const value = computed({
get() { get() {
return $props.modelValue; return $props.modelValue;
@ -226,6 +225,8 @@ async function filterHandler(val, update) {
function nullishToTrue(value) { function nullishToTrue(value) {
return value ?? true; return value ?? true;
} }
const getVal = (val) => ($props.useLike ? { like: `%${val}%` } : val);
</script> </script>
<template> <template>
@ -239,7 +240,6 @@ function nullishToTrue(value) {
:fields="fields" :fields="fields"
:params="params" :params="params"
/> />
<div @mouseover="hover = true" @mouseleave="hover = false">
<QSelect <QSelect
v-model="value" v-model="value"
:options="myOptions" :options="myOptions"
@ -259,7 +259,7 @@ function nullishToTrue(value) {
virtual-scroll-slice-size="options.length" virtual-scroll-slice-size="options.length"
hide-bottom-space hide-bottom-space
> >
<template v-if="hover && value && !$attrs.disabled && isClearable" #append> <template v-if="isClearable" #append>
<QIcon <QIcon
v-show="value" v-show="value"
name="close" name="close"
@ -273,19 +273,25 @@ function nullishToTrue(value) {
size="xs" size="xs"
/> />
</template> </template>
<template <template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
v-for="(_, slotName) in $slots"
#[slotName]="slotData"
:key="slotName"
>
<slot :name="slotName" v-bind="slotData ?? {}" :key="slotName" /> <slot :name="slotName" v-bind="slotData ?? {}" :key="slotName" />
</template> </template>
</QSelect> </QSelect>
</div>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.q-field--outlined { .q-field--outlined {
max-width: 100%; max-width: 100%;
} }
.q-field__inner {
.q-field__control {
min-height: auto !important;
display: flex;
align-items: flex-end;
.q-field__native.row {
min-height: auto !important;
}
}
}
</style> </style>

View File

@ -87,7 +87,6 @@ const columns = computed(() => [
}, },
}, },
columnClass: 'expand', columnClass: 'expand',
style: 'min-width: 210px;',
}, },
{ {
align: 'left', align: 'left',