4条回答 默认 最新
- 上官熊猫 2021-05-24 11:04关注
通过给组件添加自定义样式的属性popper-class,注意在style标签不需要添加scoped,不然无效,代码示例如下:
<template> <div class=""> <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" :total="40" popper-class='select_bottom' > </el-pagination> </div> </template> <script> export default { name: "", data() { return { currentPage: 10, }; }, methods: { handleSizeChange() {}, handleCurrentChange() {}, }, }; </script> <style lang="scss"> .select_bottom{ .el-select-dropdown__item.selected{ color:red; } .el-select-dropdown__item.hover, .el-select-dropdown__item:hover{ background:red; color:#fff; } } </style>
效果图:
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 6无用
悬赏问题
- ¥30 dspbuilder中使用signalcompiler时报错Error during compilation: Fitter failed,求解决办法
- ¥15 gwas 分析-数据质控之过滤稀有突变中出现的问题
- ¥15 没有注册类 (异常来自 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
- ¥15 知识蒸馏实战博客问题
- ¥15 用PLC设计纸袋糊底机送料系统
- ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
- ¥15 用C语言输入方程怎么
- ¥15 网站显示不安全连接问题
- ¥15 51单片机显示器问题
- ¥20 关于#qt#的问题:Qt代码的移植问题