no message

Former-commit-id: 9d931bf8ee17498b3cb6a4e8747a35379053d292
Former-commit-id: 839c0a8471016d910c9504e5a1e6cbd22a95479a
Former-commit-id: 7ffc8041a93f682c2b0cc6bed1c400437dff29fb
This commit is contained in:
liyang
2018-06-05 16:21:06 +08:00
parent f29021343b
commit b5493ec1c2
7 changed files with 60 additions and 40 deletions

View File

@@ -1,48 +0,0 @@
<template>
<Container>
<PageHeader
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 type="primary" @click="exportTxt">
<Icon name="download"></Icon>
保存为 txt
</el-button>
</div>
<Markdown url="/static/md/插件 - 导出.md"></Markdown>
</Container>
</template>
<script>
export default {
data () {
return {
text: ''
}
},
methods: {
exportTxt () {
// 校验是不是空
if (this.text === '') {
this.$message('虽然可以为空 但是出于体验不建议这样 还是写点东西吧')
return
}
// 导出
this.$export.txt({
text: this.text,
title: '文本'
})
.then(() => {
this.$message('导出文本成功')
})
}
}
}
</script>