HotWords.vue
1.88 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
<!--
* @Description: 3D
* @Author: huyue
* @Date: 2024-01-26 11:36:05
* @LastEditors: huyue
* @LastEditTime: 2024-07-10 10:43:14
-->
<template>
<div class="hot-box">
<BoxTitle class="hot-title" :title="'提问热词'" :fontSize="16"></BoxTitle>
<div class="tagcloud"></div>
</div>
</template>
<script>
import BoxTitle from '../../../components/BoxTitle.vue'
const texts = [
'车内隐私',
'品牌和风格',
'车内温度',
'多长时间',
'哪些实际好处',
'权益升级的条件',
'额外服务',
'权益升级流程',
'电池和电动系统',
'维修费用',
'特殊保障',
'免费保养',
'保费折扣',
'保障内容',
'赔偿流程',
'赔偿金额'
]
import TagCloud from 'TagCloud'
export default {
name: 'HotWords',
components: { BoxTitle },
data() {
return {}
},
mounted() {
TagCloud('.tagcloud', texts, {
radius: 100,
maxSpeed: 'slow'
})
}
}
</script>
<style lang="scss">
.hot-box {
position: relative;
width: 9.7vw;
height: 23.94vh;
background-image: url(../../../assets/images/hotword-bg.png);
background-size: 100% 100%;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
.hot-title {
// padding-bottom: 1.19vh;
}
&::after {
content: '';
display:block;
width: 0.73vw;
height: 2.04vh;
position: absolute;
top: 1vh;
right: 1vh;
background-image: url(../../../assets/images/right-arrow.png);
background-size: 0.73vw 2.04vh;
}
}
.tagcloud {
width: 7.85vw !important;
height: 7.85vw !important;
background-image: url(../../../assets/images/hot-words-bg.png);
background-size: 100% 100%;
margin: 0 auto;
span {
font-size: 10px;
color: #5894FF;
background-image: -webkit-linear-gradient(left, #d8ffed, #53FAFF);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
</style>