mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
demo: adjust image toolbarRender (#43496)
This commit is contained in:
parent
4f416c64b1
commit
9f509d3be9
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user