|
@@ -76,7 +76,13 @@ const lineChartOption = (xAxisData: any, seriesData: any) => {
|
|
|
data: xAxisData,
|
|
|
type: 'category',
|
|
|
axisLine: { lineStyle: { color: '#8C8C8C' } },
|
|
|
- lineStyle: { color: '#F2F2F2' }
|
|
|
+ lineStyle: { color: '#F2F2F2' },
|
|
|
+ axisLabel: {
|
|
|
+ margin: 16
|
|
|
+ },
|
|
|
+ axisTick: {
|
|
|
+ show: false
|
|
|
+ }
|
|
|
// axisLabel: {
|
|
|
// formatter: function (value, index) {
|
|
|
// // 第一个和最后一个标签分别居左和居右显示
|
|
@@ -166,6 +172,10 @@ const lineChartOption = (xAxisData: any, seriesData: any) => {
|
|
|
formatter: function (params: any) {
|
|
|
return params[0].name
|
|
|
},
|
|
|
+ position: function (point) {
|
|
|
+ // 固定在顶部
|
|
|
+ return [point[0], '10%']
|
|
|
+ },
|
|
|
backgroundColor: '#FF6079',
|
|
|
borderWidth: 0,
|
|
|
borderRadius: 24,
|
|
@@ -174,7 +184,7 @@ const lineChartOption = (xAxisData: any, seriesData: any) => {
|
|
|
color: '#FFFFFF',
|
|
|
fontSize: 12
|
|
|
},
|
|
|
- extraCssText: 'z-index: 2',
|
|
|
+ extraCssText: 'z-index: 2;box-shadow: none;',
|
|
|
axisPointer: {
|
|
|
lineStyle: {
|
|
|
color: '#FF6079'
|
|
@@ -243,6 +253,7 @@ export default defineComponent({
|
|
|
nextTick(() => {
|
|
|
statisticCounts.value.browseCount = props.obj.browseCount || 0
|
|
|
statisticCounts.value.buyCount = props.obj.buyCount || 0
|
|
|
+ statisticCounts.value.time = props.obj.time
|
|
|
myChart.clear()
|
|
|
lineChartOption &&
|
|
|
myChart.setOption(
|
|
@@ -353,7 +364,7 @@ export default defineComponent({
|
|
|
<span class={styles.text}>浏览次数</span>
|
|
|
<span class={styles.num}>
|
|
|
{statisticCounts.value.browseCount}
|
|
|
- <span style={{ fontWeight: 'normal' }}>次</span>
|
|
|
+ <span style={{ fontWeight: 'normal' }}></span>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class={styles.item} style="--color: #FF6079">
|
|
@@ -361,7 +372,7 @@ export default defineComponent({
|
|
|
<span class={styles.text}>购买次数</span>
|
|
|
<span class={styles.num}>
|
|
|
{statisticCounts.value.buyCount}
|
|
|
- <span style={{ fontWeight: 'normal' }}>次</span>
|
|
|
+ <span style={{ fontWeight: 'normal' }}></span>
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|