?%ra=linkhttps://www.antdv.com/components/dropdown-cn 官网代码地址,下面这个例子
官方的属性
于是我改!样式一点没变,咋整?
这几天换ant,被样式修改弄晕了
<template>
<a-dropdown
overlayClassName='dropdown'
>
<!-- overlayClassName={styles.dropdown} 这样写也没用-->
...略
</a-dropdown>
</template>
<style lang="scss" scoped>
:deep(.ant-dropdown-menu-item){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-item-only-child){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-submenu-title){
color: red!important;
background-color: red!important;
}
:deep(.ant-dropdown-menu-vertical){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-root){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-title-content){
color: red!important;
background-color: red!important;
}
:deep(.ant-dropdown-menu-submenu-title){
color: red!important;
background-color: red!important;
}
:deep(.ant-dropdown-menu-vertical){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-root){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-submenu){
color: red!important;
background-color: red!important;
}
.dropdown{
//ant-dropdown-menu-item ant-dropdown-menu-item-only-child :deep(.ant-dropdown-menu-item){
:deep(.ant-dropdown-menu-item-only-child){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-submenu-title){
color: red!important;
background-color: red!important;
}
:deep(.ant-dropdown-menu-vertical){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-root){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-title-content){
color: red!important;
background-color: red!important;
}
:deep(.ant-dropdown-menu-submenu-title){
color: red!important;
background-color: red!important;
}
:deep(.ant-dropdown-menu-vertical){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-root){
background-color: red!important;
color: red!important;
}
:deep(.ant-dropdown-menu-submenu){
color: red!important;
background-color: red!important;
}
}
</style>