homeIcon.vue 643 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view class="home-icon">
  3. <view class="home-icon-item" v-for="(item,index) in list" :key="index">
  4. <image style="width: 100%;height: 100%;" :src="item" mode=""></image>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. props: {
  11. list: {
  12. type: Array,
  13. default: () => []
  14. }
  15. },
  16. name: "homeIcon",
  17. data() {
  18. return {
  19. };
  20. }
  21. }
  22. </script>
  23. <style scoped lang="scss">
  24. .home-icon {
  25. display: flex;
  26. }
  27. .home-icon-item {
  28. width: 64rpx;
  29. height: 64rpx;
  30. }
  31. .home-icon-item:nth-child(2) {
  32. transform: translate(-50%, 0)
  33. }
  34. .home-icon-item:nth-child(3) {
  35. transform: translate(-100%,0)
  36. }
  37. </style>