-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1994262
commit 7757285
Showing
4 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# generated by patch-package 6.4.14 | ||
# | ||
# declared package: | ||
# mockjs: ^1.1.0 | ||
# | ||
diff --git a/node_modules/mockjs/dist/mock.js b/node_modules/mockjs/dist/mock.js | ||
index 35d5b9a..dcc2fb9 100644 | ||
--- a/node_modules/mockjs/dist/mock.js | ||
+++ b/node_modules/mockjs/dist/mock.js | ||
@@ -8310,6 +8310,8 @@ return /******/ (function(modules) { // webpackBootstrap | ||
var xhr = createNativeXMLHttpRequest() | ||
this.custom.xhr = xhr | ||
|
||
+ MockXMLHttpRequest.prototype.upload = xhr.upload | ||
+ | ||
// 初始化所有事件,用于监听原生 XHR 对象的事件 | ||
for (var i = 0; i < XHR_EVENTS.length; i++) { | ||
xhr.addEventListener(XHR_EVENTS[i], handle) | ||
@@ -8360,6 +8362,7 @@ return /******/ (function(modules) { // webpackBootstrap | ||
|
||
// 原生 XHR | ||
if (!this.match) { | ||
+ this.custom.xhr.responseType = this.responseType || '' | ||
this.custom.xhr.send(data) | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters