新增通用方法简化下载使用

This commit is contained in:
RuoYi
2021-09-27 12:10:39 +08:00
parent f4a2f909a7
commit 7fcb1b2e0a
7 changed files with 45 additions and 79 deletions

View File

@@ -180,7 +180,6 @@
<script>
import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen";
import importTable from "./importTable";
import { downLoadZip } from "@/utils/zipdownload";
import hljs from "highlight.js/lib/highlight";
import "highlight.js/styles/github-gist.css";
hljs.registerLanguage("java", require("highlight.js/lib/languages/java"));
@@ -270,7 +269,7 @@ export default {
this.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath);
});
} else {
downLoadZip("/code/gen/batchGenCode?tables=" + tableNames, "ruoyi");
this.$download.zip("/code/gen/batchGenCode?tables=" + tableNames, "ruoyi");
}
},
/** 同步数据库操作 */