index.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view class="applications">
  3. <view @click="itemClick(item)" class="applications-item" v-for="(item,index) in list" :key="index">
  4. <view class="applications-item-img">
  5. <image style="width: 84rpx;height: 84rpx;" :src="item.icon" mode=""></image>
  6. </view>
  7. <view class="applications-item-text">
  8. {{item.title}}
  9. </view>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. list: {
  17. default: () => [],
  18. type: Array
  19. }
  20. },
  21. data() {
  22. return {
  23. }
  24. },
  25. methods: {
  26. itemClick(item, ) {
  27. this.$emit('itemClick', item)
  28. }
  29. }
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. .applications {
  34. width: 100%;
  35. box-sizing: border-box;
  36. padding: 32rpx 0 0 0;
  37. background: #ffffff;
  38. border-radius: 5.33px;
  39. box-shadow: 0px 0px 6.67px 0px rgba(147, 147, 147, 0.20);
  40. display: flex;
  41. flex-wrap: wrap;
  42. .applications-item {
  43. display: flex;
  44. width: 25%;
  45. margin-bottom: 32rpx;
  46. justify-content: center;
  47. flex-direction: column;
  48. align-items: center;
  49. font-size: 24rpx;
  50. }
  51. }
  52. </style>