当前位置:网站首页>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 {…},来实现对应样式的更改。
边栏推荐
猜你喜欢

Rsync realizes folder or data synchronization between Win systems

边境的悍匪—机器学习实战:第十章 Keras人工神经网络简介

Generalized Focal Loss paper reading notes

QT serial 3: LORA test platform based on QT and STM32H750 (2)

【正点原子】sys.c、sys.h位带操作的简单应用

QT串口动态实时显示大量数据波形曲线(五)========“最终完美解决版”
![[Jiangsu University Self-Chemistry Association stm32F103c8t6] Notes [Introduction to 32 MCUs and Using TIM Output to Compare and Configure PWM]](/img/f8/3eabe8833caec0be25aefb72f9c86e.png)
[Jiangsu University Self-Chemistry Association stm32F103c8t6] Notes [Introduction to 32 MCUs and Using TIM Output to Compare and Configure PWM]

华秋电子成为开放原子开源基金会openDACS捐赠人,共建 openDACS开源生态

DeepLearing4j's deep learning Yolo Tiny realizes target detection

Antd简单启动一个企业级项目
随机推荐
JS的值和引用,复制和传递
边境的悍匪—机器学习实战:第十五章 使用CNN和RNN处理序列
边境的悍匪—机器学习实战:第二章 端到端的机器学习项目
Map making of environmental impact assessment based on remote sensing interpretation and GIS technology (the latest guidelines)
Through the bit operations to convert the characters are case sensitive
[Jiangsu University of Science and Technology Automation Association stm32F103c8t6] Notes [Initial 32 MCU and TIM timing interrupt initialization parameter configuration]
动态规划入门 JS
写在公众号之前——QT,ARM,DSP,单片机,电力电子与传动!
QT连载3:基于QT和STM32H750的LORA试验平台(2)
经典排序之插入排序
使用Dva项目作Antd的Demo
“R语言+遥感”的水环境综合评价方法
Biome-BGC 生态系统模型与应用
Kunlun State Screen Production (Serialization 5) --- Basics (serial port reception, text and light display)
CLUE Model Construction Method, Model Validation and Land Use Change Scenario Prediction
【正点原子】sys.c、sys.h位带操作的简单应用
TCP为什么要三次握手,握手过程中丢包会怎么样?
三种内核结构---宏内核、微内核、混合内核
CLUE模型构建方法、模型验证及土地利用变化情景预测
2021年软考中级过关