css - The scoped attribute in the vue single file component style of vue.js is invalid
我想大声告诉你
我想大声告诉你 2017-05-16 13:23:48
0
5
954

RT, I clearly wrote <style scoped> in a.vue and b.vue, but modifying the p.warp style in a.vue affects the p.warp style in b.vue. Could you please explain this? what's going on?

My webpack is directly using the webpack template in vue-cli, and I have never modified anything.

我想大声告诉你
我想大声告诉你

reply all(5)
phpcn_u1582

Upload the code. You may not be able to see anything with the code. You may not be able to see anything without the code

Peter_Zhu

Have you written this for both a.vue and b.vue?

为情所困

Browser debugging takes a look at the final style selector

phpcn_u1582

Same question, I also encountered this problem, vue-cli is not moved. After adding socped, v-data- is added to the element, but style is not, so there will still be a conflict

習慣沉默

Add !important

after your CSS
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template