(window.webpackJsonp=window.webpackJsonp||[]).push([[104],{724:function(n,a,t){"use strict";t.r(a),t.d(a,"default",function(){return j});var s=t(580),e=t.n(s),p=t(23),c=t.n(p),o=t(24),i=t.n(o),l=t(25),u=t.n(l),r=t(26),d=t.n(r),k=t(32),m=t.n(k),h=t(27),g=t.n(h),f=t(28),v=t.n(f),b=t(0),y=t.n(b),w=t(111),_=t(82),z=function(){var n=["http://img.yzcdn.cn/public_files/2017/6/30/b0717bad7ad3ebd025e175d624ade39f.png","http://img.yzcdn.cn/public_files/2017/6/30/8a0536db89fafaa1269afeaa807a579b.png","http://img.yzcdn.cn/public_files/2017/6/30/7fe46674b697a514d9b6e2e155e88f1c.png","http://img.yzcdn.cn/public_files/2017/6/30/b7a98d721698fe8dc93689683706db45.png"],a=function(a){function t(){var a,s;c()(this,t);for(var e=arguments.length,p=new Array(e),o=0;opreviewImage\n

This component is used to preview images.

\n

Guide

\n\n

Demos

'}),y.a.createElement(x,{title:"Basic Usage",id:"Demobasic",src:'import { previewImage } from \'zent\';\n\nconst imgArr = [\n \'http://img.yzcdn.cn/public_files/2017/6/30/b0717bad7ad3ebd025e175d624ade39f.png\',\n \'http://img.yzcdn.cn/public_files/2017/6/30/8a0536db89fafaa1269afeaa807a579b.png\',\n \'http://img.yzcdn.cn/public_files/2017/6/30/7fe46674b697a514d9b6e2e155e88f1c.png\',\n \'http://img.yzcdn.cn/public_files/2017/6/30/b7a98d721698fe8dc93689683706db45.png\'\n];\n\nclass Simple extends React.Component {\n handlePreview = (e) => {\n previewImage({\n images: imgArr,\n index: imgArr.indexOf(e.target.src),\n parentComponent: this,\n scaleRatio: 3\n });\n }\n\n render() {\n return (\n <div className="image-preview-demo">\n {\n imgArr.map((image, index) => {\n return (<img src={image} key={index} onClick={this.handlePreview} alt="" width="160" />);\n })\n }\n </div>\n )\n }\n}\n\nReactDOM.render(\n <Simple />\n , mountNode\n);'},y.a.createElement(z)),y.a.createElement(C,{html:'

API

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
PropertyDescriptionTypeDefaultAlternative
imagesUrls for imagesarray
indexStart indexnumber0
showRotateBtnShow rotate buttonbooltruetrue,false
scaleRatioCustom scale Rationumber1.5
parentComponentParent component instance,i18n needs this to pass context throughReactInstance
classNameOptional. Custom class namestring\'\'
prefixOptional. Custom prefix.string\'zent\'
'}))}}]),a}(b.Component)}}]);