boots table 单个格样式

这篇博客介绍了如何使用Boostrap和CSS来定制表格中特定单元格的样式。通过JavaScript函数`cellStyle`,可以根据单元格的索引为它们分别设置颜色、背景色和边框圆角,实现个性化展示。
摘要由CSDN通过智能技术生成

 {
                    field: 'Num',
                    title: '排序',
                    cellStyle: function (value, row, index) { // 直接加样式
                        if (index==0) {
                            return       {
                                css: {
                                    'color': 'white',
                                    'background-color': '#ff6e85',
                                    'border-radius': '30px 0px 0px 30px'
                                    }
                            }
                        } if (index == 1) {
                            return {
                                css: {
                                    'color': 'white',
                                    'background-color': '#ffc547',
                                    'border-radius': '30px 0px 0px 30px'
                                }
                            }
                        } if (index == 2) {
                            return {
                                css: {
                                    'color': 'white',
                                    'background-color': '#6fbdff',
                                    'border-radius': '30px 0px 0px 30px'
                                }
                            }
                        }

                        return { css: {} }

                    }
                }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值