From 079487a64f72425a359bde4bce9cbf6a57830f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com> Date: Mon, 12 Feb 2018 22:00:29 +0800 Subject: [PATCH] no message Former-commit-id: 6a3cc9d6f63a2f44ec4c89cec54c59143fa7b4cd Former-commit-id: 32b5e46554b922549a09af3024ff9dc12d4dc3a2 Former-commit-id: 73289664f73730518901751292cfaa09d9bf608e --- src/pages/demo/plugins/export/txt.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/demo/plugins/export/txt.vue b/src/pages/demo/plugins/export/txt.vue index 57b00241..c36bc5fb 100644 --- a/src/pages/demo/plugins/export/txt.vue +++ b/src/pages/demo/plugins/export/txt.vue @@ -7,7 +7,7 @@
@@ -29,6 +29,12 @@ export default { }, methods: { exportTxt () { + // 校验是不是空 + if (this.text === '') { + this.$message('虽然可以为空 但是出于体验不建议这样 还是写点东西吧') + return + } + // 导出 this.$export.txt({ text: this.text, title: '文本'