编程知识 cdmana.com

The usage of deep in Vue

       css You can use scoped To prevent the parent component from polluting the child component , And then form a unique hash value , Like this   .full[data-v-3d4b9f2e]. If you want to modify the contents of the child component in the parent component , We just need something to penetrate it .

       css It's very useful >>>, If there is css Preprocessing , for example  lang="scss" Use  /deep/, The frame is vue+js I use it when I'm in bed /deep/ There is no wrong report , But with vue+ts When ,vue-cli3+vue2 and vue-cli4+vue3 It's all wrong ,vue-cli3+vue2 The solution is  ::vue-deep .el-input__inner ,vue-cli4+vue3 The solution is  :deep(.el-input__inner).

版权声明
本文为[Joslyn-Jiang]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/04/20210408111746313R.html

Tags usage deep vue
Scroll to Top