index.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
71
72
73
74
75
<template>
<view>
<view class="ListItem" @click="openInfoPop">
<view class="ListItem-l">
<text>{{ info.uname }}</text>
<image src="@/static/images/admin/icon12.png" v-if="info.usex === GENDER.MALE" mode=""></image>
<image src="@/static/images/admin/icon13.png" v-else mode=""></image>
</view>
<view class="ListItem-r">
<text>扣</text>
<text style="color: #F43535;">{{ info.num }}</text>
<text>分</text>
</view>
</view>
<info-pop ref="infoPop"/>
</view>
</template>
<script>
import InfoPop from "../InfoPop/index.vue"
import { GENDER } from "@/emit/index.js"
export default {
name: 'ListItem',
props: {
info: {
type: Object,
default: () => {
return {}
}
}
},
components: {
InfoPop
},
data() {
return {
GENDER
}
},
methods: {
openInfoPop() {
this.$refs.infoPop.open(this.info)
}
}
}
</script>
<style lang="scss" scoped>
.ListItem{
display: flex;
justify-content: space-between;
height: 114rpx;
border-radius: 15rpx;
align-items: center;
background: #FFFFFF;
padding: 0 30rpx;
margin-bottom: 20rpx;
.ListItem-l{
display: flex;
align-items: center;
font-size: 30rpx;
color: #3D4054;
image{
height: 28rpx;
width: 28rpx;
margin-left: 10rpx;
}
}
.ListItem-r{
color: #A1A0AB;
font-size: 26rpx;
}
}
</style>