绿满眶商城微信小程序-uniapp
zxl
4 天以前 c9928dd4f6d25e2339ea1400f59ec58674a927a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<template>
  <div class="layout">
    <div class="menu-list">
      <div
        class="menu-item"
        @click="modelNavigateTo(item)"
        v-for="(item, index) in res.list"
        :key="index"
      >
        <div>
          <u-image
            width="88rpx"
            height="88rpx"
            class="menu-img"
            :src="item.img"
          >
            <u-loading slot="loading"></u-loading>
          </u-image>
        </div>
        <div class="menu-title">{{ item.title }}</div>
      </div>
    </div>
  </div>
</template>
<script>
import '@/components/uview-components/uview-ui'
import { modelNavigateTo } from "./tpl";
export default {
  title: "五列菜单",
  props: ["res"],
  data() {
    return {
      modelNavigateTo,
    };
  },
};
</script>
<style lang="scss" scoped>
@import "./tpl.scss";
.menu-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
 
  > .menu-item {
    text-align: center;
    width: 20%;
    // flex: 1;
    margin: 20rpx 0;
  }
}
.menu-img {
  display: flex;
  margin: 0 auto;
  width: 88rpx;
  height: 88rpx;
}
.menu-title {
  font-size: 24rpx;
}
</style>