img-one.vue 625 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view class="img-box">
  3. <image :src="fileItem" @click.stop="previewImage(fileIndex)" v-for="(fileItem,fileIndex) in fileList" mode="widthFix"></image>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. name: "img-one",
  9. components: {},
  10. props: {
  11. fileList:{
  12. default:[]
  13. }
  14. },
  15. data() {
  16. return {}
  17. },
  18. watch: {},
  19. mounted() {
  20. },
  21. methods: {
  22. previewImage(index){
  23. uni.previewImage({
  24. urls: this.fileList,
  25. current:index
  26. });
  27. }
  28. }
  29. }
  30. </script>
  31. <style scoped lang="scss">
  32. .img-box{
  33. image{
  34. width: 394rpx;
  35. border-radius: 16rpx;
  36. }
  37. }
  38. </style>