有木有大佬帮忙 ant design Vue 3.0 select 组件使用虚拟滚动, 每一项含有 margin 导致内容显示不全
实在想不到如何解决,请求各位大佬支援
以下是代码和问题展示图片:
[JavaScript] 纯文本查看 复制代码 <script setup lang='ts'>
import { ref } from "vue";
const value1 = ref('Y01')
</script>
<template>
<div>
<a-select ref="select" v-model:value="value1" style="width: 120px">
<a-select-option value="Y01">01</a-select-option>
<a-select-option value="Y02">02</a-select-option>
<a-select-option value="Y03">03</a-select-option>
<a-select-option value="Y04">04</a-select-option>
<a-select-option value="Y05">05</a-select-option>
<a-select-option value="Y06">06</a-select-option>
<a-select-option value="Y07">07</a-select-option>
<a-select-option value="Y08">08</a-select-option>
<a-select-option value="Y09">09</a-select-option>
<a-select-option value="Y10">10</a-select-option>
<a-select-option value="Y11">11</a-select-option>
<a-select-option value="Y12">12</a-select-option>
<a-select-option value="Y13">13</a-select-option>
<a-select-option value="Y14">14</a-select-option>
<a-select-option value="Y15">15</a-select-option>
<a-select-option value="Y16">16</a-select-option>
<a-select-option value="Y17">17</a-select-option>
<a-select-option value="Y18">18</a-select-option>
<a-select-option value="Y19">19</a-select-option>
<a-select-option value="Y20">20</a-select-option>
</a-select>
</div>
</template>
<style lang='less'>
.ant-select-dropdown {
.ant-select-item {
margin: 10px 0;
}
}</style>
|