AttributionGuide.vue
1.51 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
<template>
<van-popup
v-model="localVisible"
position="bottom"
round
:style="{ height: '80%' }"
closeable
close-icon="cross"
:close-on-click-overlay="true"
@close="$emit('close')"
>
<div class="px-3 pt-5 pb-3 border-b border-gray-100">
<h3 class="text-[17px] font-semibold text-gray-900">{{ title }}</h3>
</div>
<div class="overflow-y-auto px-5 py-4" style="height: calc(80vh - 80px);">
<div
v-for="(item, index) in descriptions"
:key="index"
class="mb-3 last:mb-0 p-2 bg-gray-50 rounded-xl"
>
<div class="flex items-start gap-2">
<div class="w-2 h-2 rounded-full bg-green-500 flex-shrink-0 mt-2"></div>
<div class="flex-1">
<div class="text-[12px] font-semibold text-gray-900 mb-2">{{ item.label }}</div>
<div class="text-[10px] text-gray-600 leading-relaxed">{{ item.description }}</div>
</div>
</div>
</div>
</div>
</van-popup>
</template>
<script>
export default {
name: 'AttributionGuide',
props: {
visible: {
type: Boolean,
default: false
},
title: {
type: String,
default: '归因说明'
},
descriptions: {
type: Array,
default: () => []
}
},
computed: {
localVisible: {
get() {
return this.visible
},
set(value) {
if (!value) {
this.$emit('close')
}
}
}
}
}
</script>