样式调整

This commit is contained in:
fofolee 2022-05-16 17:49:32 +08:00
parent ef82e14d37
commit 7c0b667c1d

View File

@ -9,39 +9,47 @@
:items="matchedItems" :items="matchedItems"
> >
<template v-slot="{ item, index }"> <template v-slot="{ item, index }">
<q-item <div
:key="index" :key="index"
clickable
v-ripple v-ripple
@mousemove="currentIndex = index" @mousemove="currentIndex = index"
@click="clickOK" @click="clickOK"
manual-focus
:class="{ :class="{
'item-selected': index === currentIndex, 'item-selected': index === currentIndex,
}" }"
:style="{ :style="{
height: itemHeight + 'px', height: itemHeight + 'px',
paddingRight: shortCutWidth + 'px', paddingRight: shortCutWidth - 16 + 'px',
cursor: 'pointer',
}" }"
> >
<q-item-section v-if="is.text"> <!-- 纯文本 -->
<q-item-label lines="1">{{ item }}</q-item-label> <q-item v-if="is.text">
</q-item-section> <q-item-section>
<q-item-section v-else-if="is.json" class="content-start"> <q-item-label lines="1">{{ item }}</q-item-label>
<q-avatar size="34px" style="margin-right: 16px" v-if="item.icon"> </q-item-section>
<q-img :src="item.icon" /> </q-item>
</q-avatar> <!-- json -->
<q-item-label lines="1" style="padding-right: 50px">{{ <q-item v-else-if="is.json">
item.title <q-item-section avatar v-if="item.icon">
}}</q-item-label> <q-avatar size="34px">
<q-item-label lines="1" style="padding-right: 50px" caption>{{ <q-img :src="item.icon" />
item.description </q-avatar>
}}</q-item-label> </q-item-section>
</q-item-section> <q-item-section>
<q-item-section v-else-if="is.html"> <q-item-label lines="1">{{ item.title }}</q-item-label>
<div v-html="item"></div> <q-item-label lines="1" caption>{{
</q-item-section> item.description
</q-item> }}</q-item-label>
</q-item-section>
</q-item>
<!-- html -->
<q-item v-else-if="is.html">
<q-item-section>
<div v-html="item" class="full-width"></div>
</q-item-section>
</q-item>
</div>
</template> </template>
</q-virtual-scroll> </q-virtual-scroll>
<div <div