mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
Upload add props openFileDialogOnClick
This commit is contained in:
parent
85749c94fb
commit
0b9d00a0ad
@ -36,6 +36,7 @@ Uploading is the process of publishing information (web pages, text, pictures, v
|
||||
| showUploadList | Whether to show default upload list, could be an object to specify `showPreviewIcon` and `showRemoveIcon` individually | Boolean or { showPreviewIcon?: boolean, showRemoveIcon?: boolean } | true |
|
||||
| supportServerRender | Need to be turned on while the server side is rendering. | boolean | false |
|
||||
| withCredentials | ajax upload with cookie sent | boolean | false |
|
||||
| openFileDialogOnClick | click open file dialog | boolean | true |
|
||||
| onChange | A callback function, can be executed when uploading state is changing. See [onChange](#onChange) | Function | - |
|
||||
| onPreview | A callback function, will be executed when file link or preview icon is clicked. | Function(file) | - |
|
||||
| onRemove | A callback function, will be executed when removing file button is clicked, remove event will be prevented when return value is `false` or a Promise which resolve(false) or reject. | Function(file): `boolean | Promise` | - |
|
||||
|
@ -37,6 +37,7 @@ title: Upload
|
||||
| showUploadList | 是否展示 uploadList, 可设为一个对象,用于单独设定 showPreviewIcon 和 showRemoveIcon | Boolean or { showPreviewIcon?: boolean, showRemoveIcon?: boolean } | true |
|
||||
| supportServerRender | 服务端渲染时需要打开这个 | boolean | false |
|
||||
| withCredentials | 上传请求时是否携带 cookie | boolean | false |
|
||||
| openFileDialogOnClick | 点击打开文件对话框 | boolean | true |
|
||||
| onChange | 上传文件改变时的状态,详见 [onChange](#onChange) | Function | 无 |
|
||||
| onPreview | 点击文件链接或预览图标时的回调 | Function(file) | 无 |
|
||||
| onRemove | 点击移除文件时的回调,返回值为 false 时不移除。支持返回一个 Promise 对象,Promise 对象 resolve(false) 或 reject 时不移除。 | Function(file): `boolean | Promise` | 无 |
|
||||
|
@ -74,6 +74,7 @@ export interface UploadProps {
|
||||
prefixCls?: string;
|
||||
customRequest?: (option: any) => void;
|
||||
withCredentials?: boolean;
|
||||
openFileDialogOnClick?: boolean;
|
||||
locale?: UploadLocale;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
||||
"rc-tree": "~1.14.5",
|
||||
"rc-tree-select": "~2.2.0",
|
||||
"rc-trigger": "^2.5.4",
|
||||
"rc-upload": "~2.5.0",
|
||||
"rc-upload": "~2.6.0",
|
||||
"rc-util": "^4.0.4",
|
||||
"react-lazy-load": "^3.0.12",
|
||||
"react-lifecycles-compat": "^3.0.2",
|
||||
|
Loading…
Reference in New Issue
Block a user