一行代码搞定react native 图片浏览

54 阅读1分钟

图片浏览在手机端,通常需要点击放大,滑动展示的功能,通过一行代码,即可实现


import Images from "@dplus/images";

const images = [
  "https://images.unsplash.com/photo-1571501679680-de32f1e7aad4",
  "https://images.unsplash.com/photo-1573273787173-0eb81a833b34",
  "https://images.unsplash.com/photo-1569569970363-df7b6160d111"
];

<ImageView
  data={images}
/>

效果图如下

0f4733b6630fa034b5f5b1057691370c.jpg

f02fb05de5511e2734b6e5d2147e4b03.jpg

demo地址

react native 性能调优,欢迎留言咨询