New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

el-table-export

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

el-table-export

配合Element-UI中的Table组件 导出text, json, csv, xls文件

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
95
decreased by-13.64%
Maintainers
1
Weekly downloads
 
Created
Source

el-table-export

配合Element-UI中的Table组件 导出text, json, csv, xls文件

GitHub stars GitHub license

NPM

安装 Installation

npm install el-table-export --save

or

yarn add el-table-export

参数 Arguments

参数说明类型可选值默认值
fileName文件名Stringexport
type输出格式Stringtext / json / csv / xls /csv
withBOM将BOM头元添加到CSV文件Booleanfalse

例子 DEMO

说什么不如上一个demo demo文件

// 引用
import { elTableExport } from "elTableExport.js";

/* ⚠ 创建实例时需传入一个 table组件的Vue实例(必选)
 * 支持传入一个全局配置对象(非必选)
 */
let eteInstance = new elTableExport(this.$refs.elTable, {
    fileName: "export-demo",
    type: "csv",
    withBOM: false,
});
// 创建实例后使用 export() 方法执行导出功能
eteInstance.export();

提示 Tips

  • 根据依赖包中文档,注明了在Excel在读取UTF8 CSV文件时需要BOM头。
  • table组件的Vue实例不是 document.querySelector 等获取的DOM实例,是 ref 指定的Vue实例。

Keywords

FAQs

Package last updated on 07 Nov 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc