fix: 文件上传bug

This commit is contained in:
suxiaoxin 2017-09-06 17:23:52 +08:00
parent 8d52baef6a
commit 8022850605
13 changed files with 74 additions and 30 deletions

2
.gitignore vendored
View File

@ -36,7 +36,7 @@ Thumbs.db
node_modules/
plugins/
runtime/
./prd/
prd/
dev/
.tags
.tags1

View File

@ -500,7 +500,7 @@ class InterfaceEditForm extends Component {
<RadioGroup>
<Radio value="form">form</Radio>
<Radio value="json">json</Radio>
<Radio value="file">file</Radio>
{/* <Radio value="file">file</Radio> */}
<Radio value="raw">raw</Radio>
</RadioGroup>
)}
@ -533,7 +533,7 @@ class InterfaceEditForm extends Component {
</Col>
</Row>
{this.props.form.getFieldValue('req_body_type') === 'file' ?
{/* {this.props.form.getFieldValue('req_body_type') === 'file' ?
<Row className="interface-edit-item" >
<Col span={18} offset={4}>
{getFieldDecorator('req_body_other', { initialValue: this.state.req_body_other })(
@ -545,7 +545,7 @@ class InterfaceEditForm extends Component {
</Row>
:
null
}
} */}
{this.props.form.getFieldValue('req_body_type') === 'raw' ?
<Row>
<Col span={18} offset={4} >

87
npm-shrinkwrap.json generated
View File

@ -594,7 +594,7 @@
},
"babel-helper-bindify-decorators": {
"version": "6.24.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz",
"resolved": "https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz",
"integrity": "sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=",
"requires": {
"babel-runtime": "6.26.0",
@ -656,7 +656,7 @@
},
"babel-helper-explode-class": {
"version": "6.24.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz",
"resolved": "https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz",
"integrity": "sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=",
"requires": {
"babel-helper-bindify-decorators": "6.24.1",
@ -837,7 +837,7 @@
},
"babel-plugin-syntax-class-constructor-call": {
"version": "6.18.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz",
"integrity": "sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY="
},
"babel-plugin-syntax-class-properties": {
@ -852,7 +852,7 @@
},
"babel-plugin-syntax-do-expressions": {
"version": "6.13.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz",
"integrity": "sha1-V0d1YTmqJtOQ0JQQsDdEugfkeW0="
},
"babel-plugin-syntax-dynamic-import": {
@ -867,7 +867,7 @@
},
"babel-plugin-syntax-export-extensions": {
"version": "6.13.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz",
"integrity": "sha1-cKFITw+QiaToStRLrDU8lbmxJyE="
},
"babel-plugin-syntax-flow": {
@ -877,7 +877,7 @@
},
"babel-plugin-syntax-function-bind": {
"version": "6.13.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz",
"integrity": "sha1-SMSV8Xe98xqYHnMvVa3AvdJgH0Y="
},
"babel-plugin-syntax-jsx": {
@ -917,7 +917,7 @@
},
"babel-plugin-transform-class-constructor-call": {
"version": "6.24.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz",
"integrity": "sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=",
"requires": {
"babel-plugin-syntax-class-constructor-call": "6.18.0",
@ -938,7 +938,7 @@
},
"babel-plugin-transform-decorators": {
"version": "6.24.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz",
"integrity": "sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=",
"requires": {
"babel-helper-explode-class": "6.24.1",
@ -960,7 +960,7 @@
},
"babel-plugin-transform-do-expressions": {
"version": "6.22.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz",
"integrity": "sha1-KMyvkoEtlJws0SgfaQyP3EaK6bs=",
"requires": {
"babel-plugin-syntax-do-expressions": "6.13.0",
@ -1086,7 +1086,7 @@
},
"babel-plugin-transform-es2015-modules-simple-commonjs": {
"version": "0.3.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-transform-es2015-modules-simple-commonjs/-/babel-plugin-transform-es2015-modules-simple-commonjs-0.3.0.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-simple-commonjs/-/babel-plugin-transform-es2015-modules-simple-commonjs-0.3.0.tgz",
"integrity": "sha1-wV71BpZ8Hui3KQzt7Nukr2WB7h4=",
"requires": {
"babel-plugin-transform-strict-mode": "6.24.1",
@ -1202,7 +1202,7 @@
},
"babel-plugin-transform-export-extensions": {
"version": "6.22.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz",
"integrity": "sha1-U3OLR+deghhYnuqUbLvTkQm75lM=",
"requires": {
"babel-plugin-syntax-export-extensions": "6.13.0",
@ -1220,7 +1220,7 @@
},
"babel-plugin-transform-function-bind": {
"version": "6.22.0",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz",
"integrity": "sha1-xvuOlqwpajELjPjqQBRiQH3fapc=",
"requires": {
"babel-plugin-syntax-function-bind": "6.13.0",
@ -1403,7 +1403,7 @@
},
"babel-preset-es2017": {
"version": "6.24.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz",
"resolved": "https://registry.npmjs.org/babel-preset-es2017/-/babel-preset-es2017-6.24.1.tgz",
"integrity": "sha1-WXvq37n38gi8/YoS6bKym4svFNE=",
"requires": {
"babel-plugin-syntax-trailing-function-commas": "6.22.0",
@ -1489,7 +1489,7 @@
},
"babel-preset-stage-0": {
"version": "6.24.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz",
"resolved": "https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz",
"integrity": "sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo=",
"requires": {
"babel-plugin-transform-do-expressions": "6.22.0",
@ -1499,7 +1499,7 @@
},
"babel-preset-stage-1": {
"version": "6.24.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz",
"resolved": "https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz",
"integrity": "sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=",
"requires": {
"babel-plugin-transform-class-constructor-call": "6.24.1",
@ -1509,7 +1509,7 @@
},
"babel-preset-stage-2": {
"version": "6.24.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz",
"resolved": "https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz",
"integrity": "sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=",
"requires": {
"babel-plugin-syntax-dynamic-import": "6.18.0",
@ -1644,7 +1644,7 @@
},
"better-log": {
"version": "1.3.3",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/better-log/-/better-log-1.3.3.tgz",
"resolved": "https://registry.npmjs.org/better-log/-/better-log-1.3.3.tgz",
"integrity": "sha1-IZocA4Oo+cRBaJfto6z5tNaZDo8="
},
"big.js": {
@ -15382,12 +15382,14 @@
}
},
"ykit-config-es6": {
"version": "0.4.1",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/ykit-config-es6/-/ykit-config-es6-0.4.1.tgz",
"integrity": "sha1-prmx3IegeplSjVeKgXy6tfYaT9A=",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/ykit-config-es6/-/ykit-config-es6-1.1.0.tgz",
"integrity": "sha512-42ykz8wVk+7uz8bb4LIbnK4iCR/rmPEZ+Hgp31d3zGSbnn/fhsaIjWUlCZK+cyAdMXJFojIersqK3qWo0rbu6g==",
"requires": {
"babel-core": "6.26.0",
"babel-loader": "6.4.1",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"babel-plugin-transform-es2015-modules-simple-commonjs": "0.3.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-polyfill": "6.26.0",
@ -15441,6 +15443,34 @@
"ykit-config-es6": "0.4.1"
},
"dependencies": {
"async": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.0.tgz",
"integrity": "sha1-J5ZkJyNXOFlWVjP8YnRES+4vjOM="
},
"happypack": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/happypack/-/happypack-3.1.0.tgz",
"integrity": "sha1-i8VeNwG6z/cY04icuItQIWQcrVk=",
"requires": {
"async": "1.5.0",
"json-stringify-safe": "5.0.1",
"loader-utils": "0.2.16",
"mkdirp": "0.5.1",
"serialize-error": "2.1.0"
}
},
"loader-utils": {
"version": "0.2.16",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.16.tgz",
"integrity": "sha1-8IYyBm7YKCg13/iN+1JwR2Wt7m0=",
"requires": {
"big.js": "3.1.3",
"emojis-list": "2.1.0",
"json5": "0.5.1",
"object-assign": "4.1.1"
}
},
"react": {
"version": "15.4.2",
"resolved": "https://repo.corp.qunar.com/artifactory/api/npm/npm-qunar/react/-/react-15.4.2.tgz",
@ -15460,6 +15490,23 @@
"loose-envify": "1.3.1",
"object-assign": "4.1.1"
}
},
"ykit-config-es6": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/ykit-config-es6/-/ykit-config-es6-0.4.1.tgz",
"integrity": "sha512-V0XWfLdN7ea1fb8FRr9tGBTX/Ep8PtoR12yE1Pjsm5yCdCvxNrES0Lc8tzs+frXL/KXv3vTXG2jshCtO7wDmXw==",
"requires": {
"babel-core": "6.26.0",
"babel-loader": "6.4.1",
"babel-plugin-transform-es2015-modules-simple-commonjs": "0.3.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-polyfill": "6.26.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-es2017": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"extend": "3.0.1",
"happypack": "3.1.0"
}
}
}
}

View File

@ -98,7 +98,8 @@
"validate-commit-msg": "^2.12.2",
"webpack": "^3.5.5",
"webpack-dev-middleware": "^1.12.0",
"ykit-config-antd": "^0.1.3"
"ykit-config-antd": "^0.1.3",
"ykit-config-es6": "^1.1.0"
},
"devDependencies": {
"babel-plugin-import": "^1.3.1",

View File

@ -1 +1 @@
window.WEBPACK_ASSETS = {"index.js":{"js":"index@cfc6b632656fd864f0e9.js","css":"index@cfc6b632656fd864f0e9.css"},"lib":{"js":"lib@f5d23a2a5e455cd73eb0.js"},"lib2":{"js":"lib2@122f3773fc11dd227117.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}
window.WEBPACK_ASSETS = {"index.js":{"js":"index@7c9ffb76697681e3e8c5.js","css":"index@7c9ffb76697681e3e8c5.css"},"lib":{"js":"lib@c8e7cfed4754343d78aa.js"},"lib2":{"js":"lib2@a4c16bcac95ab9006475.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long