fix: show trash can icon only when advSearchRow>1

This commit is contained in:
puri-ph4tt 2023-12-06 17:15:54 +07:00
parent 0c8153cd59
commit df286d5ae6

View file

@ -93,7 +93,7 @@ function clearAdvSearchData() {
v-for="(item, index) in advSearchDataRow" v-for="(item, index) in advSearchDataRow"
:key="index" :key="index"
> >
<div class="row items-center" style="width: 45px; height: 45px"> <div class="row content-center" style="width: 45px; height: 45px">
<q-btn <q-btn
dense dense
color="teal-5" color="teal-5"
@ -143,25 +143,16 @@ function clearAdvSearchData() {
</template> </template>
</q-input> </q-input>
</div> </div>
<div> <div class="row content-center" style="width: 45px; height: 45px">
<q-btn <q-btn
dense dense
flat flat
icon="mdi-trash-can-outline" icon="mdi-trash-can-outline"
v-if="advSearchDataRow.length > 1"
color="red" color="red"
@click="() => delAdvSearchData(index)" @click="() => delAdvSearchData(index)"
id="delAdvSearchData" id="delAdvSearchData"
> />
<q-tooltip
class="bg-red"
anchor="top middle"
self="bottom middle"
:offset="[10, 10]"
v-if="advSearchDataRow.length === 1"
>
<strong>ไมสามารถลบได</strong>
</q-tooltip>
</q-btn>
</div> </div>
</div> </div>