1 Star 5 Fork 5

smallwei / avue-plugin-excel

加入 Gitee
与超过 1000 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README.md

Avue Excel导入导出插件

Avue官网

https://avuejs.com

介绍

使用

1.安装
npm install avue-plugin-excel --save

2.导入
import $Excel from 'avue-plugin-excel'

3.使用

导出
let opt = {
  title: '文档标题',
  column: [{
    label: '复杂表头',
    prop: 'header',
    children: [
      {
        label: '姓名',
        prop: 'name'
      }, {
        label: '年龄',
        prop: 'sex'
      }
    ]
  }],
  data: [{
    name:'张三',
    sex:12
  }]
}
$Excel.excel({
  title: opt.title,
  columns: opt.column,
  data: opt.data
});


导入
//files为excel文件
$Excel.xlsx(files).then(data => {
  console.log(data.results) //导出的json数组
})

简介

Avue的Excel导入导出插件 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/smallweigit/avue-plugin-excel.git
git@gitee.com:smallweigit/avue-plugin-excel.git
smallweigit
avue-plugin-excel
avue-plugin-excel
master

搜索帮助

E71a60c3 8189591 Df7b7c6b 8189591