geek-prince / react-native-page-scrollview Goto Github PK
View Code? Open in Web Editor NEW对ScrollView的封装,可以很方便的实现水平,垂直分页轮播效果.而且可以自定义分页宽高,和侧边View的旋转,透明度,大小等.
License: MIT License
对ScrollView的封装,可以很方便的实现水平,垂直分页轮播效果.而且可以自定义分页宽高,和侧边View的旋转,透明度,大小等.
License: MIT License
有截图但是好像我这边预览不到,提交下代码
render() {
let imgArr = [
{
uri:
'https://img.xyj321.com/attatch/2020061510_bc7597875cb6444d2131d23f5e7fde39.jpg',
},
];
return (
<PageScrollView
style={{width: deviceDpWidth, height: (deviceDpWidth / 16) * 9}}
builtinStyle="sizeChangeMode"
builtinWH={{width: 300, height: (300 / 16) * 9}}
imageArr={imgArr}
/>)}
"react": "16.9.0",
"react-native": "0.61.4",
不管什么样式都是这个问题,直接copy的代码还是这个错误;设置没设置builtinWH,style都是一样的问题
感谢作者开源,ORZ
安装了您的插件后 按住第一张图片滑动到第二张,松手又弹回去了,imageArr的数据是在componentDidMount里面发送网络请求异步获取的,render里面是
//// {this.state.bannerList && <PageScrollView style={{width:width,height:140}}
//// imageArr ={this.state.bannerList} />}
请问是什么原因呢 期待您的回答
当我滑动自定义的View的时候{size,opacity,rotate,skew}返回全部都变成NaN了
代码 <PageScrollView
style={{width:w,height:100,margin:10}}
sizeSmall={0.5}
opacitySmall={0.6}
rotateDeg={30}
skewDeg={45}
datas={[1,2,3]}
currentPageChangeFunc={(e)=>console.log(e)}
view={(i,data,{size,opacity,rotate,skew})=>{
console.log(i,data,{size,opacity,rotate,skew})
this.r = Math.floor(Math.random()*255);
this.g = Math.floor(Math.random()*255);
this.b = Math.floor(Math.random()*255);
let color = 'rgba('+ this.r +','+ this.g +','+ this.b +',0.8)';
return(
<View style={{width:w*size,height:60*size,justifyContent:'center',alignItems:'center',backgroundColor:color}}>
<Text>{i}</Text>
</View>
);
}}
/>
那你先用这个方法临时解决一下吧,我后面有时间时会更新一个版本
Originally posted by @geek-prince in #9 (comment)
我想设置一打开就显示第二个page 但我不知道哪个属性可以设置,请问有解决方法吗?
该控件最多能加载多少个view,添加无限长的数据后,是否会内存泄露
下载下来没有.d.ts导致项目没法找到类型声明
在Android设备上运行
<PageScrollView
style={{ width : SCREEN_WIDTH, height : SCREEN_WIDTH / 16 * 9 }}
builtinStyle='sizeChangeMode'
builtinWH={{ width : 300, height : 300 / 16 * 9 }}
imageArr={this.imgArr}/>
两边小部分空白的
nvariant Violation: Invariant Violation: [145,"RCTView",91,{"width":"<>","height":0,"backgroundColor":0}] is not usable as a native method argument
高级轮播-自定义的View 滑动到下一页会闪现滑动很多页的效果 想问下博主 怎么处理下这个问题?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.