img-one.vue 634 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view class="img-box">
  3. <image :src="fileItem" @click="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. return;
  24. uni.previewImage({
  25. urls: this.fileList,
  26. current:index
  27. });
  28. }
  29. }
  30. }
  31. </script>
  32. <style scoped lang="scss">
  33. .img-box{
  34. image{
  35. width: 394rpx;
  36. border-radius: 16rpx;
  37. }
  38. }
  39. </style>