高度随每片内容的高度变化的swiper react-native-unfixed-height-swiper

244 阅读1分钟

高度随每片内容的高度变化的swiper
react-native-unfixed-height-swiper

内容可以文本 图片 视频

本例里面的为文本

使用方式
1. npm i react-native-unfixed-height-swiper --save-dev
2. 给组件传入文本数组,每个元素为对象{contents:'',name:''} 即可
3. detailPlots:[{index : 0,name : '填补中',contents : '由于作者过于懒惰 '},
{index : 1,name : '填补中',contents : '由于作者过于懒惰 '},
{index : 2,name : '填补中',contents : '由于作者过于懒惰'}]

4.

欢迎pull request

性能不错

推荐将代码直接插入自己项目中 而不是require
这是因为要刷新 放入项目中的话 刷新会快很多

因为是父子组件 如果想跳过初始的默认数据阶段 就将@/lib/detailPlots的代码放入项目中 这样能很快的加载数据

app下载体验:

http://43.138.251.145:2335/apk/ComAnime.apk

github地址:
github.com/raintoway/r…