KnownlageBase.vue 1.91 KB
<template>
  <div class="knownledge-box">
    <BoxTitle :title="title" :fontSize="16"></BoxTitle>
    <!-- <LineChartsVue :ref="lineId" height="8.61vh" :domId="lineId" :dataList.sync="data"></LineChartsVue> -->
    <img class="trend-img" :src="require(`../../../assets/images/${data}.png`)" alt="" />
    <div class="bottom-data">
      <div>
        <div class="title">知识条数</div>
        <div class="text">{{ numAddSymbol(dataObj.KnownledgeNum) }}</div>
      </div>
      <div>
        <div class="title">提问数</div>
        <div class="text">{{ dataObj.askNum }}</div>
      </div>
    </div>
  </div>
</template>

<script>
// import LineChartsVue from './LineCharts.vue';
export default {
  name: 'KnownlageBase',
  props: {
    title: String,
    data: String,
    dataObj: Object,
    lineId: String
  },
  components: {
    // LineChartsVue
  },
  data() {
    return {}
  },

  mounted() {},

  methods: {}
}
</script>

<style lang="scss" scoped>
.knownledge-box {
  position: relative;
  width: 10.31vw;
  height: 19.72vh;
  padding: 1.85vh;
  box-sizing: border-box;
  background-image: url(../../../assets/images/knownledge-bg.png);
  background-size: 100% 100%;
  ::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;
  }
  .trend-img {
    height: 8.61vh;
  }
  .bottom-data {
    display: flex;
    justify-content: space-between;
    margin-top: 0.8vh;
    .title {
      font-weight: 500;
      font-size: 14px;
      color: #e8e8e8;
    }
    .text {
      font-weight: 700;
      font-size: 18px;
      background: linear-gradient(to right, #01a4f9, #6df5f9); /* 从左到右渐变 */
      -webkit-background-clip: text; /* Safari/Chrome支持该属性 */
      color: transparent; /* 将文本颜色设置为透明 */
    }
  }
}
</style>