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
| <template>
| <view class="timeline-container">
|
| <view v-for="(item, index) in timeline" :key="index" class="timeline-item">
| <view class="timeline-time">{{ item.time }}</view>
| <view class="timeline-content">
| <view class="info">
| <text class="title">{{ item.title }}</text>
| <text class="desc">{{ item.subtitle }}</text>
| <text class="desc">{{ item.location }}</text>
| <text class="desc">{{ item.description }}</text>
| </view>
| <image :src="item.image" class="thumbnail" mode="aspectFill"></image>
| </view>
| </view>
| </view>
| </template>
|
| <script>
| export default {
| name: "Timeline",
| data() {
| return {
| timeline: [
| {
| time: "01:21",
| title: "万国殡仪馆",
| subtitle: "International Funeral Parlour",
| location: "中国香港",
| description: "万国殡仪馆",
| image: "https://dummyimage.com/120x70/cccccc/000000&text=Image1"
| },
| {
| time: "03:11",
| title: "锦记粥粉面饭",
| subtitle: "Kum Kee Restaurant",
| location: "中国香港",
| description: "道生见明叔的地方",
| image: "https://dummyimage.com/120x70/cccccc/000000&text=Image2"
| },
| {
| time: "08:57",
| title: "康乐茶居",
| subtitle: "Hong Lok Tea House",
| location: "中国香港",
| description: "Hello文道生吃宵夜",
| image: "https://dummyimage.com/120x70/cccccc/000000&text=Image3"
| },
| {
| time: "10:45",
| title: "阳光洗衣便利店 金巴…",
| subtitle: "Sunshine Laundry (Kimberly St…",
| location: "中国香港",
| description: "洗衣店",
| image: "https://dummyimage.com/120x70/cccccc/000000&text=Image4"
| }
| ]
| };
| }
| };
| </script>
|
| <style scoped>
| .timeline-container {
| padding: 20rpx;
| background-color: #ffffff;
| }
|
| .timeline-title {
| text-align: center;
| font-size: 36rpx;
| margin-bottom: 30rpx;
| font-weight: bold;
| }
|
| .tabs {
| display: flex;
| justify-content: center;
| margin-bottom: 20rpx;
| }
|
| .tab-text {
| font-size: 28rpx;
| margin: 0 20rpx;
| color: #999;
| }
|
| .tab-text.active {
| color: #000;
| border-bottom: 4rpx solid #000;
| padding-bottom: 6rpx;
| }
|
| .tab-text.disabled {
| color: #ccc;
| }
|
| .timeline-item {
| display: flex;
| margin-bottom: 40rpx;
| }
|
| .timeline-time {
| color: #C1A14E;
| font-size: 30rpx;
| width: 100rpx;
| flex-shrink: 0;
| }
|
| .timeline-content {
| border-left: 2rpx solid #f0f0f0;
| padding-left: 20rpx;
| flex: 1;
| display: flex;
| justify-content: space-between;
| }
|
| .info {
| flex: 1;
| }
|
| .title {
| font-size: 30rpx;
| font-weight: bold;
| display: block;
| }
|
| .desc {
| font-size: 24rpx;
| color: #666;
| display: block;
| margin-top: 6rpx;
| }
|
| .thumbnail {
| width: 240rpx;
| height: 140rpx;
| margin-left: 20rpx;
| border-radius: 8rpx;
| }
| </style>
|
|