page-list.vue
2.23 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
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
<template>
<view class="device-list">
<view @click="$emit('openDeviceDetail',item)"
class="list-item" v-for="item in list" :key="item.id">
<view class="u-flex item">
<view class="item-text text-clip title-bottom">
<view>
<text class="text-span-bold">{{ item.title ? item.title : '' }}</text>
</view>
</view>
<view class="item-text text-clip" v-for="itemChild in item.child">
<view class="text-container">
{{$t(itemChild.label)}}:
<text class="text-span">{{ itemChild.name ? itemChild.name : ''}}</text>
</view>
</view>
</view>
<view class="item right-item">
<view class="u-flex" style="margin-top: -6rpx">
<image class="right-image" :src="item.iconUrl ? item.iconUrl :''" />
<view>
<text class="right-text" :style="{ color:item.color ? item.color :'' }">
{{item.status ? item.status : ''}}
</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
list: {
type: Array,
default: []
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.device-list {
display: flex;
flex-direction: column;
padding-left: 20rpx;
.list-item:last-child{
margin-bottom: 40rpx;
}
.list-item {
width: 713rpx;
// height: 200rpx;
background-color: #fff;
margin-top: 24rpx;
display: flex;
border-radius: 10px;
justify-content: space-between;
position: relative;
.item {
margin: 30rpx;
flex-direction: column;
justify-content: space-between;
.item-text {
width: 480rpx;
.text-container {
display: flex;
.text-span {
color: #666;
font-size: 14px;
display: flex;
margin-left: 20rpx;
}
}
.text-span-bold {
color: #333;
font-size: 15px;
font-weight: bold;
}
}
.title-bottom{
margin-bottom: 10rpx;
}
}
.right-item {
// margin:30rpx 30rpx 30rpx 0 ;
position: absolute;
right: 0;
top: 0;
.right-image {
width: 30rpx;
height: 30rpx;
margin-top: 5rpx;
margin-right: 5rpx;
}
.right-text {
color: #377dff;
font-size: 13px;
margin-left: 5rpx;
margin-top: 20rpx;
}
}
}
}
</style>