fix
This commit is contained in:
@@ -55,36 +55,42 @@ watch(search, (value) => {
|
||||
<van-button size="small" type="primary" plain @click="selectCategory(0)">Все</van-button>
|
||||
</div>
|
||||
|
||||
<van-search v-model="search" placeholder="Поиск по категории" />
|
||||
<div class="entity-popup-body">
|
||||
<van-search v-model="search" placeholder="Поиск по категории" />
|
||||
|
||||
<van-loading v-if="loading" class="entity-state" type="spinner">Загрузка...</van-loading>
|
||||
<van-loading v-if="loading" class="entity-state" type="spinner">Загрузка...</van-loading>
|
||||
|
||||
<template v-else>
|
||||
<van-cell-group inset>
|
||||
<van-cell
|
||||
v-for="category in categories"
|
||||
:key="category.id"
|
||||
:title="category.name"
|
||||
:label="category.name_group || `ID: ${category.id}`"
|
||||
clickable
|
||||
center
|
||||
@click="selectCategory(category.id)"
|
||||
>
|
||||
<template #right-icon>
|
||||
<van-icon v-if="selectedCategoryId === category.id" name="success" color="#1989fa" />
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<template v-else>
|
||||
<van-cell-group inset>
|
||||
<van-cell
|
||||
v-for="category in categories"
|
||||
:key="category.id"
|
||||
:title="category.name"
|
||||
:label="category.name_group || `ID: ${category.id}`"
|
||||
clickable
|
||||
center
|
||||
@click="selectCategory(category.id)"
|
||||
>
|
||||
<template #right-icon>
|
||||
<van-icon v-if="selectedCategoryId === category.id" name="success" color="#1989fa" />
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-empty v-if="categories.length === 0" description="Категории не найдены" />
|
||||
</template>
|
||||
<van-empty v-if="categories.length === 0" description="Категории не найдены" />
|
||||
</template>
|
||||
</div>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.entity-popup {
|
||||
min-height: 55vh;
|
||||
padding: 18px 0 28px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 70vh;
|
||||
max-height: 70vh;
|
||||
overflow: hidden;
|
||||
padding: 18px 0 16px;
|
||||
}
|
||||
|
||||
.entity-popup-header {
|
||||
@@ -106,6 +112,12 @@ watch(search, (value) => {
|
||||
padding: 36px 0;
|
||||
}
|
||||
|
||||
.entity-popup-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.entity-select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user