no message
Former-commit-id: e60136c9a66a0251aebf8f001a0d20bfc2af9276 Former-commit-id: 7f8aa0345693d68714632975b7640263cda38dde Former-commit-id: c24b9cd2deb563a520f52c948d8f9721cd71d10f
This commit is contained in:
@@ -4,6 +4,30 @@
|
||||
slot="header"
|
||||
title="导出文本">
|
||||
</PageHeader>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
placeholder="请输入内容"
|
||||
v-model="text">
|
||||
</el-input>
|
||||
<div class="dd-mt dd-mb">
|
||||
<el-button @click="exportTxt">保存为 txt</el-button>
|
||||
</div>
|
||||
<Markdown url="/static/markdownFiles/article/插件 - 导出.md"></Markdown>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
text: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
exportTxt () {
|
||||
console.log('1')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -24,7 +24,7 @@ this.$export.csv({
|
||||
columns,
|
||||
data
|
||||
})
|
||||
.then(data => {
|
||||
.then(() => {
|
||||
// ...可选回调
|
||||
})
|
||||
```
|
||||
@@ -80,7 +80,7 @@ this.$export.excel({
|
||||
columns,
|
||||
data
|
||||
})
|
||||
.then(data => {
|
||||
.then(() => {
|
||||
// ...可选回调
|
||||
})
|
||||
```
|
||||
@@ -133,7 +133,7 @@ this.$export.excel({
|
||||
columns,
|
||||
data
|
||||
})
|
||||
.then(data => {
|
||||
.then(() => {
|
||||
// ...可选回调
|
||||
})
|
||||
```
|
||||
@@ -149,28 +149,4 @@ this.$export.excel({
|
||||
示例
|
||||
|
||||
```
|
||||
const columns = [
|
||||
{
|
||||
label: '姓名',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
label: '年龄',
|
||||
prop: 'age'
|
||||
}
|
||||
]
|
||||
const data = [
|
||||
{
|
||||
name: 'lucy',
|
||||
age: 24
|
||||
},
|
||||
{
|
||||
name: 'bob',
|
||||
age: 26
|
||||
}
|
||||
]
|
||||
this.$export.excel({
|
||||
columns,
|
||||
data
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user