Commit 14fe8223 authored by liaozan's avatar liaozan 🏀

chore: add loading

parent fda4f68c
<!--suppress JSCheckFunctionSignatures -->
<template>
<div id="form" class="form">
......@@ -36,6 +37,7 @@
<script>
import axios from '../util/request'
import {ElMessageBox} from 'element-plus'
export default {
name: "BackendStarter",
......@@ -60,17 +62,20 @@ export default {
const blob = new Blob([data])
const link = document.createElement('a');
link.style.display = "none";
link.href = window.URL.createObjectURL(blob);
link.href = URL.createObjectURL(blob);
link.download = fileName;
document.body.appendChild(link);
link.click();
window.URL.revokeObjectURL(link.href);
URL.revokeObjectURL(link.href);
document.body.removeChild(link);
}, error => {
const reader = new FileReader();
reader.readAsText(error.data, 'utf-8');
reader.onload = function (e) {
alert(reader.result)
reader.onload = function () {
ElMessageBox.alert(JSON.parse(reader.result).message, '提示', {
confirmButtonText: '确定'
}
)
}
})
}
......
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