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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<!--
* @Author: jiangzaicheng jiangzaicheng_jzc@163.com
* @Date: 2022-07-04 16:24:00
* @LastEditors: jiangzaicheng jiangzaicheng_jzc@163.com
* @LastEditTime: 2022-08-18 11:00:05
* @FilePath: \mcep-h5\src\components\common\Tatle.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="tool">
<!-- <van-row class="titlelperson">
<van-col span="24" class="title">{{ title }}</van-col> -->
<!-- <van-row>
<van-col span="8">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-touxiang"></use>
</svg>
</van-col>
<van-row>
<van-col span="8">{{ param.name }}</van-col>
<van-col span="8">{{ param.live }}</van-col>
<van-col span="8">成长值{{ param.grow }}</van-col>
</van-row>
<van-row>
<van-col span="24">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-touxiang"></use>
</svg>
</van-col>
</van-row>
</van-row> -->
<!-- 两端对齐 -->
<div class="d-flex flex-column">
<div class="p-2 " style="margin: 0px auto;font-size: 18px;color: #ffffff;">{{ title }}</div>
<div class="d-flex p-3 text-white" v-if="!login">
<div class="p-2 " style="width: 62px;height: 62px;">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-touxiang"></use>
</svg>
</div>
<div class="" style="width: 100%;margin-top: 10%;margin-left: 3%;">
<div class="d-flex flex-column">
<div class="" style="font-size: 16px;font-weight: 900;">{{ param.name }}
</div>
</div>
</div>
</div>
<div class="d-flex p-3 text-white" v-if="login">
<div class="p-2 " style="width: 62px;height: 62px;">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-touxiang"></use>
</svg>
</div>
<div class="" style="width: 100%;margin-top: 2%;margin-left: 6%;">
<div class="d-flex flex-column">
<div class="" style="font-size: 16px;font-weight: 900;">{{ param.name }}
</div>
<div class="d-flex " style="width: 100%;">
<div class="live ">
{{ param.live }}</div>
<div class=" ml-auto " @click="pushStarts()"><img class="imgstar" src="../../assets/images/stars.png" alt=""></div>
</div>
<div @click="layoutDiss()"
style="background-color: #ffffff; border-radius: 4px; color: #FE6B1B; width: 90px; font-size: 12px;text-align: center;margin-top: 4px;">
成长值{{ param.grow }}
<van-icon name="arrow" class="arrow" />
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop, Watch } from "vue-property-decorator";
/*
* title
*/
@Component({
name: "Person",
})
export default class Person extends Vue {
@Prop({ default: "" }) title: string | undefined; // 页面标题
@Prop({ default: "" }) param: any | undefined; // Name
@Prop({ default: "" }) starname: string | undefined; // 星星
@Prop({ default: "" }) grow: string | undefined; // 成长
@Prop({ default: false }) login: boolean | undefined; // 是否登录
//星星的点击事件
pushStarts(){
// this.$router.push({
// name:"level"
// })
}
layoutDiss(){
this.$router.push({
name:"Growth"
})
}
}
</script>
<style scoped lang="scss">
.live {
background-color: #ffbb15;
border-radius: 4px;
line-height: 18px;
width: 49px;
font-size: 12px;
text-align: center;
height: 17px;
}
.tool {
height: 100%;
background: linear-gradient(0deg, rgba(172, 215, 255, 1) 0%, rgba(11, 84, 224, 1) 100%);
}
.namePerson {
text-align: left;
font-size: 16px;
color: #FFFFFF;
margin-left: 4%;
margin-top: 3%;
}
.imgstar {
width: 30px;
height: 30px;
}
.title {
margin: 4% auto 5% 0%;
font-size: 18px;
color: #FFFFFF;
border-width: 0px;
white-space: nowrap;
text-transform: none;
width: 100%;
height: 100%;
text-align: center;
}
.arrow {
font-size: 12px;
color: #FE6B1B;
text-align: left;
}
.icon {
// width: 62px;
// height: 62px;
// padding-bottom: 50%;
// padding-left: 2%;
width: 62px;
height: 62px;
// padding-bottom: 50%;
/* padding-left: 2%; */
//margin: 14% auto;
}
.imglocal {
text-align: right;
font-size: 12px;
color: #FFFFFF;
}
.wiandle {
margin-left: 24%;
width: 30%;
}
.img {
width: 40%;
}
</style>