| | |
| | | :onImageClick="(index, file)=>handleImgView(index,file)" |
| | | /> |
| | | <CImageCompressor ref="compressor" /> |
| | | <CImagePreview ref="imgPreview" /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { $fetchCommon } from '@fetchers/FCommon'; |
| | | import { Tools } from '@components/common/Tools'; |
| | | import CImageCompressor from './CImageCompressor.vue'; |
| | | import CImagePreview from './CImagePreview.vue'; |
| | | import './cImagePicker.scss'; |
| | | |
| | | export default { |
| | | name: 'CImagePicker', |
| | | components: { |
| | | CImageCompressor, |
| | | CImagePreview, |
| | | AtInput, |
| | | AtImagePicker, |
| | | AtCurtain, |
| | |
| | | const urls = this.files |
| | | .map(file => (file.type === 'btn' ? false : file.url)) |
| | | .filter(Boolean); |
| | | Taro.previewImage({ |
| | | // 图片预览,支持H5模式下的双指缩放 |
| | | this.$refs.imgPreview.$preview({ |
| | | current: file.url, // 当前显示图片的http链接 |
| | | urls, // 需要预览的图片http链接列表 |
| | | }); |