当前位置:网站首页>antd table Summary总结栏置顶
antd table Summary总结栏置顶
2022-07-30 05:46:00 【樂途途】
antd4.x table表格合计行在表头下方展示(合计行置顶,展示在顶部)
实现步骤:
1、首先给table添加sticky属性设置粘性头部
<Table
// 1、添加sticky属性
sticky
columns={
columns}
...
summary={
pageData => {
...
}}
/>
2、通过修改table中对应的css实现合计行置顶
@import '~antd/dist/antd.css';
tfoot th, tfoot td {
background: #fafafa;
}
[data-theme="dark"] tfoot th, [data-theme="dark"] tfoot td {
background: #1d1d1d;
}
// 2、搭配sticky 实现合计行置于表头下方 .ant-table-summary {
display: table-header-group;
}
实现效果:
详细的细节更改,根据自己的项目需求,可通过css样式调整实现。
如果使用less,修改antd 中table样式不生效,可使用深度作用选择器 :global {…},来实现对应样式的更改。
边栏推荐
- 如何判断 PCB 板是否变形?
- QT串口和CAN数据动态实时显示最后日志
- Generalized Focal Loss paper reading notes
- 虚拟机栈帧结构
- Basic application of XMLBean
- Antd简单启动一个企业级项目
- FPGA解析B码----连载2
- influxDB运维记录
- Based on R language geographic weighted regression, principal component analysis, discriminant analysis and other spatial heterogeneity data analysis
- 闭包(你不知道的JS)
猜你喜欢

【江科大自化协stm32F103c8t6】笔记之【入门32单片机及GPIO初始化参数配置】

Diwen serial screen production (serialization 1) ===== preparation work

QT每周技巧(2)~~~~~~~~~界面按钮

干货:线上下单应知应会,快来了解下

influxDB运维记录

昆仑通态屏幕制作(连载3)---基础篇(按钮串口发送)

求职准备知识点

QT serial 3: LORA test platform based on QT and STM32H750 (2)
Three working modes of CPU: real mode, protected mode, long mode

OpenLayers (ol包),Vite显示地图(附源码)
随机推荐
干货:线上下单应知应会,快来了解下
[Jiangsu University Self-Chemistry Association stm32F103c8t6] Notes [Introduction to 32 MCUs and Using TIM Output to Compare and Configure PWM]
openssl 1.1.1 compile statement
华秋第八届硬创赛与安创加速器达成战略合作,助力硬科技项目成长
边境的悍匪—机器学习实战:第十三章 使用TensorFlow加载和预处理数据
BLDC电机应用持续火爆,“网红神器”筋膜枪前景几何?
[Punctuality Atom] Simple application of sys.c, sys.h bit-band operations
多层板的层数,为啥选项都是偶数?就不能选奇数?
Diwen serial screen production (serialization 1) ===== preparation work
TCP为什么要三次握手,握手过程中丢包会怎么样?
【江科大自化协stm32F103c8t6】笔记之【入门32单片机及GPIO初始化参数配置】
昆仑通态屏幕制作(连载3)---基础篇(按钮串口发送)
PCB 一分钟科普之你真的懂多层板吗?
Difference between logical shift right and arithmetic right shift
主机和从机配置,建立ssh连接实现Rviz远程控制
动态规划入门 JS
Sklearn : train_test_split()函数的用法
Simulation of Future Air Pollution Changes Based on Global Model Comparison Program CMIP6 and Regional Climate-Chemistry Coupling Model WRF-Chem
QT serial 3: LORA test platform based on QT and STM32H750 (2)
survivor区对象何时进入老年代(深入理解jvm中表述不准确的地方)