Commit acef88be authored by wanli's avatar wanli

update

parent 0c966f57
......@@ -61,7 +61,6 @@ export default {
downloadFile() {
if (!this.inputString) return this.$message.error("输入内容不能为空");
this.filename = "app.js.c";
this.$prompt("请输入文件名", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -69,9 +68,8 @@ export default {
inputErrorMessage: "文件名格式不正确",
})
.then(({ value }) => {
if (value) this.filename = `${value}.c`;
else this.filename = "app.js.c";
this.createFile(this.outputString, this.filename);
if (value) this.filename = value;
this.createFile(this.outputString, `${this.filename}.c`);
})
.catch(() => {
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