当前位置: 代码迷 >> 综合 >> scope穿透
  详细解决方案

scope穿透

热度:3   发布时间:2024-02-06 23:17:37.0

方法一:

外层 >>> 第三方组件
<style>.example >>> .el--input{color:blue;}
</style>
<template><div class="example"><el-input type="text" /></div>
</template>// sass可能不识别 '<<<' ,可以用 '/deep/' 代替 '<<<'

方法二:

<style>
/* global styles */
在此处添加全局样式
</style><style scoped>
/* local styles */
</style>

 

  相关解决方案