ie浏览器下ant-design-vue select 拉框滚动条不显示的解决办法

先上代码:

                  <a-select v-model="queryParam.ticket_name_code"  placeholder="请选择" :getPopupContainer= "(target) => target.parentNode">
                       ...
                  	</a-select-option>
                  </a-select>

主要是加这个,而且必须这么加。

:getPopupContainer= "(target) => target.parentNode"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ant-design-vueselect组件提供了多种样式配置,您可以通过设置不同的属性来实现自定义样式。以下是一些常用的样式配置: 1. 修改下拉框的宽度:使用`dropdownStyle`属性,设置`width`属性。 ```html <a-select v-model="selectedValue" :dropdownStyle="{ width: '200px' }"> <a-select-option v-for="option in options" :key="option.value" :value="option.value"> {{ option.label }} </a-select-option> </a-select> ``` 2. 修改下拉框中选项的样式:使用`option-template`属性,自定义选项的样式。 ```html <a-select v-model="selectedValue" :option-template="optionTemplate"> <a-select-option v-for="option in options" :key="option.value" :value="option.value"> {{ option.label }} </a-select-option> </a-select> <template #optionTemplate="{ option }"> <div class="custom-option"> {{ option.label }} </div> </template> <style> .custom-option { color: red; font-weight: bold; } </style> ``` 3. 修改选中的选项的样式:使用`selected-template`属性,自定义选中的选项的样式。 ```html <a-select v-model="selectedValue" :selected-template="selectedTemplate"> <a-select-option v-for="option in options" :key="option.value" :value="option.value"> {{ option.label }} </a-select-option> </a-select> <template #selectedTemplate="{ option }"> <div class="custom-selected"> {{ option.label }} </div> </template> <style> .custom-selected { color: blue; font-weight: bold; } </style> ``` 以上是一些常用的样式配置,您可以根据自己的需求进行自定义。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值