realtimeData.vue
1.59 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
<template>
<view class="realtime-page">
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<view class="u-flex" style="margin-top: -44rpx;flex-direction: column;justify-content: space-between; align-content: space-between;">
<view
class="u-flex"
v-for="(item, index) in list"
:key="index"
style="border-radius: 20px;flex-direction: row;justify-content: space-between;margin: 15rpx;
background-color: #fff;height: 200rpx;width: 698rpx;"
>
<view style="margin: 20rpx;">
<view style="margin-top: 4rpx;">
<text style="color:#333333;font-size: 16px;">{{ item.name }}</text>
</view>
<view style="margin-top: 14rpx;">
<text style="color:#999999;font-size: 13px;">{{ item.time }}</text>
</view>
</view>
<view style="margin-right: 30rpx;margin-top: -58rpx;">
<text style="color:#333333;font-size: 17px;">{{ item.value }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
import fTabbar from '@/components/module/f-tabbar/f-tabbar';
export default {
components: {
fTabbar
},
data() {
return {
list: [
{
name: 'CO2',
time: '2021-12-25 14:25:52',
value: '85.6'
},
{
name: 'PH',
time: '2021-12-25 14:25:52',
value: '10'
},
{
name: 'NH3',
time: '2021-12-25 14:25:52',
value: '635'
},
{
name: '水深',
time: '2021-12-25 14:25:52',
value: '2.21'
}
]
};
},
onLoad(e) {
// 隐藏原生的tabbar
uni.hideTabBar();
}
};
</script>
<style lang="scss" scoped>
.realtime-page {
padding: 20rpx;
}
</style>