0.0.8 • Published 5 years ago

igroot-import-excel v0.0.8

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

导入 Excel 数据组件

何时使用

需要导入 excel 数据到表格中,导入的数据是个二维数组,同时希望定义导入的二维数据的 key。

安装方法(请修改您的业务组件的安装方法)

  sl add -c igroot-import-excel

API

<IgrootImportExcel 
  columnRules={columnRules}
  onImportSuccess={this.handleImportSuccess}
>
  <Button> 上传 Excel 文件</Button>
</IgrootImportExcel>

属性

参数说明类型默认值
style样式Object-
className扩展样式类名String-
type类型String两种类型:'click' 和 'drag', 默认值 'click'
autoPreview是否预览booleanfalse
columnRules配置要显示的字段Object-
onImportSuccess导入成功的回调函数function-

columnRules

columnRules = {
  "ISP": {
    key: 'isp',
    width: 50
  },
  "城市": {
    key: 'city',
    width: 100
  }
}
0.0.8

5 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago