functionList.vue
1.3 KB
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
63
64
65
66
67
68
69
70
<template>
<view class="function_card">
<view class="function_title">{{ title }}</view>
<view class="function_list">
<view class="function_item" v-for="(item, index) in functionData" :key="index" @click="goRouter(item.pathUrl)">
<image class="list_icon" :src="item.icon" mode="widthFix"></image>
<text class="list_name">{{ item.text }}</text>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
title: {
type: String,
default: ''
},
functionData: {
tyep: Array,
require: true
}
},
methods: {
goRouter(path){
uni.navigateTo({
url: path
})
}
}
}
</script>
<style scoped lang="scss">
.function_card{
background: #FFFFFF;
border-radius: 12rpx;
.function_title{
line-height: 84rpx;
height: 84rpx;
padding-left: 36rpx;
font-size: 28rpx;
color: #333;
border-bottom: 2rpx solid #E1E1E1;
box-sizing: border-box;
}
.function_list{
display: flex;
gap: 28rpx;
flex-wrap: wrap;
padding: 24rpx 30rpx;
.function_item{
width: calc((100% - 90rpx) / 4);
display: flex;
flex-direction: column;
align-items: center;
font-size: 28rpx;
list-style: 40rpx;
color: #333;
.list_icon{
width: 52rpx;
height: 52rpx;
margin-bottom: 14rpx;
}
}
}
}
</style>