no message

Former-commit-id: 4d819afc5d57441ab734ed1ad08d5a647b630a76
Former-commit-id: 5268af71a59b7da8106255c21097796295a65a33
Former-commit-id: b6177a970d7cd869a4d0e409d81bfd1785606503
This commit is contained in:
李杨
2018-02-11 18:10:34 +08:00
parent 4a95d27c4d
commit 38de16e912
2 changed files with 71 additions and 13 deletions

View File

@@ -66,4 +66,55 @@ this.$export.csv({
columns,
data
})
```
```
## Vue.$export.excel()
使用
```
this.$export.excel({
columns,
data
})
.then(data => {
// ...可选回调
})
```
参数
| 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 |
| --- | --- | --- | --- | --- | --- |
| columns | 列 | 非 | Array | | 空数组 |
| data | 行数据 | 非 | Array | | 空数组 |
示例
```
const columns = [
{
label: '姓名',
prop: 'name'
},
{
label: '年龄',
prop: 'age'
}
]
const data = [
{
name: 'lucy',
age: 24
},
{
name: 'bob',
age: 26
}
]
this.$export.excel({
columns,
data
})
```