daisy
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
5 additions and
2 deletions
-
components/image/demo/imageRender.tsx
-
components/image/demo/toolbarRender.md
-
components/image/demo/toolbarRender.tsx
|
|
@ -13,6 +13,7 @@ const App: React.FC = () => ( |
|
|
|
src="https://mdn.alipayobjects.com/huamei_iwk9zp/afts/file/A*uYT7SZwhJnUAAAAAAAAAAAAADgCCAQ" |
|
|
|
/> |
|
|
|
), |
|
|
|
toolbarRender: () => null, |
|
|
|
}} |
|
|
|
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" |
|
|
|
/> |
|
|
|
|
|
@ -1,10 +1,10 @@ |
|
|
|
## zh-CN |
|
|
|
|
|
|
|
可以自定义工具栏并添加下载图片按钮。 |
|
|
|
可以自定义工具栏并添加下载原图或翻转旋转后图片的按钮。 |
|
|
|
|
|
|
|
## en-US |
|
|
|
|
|
|
|
You can customize the toolbar and add a button for downloading the image. |
|
|
|
You can customize the toolbar and add a button for downloading the original image or downloading the flipped and rotated image. |
|
|
|
|
|
|
|
```css |
|
|
|
.toolbar-wrapper { |
|
|
|
|
|
@ -12,6 +12,8 @@ import React from 'react'; |
|
|
|
const src = 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'; |
|
|
|
|
|
|
|
const App: React.FC = () => { |
|
|
|
// or you can download flipped and rotated image
|
|
|
|
// https://codesandbox.io/s/zi-ding-yi-gong-ju-lan-antd-5-7-0-forked-c9jvmp
|
|
|
|
const onDownload = () => { |
|
|
|
fetch(src) |
|
|
|
.then((response) => response.blob()) |
|
|
|