一个基于 React 的可缩放图片控件 | A scalable image wrapper power by react
animate
,你现在可以使用这个属性来控制图片的转场动画(缩放动画暂不可控制)borwsing
,你现在可以使用这个属性来控制图片的查看状态Zmage.browsing({ src:imagePath })
这样的方式来唤出图片,其参数与 Zmage 的 props 保持一致即可animate
, you can now use this attribute to control the animation of the image fliping (the zoom animation on browsing is temporarily uncontrollable)borwsing
, you can now use this attribute to control the viewing status of the pictureZmage.browsing({ src:imagePath })
to call out the image, its parameters are consistent with Zmage's propscontrol
属性中将 download
一项设为 true
来启用它 https://github.com/Caldis/react-zmage/issues/26
download
to true
in the control
property. https://github.com/Caldis/react-zmage/issues/26
Loading
图示的呈现效果defaultPage
属性可能导致的错误问题Loading
在某些情况下的闪动问题EventListener
未能按预期释放的问题defaultPage
attributeLoading
Flashing issues in certain situationsEventListener
failed to release as expected in some casesset
的图片集合对象内允许传入属性 className
和 style
, 用于控制查看模式下的图片样式zIndex
属性在部分情况下无效的问题className
and style
in property set
to let the style of image customizablezIndex
not working in some cases.配置项 | 类型 | 默认值 |
---|---|---|
onBrowsing |
func | (browsingState)=>{} |
onZooming |
func | (zoomingState)=>{} |
onSwitching |
func | (currentPage)=>{} |
onRotating |
func | (currentAngle)=>{} |
Option | Type | Default |
---|---|---|
onBrowsing |
func | (browsingState)=>{} |
onZooming |
func | (zoomingState)=>{} |
onSwitching |
func | (currentPage)=>{} |
onRotating |
func | (currentAngle)=>{} |
backdrop
属性, 可以调整 overlay 的背景颜色zIndex
属性, 可以调整 overlay 的 z-indexbackdrop
props to adjust the overlay background.zIndex
props to adjust the overlay z-index.