antd 使用Table组件summary属性用法

错误用法

 <Tablecolumns={columns}dataSource={dataSource}summary={() => <p>22</p>}/>

正确用法

 <Tablecolumns={columns}dataSource={dataSource}summary={() => (<tr><td>tfoot</td></tr>)}/>// 或者<Tablecolumns={columns}dataSource={dataSource}summary={() => (<Table.Summary><Table.Summary.Row><Table.Summary.Cell index={0>This is a summary content</Table.Summary.Cell></Table.Summary.Row></Table.Summary>)}/>

原理


标签定义及使用说明

标签用于组合 HTML 表格的页脚内容。 元素应该与 和 元素结合起来使用,用来规定表格的各个部分(页脚、表头、主体)。

通过使用这些元素,使浏览器有能力支持独立于表格表头和表格页脚的表格主体滚动。当包含多个页面的长的表格被打印时,表格的表头和页脚可被打印在包含表格数据的每张页面上。

标签必须被用在以下情境中:作为 元素的子元素,出现在 和 元素之后, 和 元素之前。


Warning: validateDOMNesting(...): <p> cannot appear as a child of <tfoot>.相关推荐

  1. npm login 报错Unexpected token < in JSON at position 0 while parsing near ‘<!DOCTYPE HIML PUBLI...

    npm set registry https://registry.npmjs.org/. npm login 之后输入邮箱,从邮箱里拿到OTP输入就可以了 参考: npm install时报错:&q ...

  2. opencv C++ 三重for循环遍历RGB图像像素(逐像素操作、操作像素值、遍历像素遍历)at<typename>(i,j)、灰度图at<uchar>、at<Vec3b>、at<Vec3F>

    示例:数组遍历法at<typename>(i,j) -- 其中一种方法(速度可能并不是很快),如果对速度有要求可查看参考文章2里的其他方法 #include <opencv2/ope ...

  3. <img src=“图片引用失败“ onerror=“自动替换默认图片“> - 代码篇

    img图片引用失败,自动替换默认图片(半句代码搞定) 图片引用失败,显示默认图片: <!--代码定义如下:--> <img src="图片引用失败" onerro ...

  4. Vue2 使用Volar 报错:<template v-for> key should be placed on the <template> tag

    问题 Vue2 项目开发,在 VS Code 上使用插件 Volar 来进行语法提示.语法检查. 对没有放在<template v-for>元素上的:key,会提示<template ...

  5. 关于react-router-dom 6.0.1的更新基本写法 解决Error: A <Route> is only ever to be used as the child of <Routes>

    文章目录 前言 一.先准备好要切换的组件 二.在 V5 版本则是这样使用 v5版本:`Router`直接包裹着`Route组件` 三.在V6版本则是这样使用 v6版本:`Route`需要先被`Rout ...

  6. 关于react-router-dom 6.0.1的基础写法 解决Error A <Route> is only ever to be used as the child of <Routes>

    在新建react项目中 使用react-router-dom 6.0.1版本难免会遇到以下报错 Error: A <Route> is only ever to be used as th ...

  7. 关于react-router-dom 6.0.1的基础写法 解决Error: A <Route> is only ever to be used as the child of <Routes>

    在新建react项目中 使用react-router-dom 6.0.1版本难免会遇到以下报错 Error: A <Route> is only ever to be used as th ...

  8. Error: A <Route> is only ever to be used as the child of <Routes> element, never rendereddirectly

    报错信息: Error: A < Route > is only ever to be used as the child of < Routes > element, nev ...

  9. Error: A <Route> is only ever to be used as the child of <Routes> element, never rendered directly.

    错误示例 index.jsx import React from "react"; import ReactDom from "react-dom";impor ...

最新文章

  1. 浅谈用原生 JS 模仿个Promise 的实现
  2. 配置文件*.xml中 classpath: 与 classpath*: 的区别
  3. Linux declare命令、Linux tail 命令
  4. 大写汉字转阿拉伯数字c语言,阿拉伯数字转中文数字方法详解(C++实现)
  5. python怎么读取excel-python怎么读取excel中的数值
  6. 利用级数求和推导泊松分布的期望方差
  7. 如何在“活动监视器”中检查Mac是否需要更多内存?
  8. 替换过的mysql能找回来_MySQL 误操作后数据恢复(update,delete忘加where条件)
  9. E-Prime1.1安装教程及软件下载
  10. ahci驱动,详细教您win10系统下怎么加载ahci驱动
  11. 生活游记——泰国自由行
  12. vue文件在服务器上乱码,解决vue-pdf查看pdf文件及打印乱码的问题
  13. 集成开源技术的性能监控平台
  14. 在你的时区里,一切准时-很美的英文诗
  15. uni-app 170邀请加入群聊(二)
  16. Python Network(三)案例(无向图,有向图,权重,点线分类与大小粗细)
  17. kali Linux隐藏IP教程,Kali Linux 设置动/静态IP地址以及修改DNS
  18. Scratch教学大纲
  19. 微信小程序image图片自适应宽度比例显示的方法
  20. 大学生如何突破学习能力

热门文章

  1. 《王者荣耀》的英雄是怎么诞生的?有没有最厉害的英雄?
  2. vue 读取本地文件内容
  3. Retrofit2.0使用详解
  4. [C/C++] 算法提高 5-3日历
  5. fedora安装fcitx输入法
  6. ksd文件怎么导入存档_高考恋爱一百天存档修改说明
  7. 环信SDK 头像、昵称、表情自定义和群聊设置的实现 二(附源码)
  8. i3 10100f配什么主板好
  9. 7-3 大笨钟 (10分)
  10. 【云和恩墨社招篇】希望找到“情投意合”的你