index.vue 1.8 KB

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