Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.
/ el-table-export Public archive

Quickly export text, json, csv, xls files in the Element-UI Table component.

License

Notifications You must be signed in to change notification settings

tuanzisama/el-table-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

el-table-export

Make the Table component in Element-UI support exporting text, json, csv, xls files.

GitHub stars GitHub license Rate on Openbase

NPM

简体中文 文档

Installation

npm install el-table-export --save

or

yarn add el-table-export

Arguments

Name Desc Type Optional Default
fileName File Name String export
type Export Type String text / json / csv / xls csv
withBOM Add BOM(byte order mark) meta to CSV file. BOM is expected by Excel when reading UTF8 CSV file. Boolean false
useFormatter Whether to use the formatter attribute provided by Element-UI. Boolean true
delimiter Available when the export format is CSV file. Source String ,

DEMO

Live demo on CodePen

Demo File

import elTableExport from "el-table-export";

elTableExport(this.$refs.elTable, {
    fileName: "export-demo",
    type: "csv",
    withBOM: false,
}).then((result) => {
    console.info("successfully");
}).catch((err) => {
    console.info("Error: " , err);
});

About

Quickly export text, json, csv, xls files in the Element-UI Table component.

Topics

Resources

License

Stars

Watchers

Forks