index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <!-- 系统表单信息 "-->
  3. <view class="">
  4. <view v-if="orderExtend.length" class=''>
  5. <view v-for="(item,index) in orderExtend" :key="index" class='item acea-row row-between'>
  6. <view class="title">{{item.title}}{{ item.title.includes(':') ? '' : ':' }}</view>
  7. <view v-if="!Array.isArray(item.value)" class='conter'>{{item.value||'--'}}</view>
  8. <view v-else class='acea-row conter' style="justify-content: end;">
  9. <view v-for="(pic,i) in item.value" :key="i">
  10. <image v-if="pic.includes('http')" class="virtual_image ml-12" :src="pic"
  11. @click="getPhotoClickIdx(item.value,i)"></image>
  12. <view v-else class="ml-12 flex-center">
  13. <view>{{pic}}</view>
  14. <view class="ml-12" v-show="i < item.value.length - 1"> -- </view>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. props: {
  25. orderExtend: {
  26. type: Array,
  27. default: function() {
  28. return []
  29. }
  30. },
  31. },
  32. methods: {
  33. // 图片预览
  34. getPhotoClickIdx(list, idx) {
  35. uni.previewImage({
  36. current: list[idx], // 传 Number H5端出现不兼容
  37. urls: list
  38. });
  39. },
  40. }
  41. }
  42. </script>
  43. <style scoped lang="scss">
  44. .item {
  45. font-size: 28rpx;
  46. color: #282828;
  47. }
  48. .wrapper .item~.item {
  49. margin-top: 20rpx;
  50. }
  51. .conter {
  52. color: #868686;
  53. width: 460rpx;
  54. text-align: right;
  55. overflow: hidden;
  56. }
  57. .title {
  58. width: 194rpx;
  59. }
  60. .virtual_image {
  61. margin-left: 24rpx;
  62. width: 106rpx;
  63. height: 106rpx;
  64. border-radius: 8rpx;
  65. margin-right: 10rpx;
  66. &:last-child {
  67. margin-right: 0;
  68. }
  69. }
  70. </style>