index.vue 1003 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <!-- 单图组 -->
  3. <view class="diy-imageSingle"
  4. :style="{ padding: `${itemStyle.paddingTop * 2}rpx ${itemStyle.paddingLeft * 2}rpx`, background: itemStyle.background }">
  5. <view class="item-image" v-for="(dataItem, index) in dataList" :key="index"
  6. :style="{ marginBottom: `${itemStyle.itemMargin * 2}rpx`, borderRadius: `${itemStyle.borderRadius * 2}rpx` }">
  7. <view class="nav-to" @click="onLink(dataItem.link)">
  8. <image class="image" :src="dataItem.imgUrl" mode="widthFix"></image>
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import mixin from '../mixin'
  15. export default {
  16. props: {
  17. itemIndex: String,
  18. itemStyle: Object,
  19. params: Object,
  20. dataList: Array
  21. },
  22. mixins: [mixin],
  23. methods: {
  24. }
  25. }
  26. </script>
  27. <style lang="scss" scoped>
  28. .item-image {
  29. overflow: hidden;
  30. &:last-child {
  31. margin-bottom: 0 !important;
  32. }
  33. .image {
  34. display: block;
  35. width: 100%;
  36. }
  37. }
  38. </style>