element-plus [Bug Report] el-popper Custom popperClass will be overridden by the default style

xtfmy6hx  于 2022-10-21  发布在  其他
关注(0)|答案(4)|浏览(183)

Element Plus version

1.0.2-beta.46

OS/Browsers version

Chrome

Vue version

3.1.1

https://codepen.io/zhouh55/pen/RwpBvJj?editors=1111

Steps to reproduce

The console shows that the custom popperClass has been placed in front of the el-popper class

What is Expected?

Custom popperClass can override the original style

What is actually happening?

el-popper class overrides the custom popperClass

wmvff8tz

wmvff8tz1#

Can you adjust the position of popperClass in kls?

yrdbyhpb

yrdbyhpb2#

Hi, you can use !important for now.

lg40wkob

lg40wkob3#

Hi, you can use !important for now.

poper-class has not any effect about changing style even if i used !important

version 1.2.0.beta3

<el-popover
      popper-class="bg-red"
      placement="bottom"
      width="200px"
      trigger="hover">
      ....
    </el-popover>
.bg-red {
  background-color: red !important;
}
5uzkadbs

5uzkadbs4#

@zhouh55@838239178 Hello, you can increase the weight of the selector. This is a link.

And your code doesn't work, maybe the selector has added scoped and it doesn't match the element.

相关问题