SiteAnalysis.vue
1.96 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
<template>
<Card
:tab-list="tabListTitle"
v-bind="$attrs"
:active-tab-key="activeKey"
@tab-change="onTabChange"
>
<p v-if="activeKey === 'tab1'">
<VisitAnalysis />
</p>
<p v-if="activeKey === 'tab2'">
<VisitAnalysisBar style="margin-top: 100px" />
</p>
</Card>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { Card } from 'ant-design-vue';
import VisitAnalysis from './VisitAnalysis.vue';
import VisitAnalysisBar from './VisitAnalysisBar.vue';
import { exchangeTab } from '@/store/modules/user';
import type { SelectProps } from 'ant-design-vue';
const activeKey = ref('tab1');
const tabListTitle = [
{
key: 'tab1',
tab: '订单趋势',
},
{
key: 'tab2',
tab: '销售额完成率',
},
];
function onTabChange(key) {
activeKey.value = key;
exchangeTab.value = key;
}
</script>
<style scoped>
.custom-radio-group .ant-radio-button-wrapper {
background-color: white; /* 未选中按钮的背景颜色为白色 */
color: #1684fc; /* 未选中按钮的文字颜色为 #1684fc */
border-color: #1684fc; /* 未选中按钮的边框颜色 */
}
.custom-radio-group .ant-radio-button-wrapper-checked {
background-color: #1684fc; /* 选中按钮的背景颜色为 #1684fc */
color: white; /* 选中按钮的文字颜色为白色 */
border-color: #1684fc; /* 选中按钮的边框颜色 */
}
.custom-radio-group .ant-radio-button-wrapper-checked:hover {
background-color: #1684fc; /* 悬停在选中按钮时保持相同的背景颜色 */
color: white; /* 悬停在选中按钮时保持文字为白色 */
}
.custom-radio-group .ant-radio-button-wrapper:hover {
border-color: #1684fc; /* 悬停在未选中按钮时的边框颜色 */
}
.custom-radio-group .ant-radio-button-wrapper:not(.ant-radio-button-wrapper-checked):hover {
color: #1684fc; /* 悬停在未选中按钮时文字颜色为 #1684fc */
}
</style>