"The :deep() selector in Vue3 is invalid when using the PrimeVue library"-PHP Chinese Network Q&A
"The :deep() selector in Vue3 is invalid when using the PrimeVue library"
P粉785522400
P粉785522400 2023-08-29 23:45:06
0
1
497

I am using vue3 and PrimeVue library. When I try to override the PrimeView component's css field using the :deep() selector, it has no effect. It only applies my changes when I use unscoped styles. I'm confused as to why it doesn't work.

Sample code with :deep():

  

This doesn't work.

But when using style without scope, like this:

 

That works.

P粉785522400
P粉785522400

reply all (1)
P粉094351878

The rules generated through the:deepselector will take effect for the child elements of the current component, butp-toastis attached to the

element, so the generated class will have no effect.

However, you can setpass optionsto pass style rules to the icon:

or

See examples inSandbox.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!