| | |
| | | :showAddBtn="!selectedFull" |
| | | :length="3" |
| | | :files="files" |
| | | :onChange="(files,operationType,index)=>handleChange(files,operationType,index)" |
| | | :onFail="evt=>handleFail(evt)" |
| | | :onImageClick="(index, file)=>handleImgView(index,file)" |
| | | :onChange="(files,operationType,index) => handleChange(files,operationType,index)" |
| | | :onFail="evt => handleFail(evt)" |
| | | :onImageClick="(index, file) => handleImgView(index,file)" |
| | | /> |
| | | <CImageCompressor ref="compressor" /> |
| | | <CImagePreview ref="imgPreview" /> |
| | |
| | | return {}; |
| | | }, |
| | | methods: { |
| | | // option { current, urls } |
| | | $preview(option) { |
| | | // 网页模式下,增加缩放操作 |
| | | if (process.env.TARO_ENV === 'h5') { |
| | |
| | | // 小程序模式,直接支持缩放 |
| | | else { |
| | | Taro.previewImage({ |
| | | current: file.url, // 当前显示图片的http链接 |
| | | urls, // 需要预览的图片http链接列表 |
| | | current: option.current, // 当前显示图片的http链接 |
| | | urls: option.urls, // 需要预览的图片http链接列表 |
| | | }); |
| | | } |
| | | }, |