Commit acef88be authored by wanli's avatar wanli

update

parent 0c966f57
...@@ -61,7 +61,6 @@ export default { ...@@ -61,7 +61,6 @@ export default {
downloadFile() { downloadFile() {
if (!this.inputString) return this.$message.error("输入内容不能为空"); if (!this.inputString) return this.$message.error("输入内容不能为空");
this.filename = "app.js.c";
this.$prompt("请输入文件名", "提示", { this.$prompt("请输入文件名", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -69,9 +68,8 @@ export default { ...@@ -69,9 +68,8 @@ export default {
inputErrorMessage: "文件名格式不正确", inputErrorMessage: "文件名格式不正确",
}) })
.then(({ value }) => { .then(({ value }) => {
if (value) this.filename = `${value}.c`; if (value) this.filename = value;
else this.filename = "app.js.c"; this.createFile(this.outputString, `${this.filename}.c`);
this.createFile(this.outputString, this.filename);
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment