chore: 租户选择框浮层固定高度[256px] 超过高度自动滚动

This commit is contained in:
dap 2024-10-09 13:58:01 +08:00
parent 11a0b2f2f3
commit cf53a4f3bd
3 changed files with 8 additions and 1 deletions

View File

@ -9,6 +9,10 @@
- 登录页面 关闭租户后下拉框没有正常隐藏 - 登录页面 关闭租户后下拉框没有正常隐藏
- 字典管理 关闭租户不应显示`同步租户字典`按钮 - 字典管理 关闭租户不应显示`同步租户字典`按钮
**OTHERS**
- 登录页 租户选择框浮层固定高度[256px] 超过高度自动滚动
# 1.0.0-beta (2024-10-8) # 1.0.0-beta (2024-10-8)
**FEATURES** **FEATURES**

View File

@ -60,6 +60,7 @@ const formSchema = computed((): VbenFormSchema[] => {
component: 'VbenSelect', component: 'VbenSelect',
componentProps: { componentProps: {
class: 'bg-background h-[40px] focus:border-primary', class: 'bg-background h-[40px] focus:border-primary',
contentClass: 'h-[256px] overflow-y-auto',
options: tenantInfo.value.voList?.map((item) => ({ options: tenantInfo.value.voList?.map((item) => ({
label: item.companyName, label: item.companyName,
value: item.tenantId, value: item.tenantId,

View File

@ -9,6 +9,8 @@ import {
interface Props { interface Props {
class?: any; class?: any;
//
contentClass?: any;
options?: Array<{ label: string; value: string }>; options?: Array<{ label: string; value: string }>;
placeholder?: string; placeholder?: string;
} }
@ -20,7 +22,7 @@ const props = defineProps<Props>();
<SelectTrigger :class="props.class"> <SelectTrigger :class="props.class">
<SelectValue :placeholder="placeholder" /> <SelectValue :placeholder="placeholder" />
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent :class="props.contentClass">
<template v-for="item in options" :key="item.value"> <template v-for="item in options" :key="item.value">
<SelectItem :value="item.value"> {{ item.label }} </SelectItem> <SelectItem :value="item.value"> {{ item.label }} </SelectItem>
</template> </template>