No Description

index.vue 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="imageBoxWrapper">
  3. <view class="imageBox" v-for="item in file" :key="item.F_UserCode">
  4. <view v-if="item.F_FileType === '.jpg' || item.F_FileType === '.png'">
  5. <view class="imageContent">
  6. <image style="width: 80px; height: 80px;" mode="aspectFit" :src="item.F_FileUrl.replace(/\s+/g, '')"></image>
  7. </view>
  8. </view>
  9. <view v-else class="other">
  10. <text class="otherContent">{{ item.F_FileName.substring(19) }}</text>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. }
  20. },
  21. props: {
  22. file: {
  23. type: Array,
  24. default: []
  25. }
  26. },
  27. methods: {
  28. }
  29. }
  30. </script>
  31. <style lang="scss">
  32. .imageBoxWrapper {
  33. display: flex;
  34. width: 100%;
  35. flex-wrap: wrap;
  36. .imageBox {
  37. width: 25%;
  38. margin: 0 0 3px 0;
  39. .other{
  40. padding: 10px 5px 0 5px;
  41. text-align: center;
  42. .otherContent {
  43. word-wrap: break-word;
  44. }
  45. }
  46. }
  47. }
  48. </style>