1,进入antDesign官网,粘贴table代码

2,看代码各个部分实现什么功能,根据需求改代码

表格类似如下:

代码如下:

const columns = [
{
title: 'Name',
dataIndex: 'name',
key: 'name',
render: text => <a href="javascript:;">{text}</a>,
},
{
title: 'Age',
dataIndex: 'age',
key: 'age',
},
......
const data = [
{
key: '1',
name: 'John Brown',
age: 32,
address: 'New York No. 1 Lake Park',
tags: ['nice', 'developer'],
},
{
key: '2',
name: 'Jim Green',
age: 42,
address: 'London No. 1 Lake Park',
tags: ['loser'],
},
......
//渲染 看渲染所需数据可知复制这部分代码即可
ReactDOM.render(<Table columns={columns} dataSource={data} />, mountNode);
 

//confirm框
function showConfirm() {
confirm({
title: 'Do you Want to delete these items?',
content: 'Some descriptions',
onOk() {
console.log('OK');
},
onCancel() {
console.log('Cancel');
},
});
}
//渲染

ReactDOM.render(
<div>
<Button onClick={showConfirm}>Confirm</Button>
<Button onClick={showDeleteConfirm} type="dashed">
Delete
</Button>
<Button onClick={showPropsConfirm} type="dashed">
With extra props
</Button>
</div>,
mountNode,
);

5-2 使用antDesign的Table 及 modal(对话情景框) 功能的更多相关文章

  1. JS实现页面table鼠标移动改变tr行颜色,单击tr选中复选框功能

    JS源代码: //需要设置tr背景颜色 var highlightcolor='#bfecfc'; //设置背景颜色 function changeto(index){ var tr1 = docum ...

  2. 为Bootstrap Modal(模态框)全局添加拖拽操作

    在js中绑定方法 $(document).on("show.bs.modal", ".modal", function(){ $(this).draggable ...

  3. Bootstrap Blazor 组件介绍 Table (三)列数据格式功能介绍

    Bootstrap Blazor 是一套企业级 UI 组件库,适配移动端支持各种主流浏览器,已经在多个交付项目中使用.通过本套组件可以大大缩短开发周期,节约开发成本.目前已经开发.封装了 70 多个组 ...

  4. ant-design的Table组件自定义空状态

    Table,是antd中一个我们经常使用的组件,在官方文档中给出了非常详细的实例以及API, 但在我们在使用过程中可能需要根据项目的要求来定制空状态时的展示. 什么是空状态呢? 在antd的官方文档中 ...

  5. ant-design里为了清空Modal中的值, modal 中值有缓存 ....

    处理列表中的编辑功能,发现有点爽,看的都是上次编辑后内容, 搜文档 也没说具体怎么清空旧的状态 网上搜了下,说给 moal 设置一个不同的key 试了,用这方式可以解决问题,  只要这个key是全新的 ...

  6. jquery学习笔记(4)--实现table隔行变色以及单选框选中

    <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> &l ...

  7. 解决select2 在modal中搜索框无效的问题

    $.fn.modal.Constructor.prototype.enforceFocus = function() {};

  8. table样式的下拉框(angularjs)

    前言 虽然使用的技术比较老了,但是思想却还是适用于现在的vue等框架. 一:实现的样式 二:实现包括的功能点 1:下拉框内容是表格,类似于一个弹窗 表格内容最多六行,超出的显示滚动条,表头固定,可滚动 ...

  9. table中列复选框全选,再选 效果

    <table class="table table-striped sortable table-bordered table-hover " id="zdnews ...

随机推荐

  1. mybatis的8月29日

    一.select查询语句 1.mybatis的映射,jdbc预处理 <select id="selectPerson" parameterType="int&quo ...

  2. js location.href 的用法

    self.location.href="/url" 当前页面打开URL页面: this.location.href="/url" 当前页面打开URL页面: pa ...

  3. Codeforces Gym 102392F Game on a Tree (SEERC2019 F题) 题解

    题目链接:https://codeforces.com/gym/102392/problem/F 题意:被这题题意坑了很久,大意是说有一棵根为 \(1\) 的树,每个节点初始都是白色, \(Alice ...

  4. JAVA(5)之关于main函数的默认放置位置

    Eclipse默认主程序入口 Public class 的main函数 package com.study; public class Test { public static void main(S ...

  5. tkinter学习(5)messagebox、pack、grid和place方法

    1.messagebox信息弹出框 1.1 代码: import tkinter as tk #导出tk模块 import tkinter.messagebox #导出弹出信息框 #定义窗口.标题.大 ...

  6. 【struts 报错】 No action config found for the specified url

    1 type Exception report message org.apache.struts.chain.commands.InvalidPathException: No action con ...

  7. Educational Codeforces Round 77 (Rated for Div. 2)D(二分+贪心)

    这题二分下界是0,所以二分写法和以往略有不同,注意考虑所有区间,并且不要死循环... #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> ...

  8. SQLite - C/C++接口 API(一)

    1.sqlite3_open(const char *filename, sqlite3 **ppDb) 该例程打开一个指向 SQLite 数据库文件的连接,返回一个用于其他 SQLite 程序的数据 ...

  9. idea中使用Autowired注入时报红,但是运行不报错

    在Preferences中如下设置,即可解除报红错误: 将Autowiring for Bean Class的Severity级别设置为Warning

  10. mongdb 复制集

    步骤: 一.启动三台进程 1../bin/mongod --dbpath=/home/work/app/mongodb/mongodb-linux-x86_64-amazon-3.2.7/data/r ...