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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
| <template>
| <view class="section">
| <up-row>
| <up-col span="6">
| <view class="row">
| <up-icon
| v-if="iconName"
| :name="iconName"
| :size="iconSize"
| :color="iconColor"
| />
| <text class="theme-text left-text">{{ title }}</text>
| </view>
| </up-col>
| <up-col span="3" />
| <up-col span="3">
| <view class="row-right" @click="go(goUrl)">
| <text class="theme-text right-text">{{ optitle }}</text>
| <up-icon name="arrow-rightward" size="25" color="var(--icon-color)" />
| </view>
| </up-col>
| </up-row>
| </view>
| </template>
|
| <script setup lang="ts">
| interface Props {
| iconName?: string
| iconSize?: string | number
| iconColor?: string
| title?: string
| optitle?: string
| opIconColor?: string
| goUrl?: string
| }
|
| const props = withDefaults(defineProps<Props>(), {
| iconName: '',
| iconSize: 40,
| iconColor: 'yellow',
| title: '',
| optitle: '',
| opIconColor: 'white',
| goUrl: ''
| })
|
| function go(url: string) {
| if (url) {
| uni.navigateTo({ url })
| }
| }
| </script>
|
| <style scoped lang="scss">
| .section {
| margin-top: 30rpx;
| }
|
| .row {
| display: flex;
| align-items: center;
| padding: 20rpx 0;
| }
|
| .row-right {
| display: flex;
| align-items: center;
| padding: 20rpx 0;
| justify-content: flex-end;
| }
|
| .left-text {
| font-size: 40rpx;
| font-weight: bold;
| color: var(--icon-color);
| letter-spacing: 5rpx;
| }
|
| .right-text {
| font-size: 25rpx;
| margin-right: 10rpx;
| }
|
| .theme-text {
| margin-left: 10rpx;
| }
| </style>
|
|
|