HotWords.vue 1.81 KB
<!--
 * @Description: 3D
 * @Author: huyue
 * @Date: 2024-01-26 11:36:05
 * @LastEditors: huyue
 * @LastEditTime: 2024-01-29 17:49:44
-->
<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: 10.31vw;
  height: 23.8vh;
  background-image: url(../../../assets/images/hotword-bg.png);
  background-size: 100% 100%;
  text-align: center;
  .hot-title {
    padding-bottom: 4.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>