template3.vue 512 B

12345678910111213141516171819202122
  1. <script>
  2. export default {
  3. inject: ['goMenuPage'],
  4. props: {
  5. menuData: {
  6. type: Array,
  7. default: () => []
  8. }
  9. }
  10. };
  11. </script>
  12. <template>
  13. <view class="px-20 grid-column-3 grid-gap-24rpx mt-20">
  14. <view class="flex-col flex-center bg--w111-fff h-220 rd-24rpx"
  15. v-for="(item, index) in menuData" :key="index"
  16. @tap="goMenuPage(item.url, item.name)">
  17. <image :src="item.pic" class="w-64 h-64 block mb-16"></image>
  18. <view class="fs-26 lh-36rpx">{{ item.name }}</view>
  19. </view>
  20. </view>
  21. </template>