当前位置:网站首页>实现table某个单元格背景色设置
实现table某个单元格背景色设置
2022-07-29 05:12:00 【喵酱睡着了】
需求:某一列单元格为1的值,背景色填充为橘色
实现效果:
实现方法:使用table提供的:cell-style=“cellStyle”
具体代码:
<el-table
:data="tableData"
border
stripe
:cell-style="cellStyle"
>
cellStyle(row, column, rowIndex, columnIndex){
if(row.column.label === "环空预测液面深度(m)" && row.row.hkymsd=="1.00"){
return 'background-color:#e6a23c'
}
},
边栏推荐
- Best practices for elastic computing in the game industry
- Occt learning 002 - environment construction
- [event preview] cloud digital factory and digital transformation and innovation forum for small and medium-sized enterprises
- Terminal shell common commands
- Selenium实战案例之爬取js加密数据
- Cryengine5 shader debugging
- ClickHouse学习(七)表查询优化
- 弹性盒子flex
- 阿里云联合鼎捷软件发布云上数字工厂解决方案,实现云MES系统本地化部署
- Preemptive appointment | Alibaba cloud shadowless cloud application online conference appointment opens
猜你喜欢
随机推荐
全局components组件注册
Pyqt5: Chapter 1, Section 1: creating a user interface using QT components - Introduction
Alibaba cloud Zhang Xintao: heterogeneous computing provides surging power for the digital economy
C language file operation
Integer overflow and printing
ClickHouse学习(一)ClickHouse?
牛客网编程题—【WY22 Fibonacci数列】和【替换空格】详解
ClickHouse学习(五)集群操作
Longest string without duplicate characters
适创科技以云仿真平台,支持“中国智造”升级
Clickhouse learning (VII) table query optimization
Bubble sort c language
无重复字符的最长字串
ClickHouse学习(十)监控运行指标
Global components component registration
【C语言系列】— 字符串+部分转义字符详解+注释小技巧
B - 识别浮点常量问题
One dimensional array exercise
ClickHouse学习(四)SQL操作
B - identify floating point constant problems








