有没有办法在ant design图片预览操作中更改图标?
Is there a way to change icons in the ant design image preview operations?
我正在使用 ant design 的图像组件,它也有预览,在右上角有图像的缩放旋转等操作,但我想更改这些图标,我发现有一个图标 属性 用于预览配置道具,但我无法弄清楚结构是怎样的,因为它没有在文档中给出。
<Image
src={imageUrl}
preview={{
visible: state.visible,
onVisibleChange: (visible) => closeModal(),
destroyOnClose: true,
icons: [] -- How do I add custom icons here?
}}
/>
export const icons = {
rotateLeft: <RotateLeftOutlined />,
rotateRight: <RotateRightOutlined />,
zoomIn: <ZoomInOutlined />,
zoomOut: <ZoomOutOutlined />,
close: <CloseOutlined />,
left: <LeftOutlined />,
right: <RightOutlined />,
};
默认图标
我正在使用 ant design 的图像组件,它也有预览,在右上角有图像的缩放旋转等操作,但我想更改这些图标,我发现有一个图标 属性 用于预览配置道具,但我无法弄清楚结构是怎样的,因为它没有在文档中给出。
<Image
src={imageUrl}
preview={{
visible: state.visible,
onVisibleChange: (visible) => closeModal(),
destroyOnClose: true,
icons: [] -- How do I add custom icons here?
}}
/>
export const icons = {
rotateLeft: <RotateLeftOutlined />,
rotateRight: <RotateRightOutlined />,
zoomIn: <ZoomInOutlined />,
zoomOut: <ZoomOutOutlined />,
close: <CloseOutlined />,
left: <LeftOutlined />,
right: <RightOutlined />,
};
默认图标