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,8 @@ import {
interface Props {
class?: any;
// 弹出层的类名
contentClass?: any;
options?: Array<{ label: string; value: string }>;
placeholder?: string;
}
@@ -20,7 +22,7 @@ const props = defineProps<Props>();
<SelectTrigger :class="props.class">
<SelectValue :placeholder="placeholder" />
</SelectTrigger>
<SelectContent>
<SelectContent :class="props.contentClass">
<template v-for="item in options" :key="item.value">
<SelectItem :value="item.value"> {{ item.label }} </SelectItem>
</template>