a-select dropdownClassName 使用方法
<a-select
v-model:value="mainTitle"
:options="options"
dropdown-class-name="dropdown-class"
@change="handleTitleChange"
/>
<style lang="less">
.dropdown-class {
background-color: rgba(57, 53, 199, 0.5);
.ant-select-item-option {
color: whitesmoke;
}
.ant-select-item-option-selected, .ant-select-item-option-active {
color: #44f0e9;
background-color: transparent;
}
}
</style>
需要注意的是,style
标签上不可以加 scope
,加了就找不到样式了