diff --git a/src/components/Form/index.jsx b/src/components/Form/index.jsx index 60533d69..e74c2572 100644 --- a/src/components/Form/index.jsx +++ b/src/components/Form/index.jsx @@ -474,7 +474,7 @@ export default class BaseForm extends React.Component { getUploadRequestConf = () => { return { onUploadProgress: this.onUploadProgress, - canToken: this.cancelToken, + cancelToken: this.cancelToken, }; }; @@ -637,6 +637,17 @@ export default class BaseForm extends React.Component { ); } + renderAbortButton() { + if (!this.isSubmitting || this.isModal) { + return null; + } + return ( + + ); + } + renderSubmittingTip() { if (!this.hasRequestCancelCallback) { return; @@ -648,6 +659,7 @@ export default class BaseForm extends React.Component {
+ {this.renderAbortButton()} ); } diff --git a/src/locales/en.json b/src/locales/en.json index 559c968c..ad7cdb30 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -42,6 +42,7 @@ "ARM Architecture": "ARM Architecture", "Abandon Stack": "Abandon Stack", "Abandoning this stack will preserve the resources deployed by the stack.": "Abandoning this stack will preserve the resources deployed by the stack.", + "Abort Upload": "Abort Upload", "Accept Volume Transfer": "Accept Volume Transfer", "Access Control": "Access Control", "Access Key": "Access Key", diff --git a/src/locales/zh.json b/src/locales/zh.json index c99fc1aa..0e03e6c7 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -42,6 +42,7 @@ "ARM Architecture": "ARM架构", "Abandon Stack": "废弃堆栈", "Abandoning this stack will preserve the resources deployed by the stack.": "废弃此堆栈将保留堆栈部署的资源。", + "Abort Upload": "取消上传", "Accept Volume Transfer": "接受云硬盘转让", "Access Control": "访问控制", "Access Key": "访问密钥",