You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

antd-table-export

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antd-table-export

antd-table 的前端导出

0.0.5
latest
npmnpm
Version published
Weekly downloads
352
28.47%
Maintainers
1
Weekly downloads
 
Created
Source

antd-table-export

功能描述

实现 antd-table 的数据导出功能,传入 Table 组件所需的 datasource 和 columns,即可实现前端导出。

支持导出的文件类型

xlsx、xls

使用示例

在项目中安装依赖

# 使用 npm 安装依赖
npm i --save antd-table-export

# 或者使用 yarn 安装依赖
yarn add antd-table-export

在代码中使用

1、导入模块:

import tableExport from "antd-table-export";

const exportInstance = new tableExport(datasource, columns);
exportInstance.download(tableName, "xlsx");

2、初始化 Export 实例:

const exportInstance = new tableExport(datasource, columns);

3、调用下载方法 download。

download 方法有两个参数:

  • 文件名
  • 文件类型,目前支持 xlsx、xls 两种类型,如果不传此参数,默认的文件类型是 xlsx
exportInstance.download(tableName);

Keywords

antd

FAQs

Package last updated on 08 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts