1.0.0 • Published 6 years ago

react-native-single-zoom-image v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

react-native-single-zoom-image

为图片(Image)组件添加了移动、缩放、旋转功能;

Preview

使用 Demo

import React from 'react'
import { Image, View } from 'react-native'
import ZoomImage from '../components/ZoomImage'

export default function ZoomImageExample() {
  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <ZoomImage source={require('../../../../XMKOH81.jpg')} width={300} height={300} />
    </View>
  )
}

Props

Propstypedescriptionrequireddefault
sourceany同 Image 的sourceYes
widthnumber图片初始的宽No
heightnumber图片初始的高No
styleobject样式No
canRotatebool能否旋转
canZoombool能否缩放
onHandleTouchfunction外部处理当前图片是否正处理手势操作状态(是:true;否:false)