mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
style: fix the style of progress rendering at the top of component Image PreviewGroup (#35092)
* style: fix the style of progress rendering at the top of component Image PreviewGroup * style: add debug-demo for top progress countRender
This commit is contained in:
parent
eb7f8c7ef1
commit
9038524376
37
components/image/demo/preview-group-top-progress.md
Normal file
37
components/image/demo/preview-group-top-progress.md
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
order: 100
|
||||
title:
|
||||
zh-CN: 多图预览时顶部进度自定义
|
||||
en-US: Top progress customization when previewing multiple images
|
||||
debug: true
|
||||
---
|
||||
|
||||
## zh-CN
|
||||
|
||||
多图预览时顶部展示进度, 支持自定义
|
||||
|
||||
## en-US
|
||||
|
||||
The progress is displayed at the top of the multi-image preview, and customization is supported
|
||||
|
||||
```jsx
|
||||
import { Image } from 'antd';
|
||||
|
||||
const App = () => (
|
||||
<Image.PreviewGroup
|
||||
preview={{ countRender: (current, total) => `当前 ${current} / 总计 ${total}` }}
|
||||
>
|
||||
<Image width={150} src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" />
|
||||
<Image
|
||||
width={150}
|
||||
src="https://gw.alipayobjects.com/zos/antfincdn/aPkFc8Sj7n/method-draw-image.svg"
|
||||
/>
|
||||
<Image
|
||||
width={150}
|
||||
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
|
||||
/>
|
||||
</Image.PreviewGroup>
|
||||
);
|
||||
|
||||
export default App;
|
||||
```
|
@ -135,6 +135,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-progress {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
&-icon {
|
||||
font-size: @image-preview-operation-size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user