保存进度!

This commit is contained in:
Kane Wang 2022-10-31 18:01:26 +08:00
parent a89f773825
commit fe484c0eec
2 changed files with 7 additions and 2 deletions

View File

@ -67,6 +67,7 @@
const xhr = new XMLHttpRequest();
//处理进度
xhr.upload.onprogress = function (event) {
if (event.lengthComputable) {
let percent = Math.round(
@ -77,6 +78,7 @@
}
};
//传送完成
xhr.onload = function (event) {
console.log(xhr.responseText);

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2022-10-31 13:11:55
* @LastEditors: Kane
* @LastEditTime: 2022-10-31 16:56:04
* @LastEditTime: 2022-10-31 17:13:25
* @FilePath: \car_dealer\vue\axios.html
* @Description:
*
@ -67,7 +67,9 @@
<script>
const app = {
data() {
return {};
return {
test: "测试this",
};
},
methods: {
@ -76,6 +78,7 @@
file_path: "file path",
table_name: "车商表",
};
axios
.post(IMPORT_CARDEALER_URL, param)
.then((response) => {