Vue3 style penetration:: why v-deep cannot modify the pop-up window style of element-plus

I was crying stupidly by myself, there is no root node, because Vue2.X requires elements to be in a root node, Vue3.X does not have this requirement, and it does not need to be in a root node, so I wrote the pop-up window directly at the beginning, without Wrapping the div outside caused my modification of the component style to fail to take effect.insert image description here
insert image description here

Use :deep() or ::v-deep to modify component styles

:deep(.dialog2 .zlzp-dialog__header) {
    
    
    padding: 0;
}

::v-deep .dialog2 .zlzp-dialog__body {
    
    
    padding: 0;
}

Guess you like

Origin blog.csdn.net/weixin_46319117/article/details/129184351