当前位置:   article > 正文

el-drawer设置title的样式和背景等_el-drawer自定义title

el-drawer自定义title

el-drawer设置title的样式和背景等

1.原先的形式

2.采用插槽的形式

  1. <div class = "container_drawer ">
  2. <el-drawer
  3. ref="drawer"
  4. :before-close="handleBeforeClose"
  5. :destroy-on-close="true"
  6. :size="drawerWidth"
  7. :visible.sync="dialogVisible"
  8. :wrapperClosable="false"
  9. custom-class="demo-drawer"
  10. direction="rtl"
  11. >
  12. <template slot="title">
  13. <div class="custom_title">
  14. <el-image
  15. :src="require('@/views/xxxx/image/drawer.png')"
  16. style="width: 50px; height: 50px"></el-image>
  17. {{ kpiName }}
  18. </div>
  19. </template>
  20. </el-drawer>
  21. </div>
  22. .container_drawer .custom_title {
  23. font-size: 16px;
  24. color: #000000;
  25. font-weight: bold;
  26. display: flex;
  27. align-items: center;
  28. }

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/91077?site
推荐阅读
相关标签
  

闽ICP备14008679号