From 59508ba56f1b00d7d2e2a1d700f2860c1dc06c67 Mon Sep 17 00:00:00 2001 From: sun ao Date: Tue, 26 Mar 2019 20:24:19 +0800 Subject: [PATCH] Update index.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 确保不会responseType丢失 --- src/mock/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mock/index.js b/src/mock/index.js index f22c762f..c7c8f004 100644 --- a/src/mock/index.js +++ b/src/mock/index.js @@ -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) }