imagesingle.vue 808 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view
  3. class="diy-imageSingle"
  4. :style="
  5. 'padding-top: ' +
  6. itemData.style.paddingTop +
  7. 'px;padding-bottom:' +
  8. itemData.style.paddingTop +
  9. 'px; padding-left:' +
  10. itemData.style.paddingLeft +
  11. 'px;padding-right:' +
  12. itemData.style.paddingLeft +
  13. 'px; background:' +
  14. itemData.style.background
  15. "
  16. >
  17. <view class="d-c-c" v-for="(imageSingle, index) in itemData.data" :key="index" @click="gotoPages(imageSingle)">
  18. <image :src="imageSingle.imgUrl" mode="widthFix"></image>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {};
  26. },
  27. props: ['itemData'],
  28. methods: {
  29. /*跳转页面*/
  30. gotoPages(e) {
  31. this.gotoPage(e.linkUrl);
  32. }
  33. }
  34. };
  35. </script>
  36. <style>
  37. .diy-imageSingle image {
  38. width: 100%;
  39. }
  40. </style>