1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-09-06 17:49:50 +08:00

Update index.js

确保不会responseType丢失
This commit is contained in:
sun ao 2019-03-26 20:24:19 +08:00 committed by GitHub
parent 331173ffee
commit 59508ba56f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,8 @@ Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send
Mock.XHR.prototype.send = function() {
if (this.custom.xhr) {
this.custom.xhr.withCredentials = this.withCredentials || false
// 确保 responseType 不会丢失
this.custom.xhr['responseType'] = this['responseType']
}
this.proxy_send(...arguments)
}