保存进度!
This commit is contained in:
parent
a89f773825
commit
fe484c0eec
@ -67,6 +67,7 @@
|
|||||||
|
|
||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
|
|
||||||
|
//处理进度
|
||||||
xhr.upload.onprogress = function (event) {
|
xhr.upload.onprogress = function (event) {
|
||||||
if (event.lengthComputable) {
|
if (event.lengthComputable) {
|
||||||
let percent = Math.round(
|
let percent = Math.round(
|
||||||
@ -77,6 +78,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//传送完成
|
||||||
xhr.onload = function (event) {
|
xhr.onload = function (event) {
|
||||||
console.log(xhr.responseText);
|
console.log(xhr.responseText);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-10-31 13:11:55
|
* @Date: 2022-10-31 13:11:55
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2022-10-31 16:56:04
|
* @LastEditTime: 2022-10-31 17:13:25
|
||||||
* @FilePath: \car_dealer\vue\axios.html
|
* @FilePath: \car_dealer\vue\axios.html
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@ -67,7 +67,9 @@
|
|||||||
<script>
|
<script>
|
||||||
const app = {
|
const app = {
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
test: "测试this!",
|
||||||
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -76,6 +78,7 @@
|
|||||||
file_path: "file path",
|
file_path: "file path",
|
||||||
table_name: "车商表",
|
table_name: "车商表",
|
||||||
};
|
};
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.post(IMPORT_CARDEALER_URL, param)
|
.post(IMPORT_CARDEALER_URL, param)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user