The element-plus Message style does not take effect. Adding style penetration does not take effect either.

Problem: The element-plus Message style does not take effect, and adding style penetration does not take effect either.

Insert image description here

Reason appendTo attribute

Insert image description here
Because scoped is added to the single file and the message is added to the body by default, it cannot take effect.

Solution:

1. Set the appendTo node as the root node of the current page
2. Remove page style scoped

Guess you like

Origin blog.csdn.net/weixin_53191752/article/details/132498744