KnownlageBase.vue
1.91 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
<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>