Blame view

src/views/dashboard/analysis/components/SiteAnalysis.vue 1.96 KB
Vben authored
1
2
3
4
5
<template>
  <Card
    :tab-list="tabListTitle"
    v-bind="$attrs"
    :active-tab-key="activeKey"
vben authored
6
    @tab-change="onTabChange"
Vben authored
7
8
9
10
11
  >
    <p v-if="activeKey === 'tab1'">
      <VisitAnalysis />
    </p>
    <p v-if="activeKey === 'tab2'">
柏杨 authored
12
      <VisitAnalysisBar style="margin-top: 100px" />
Vben authored
13
14
15
    </p>
  </Card>
</template>
16
17
<script lang="ts" setup>
  import { ref } from 'vue';
Vben authored
18
19
20
  import { Card } from 'ant-design-vue';
  import VisitAnalysis from './VisitAnalysis.vue';
  import VisitAnalysisBar from './VisitAnalysisBar.vue';
柏杨 authored
21
22
  import { exchangeTab } from '@/store/modules/user';
  import type { SelectProps } from 'ant-design-vue';
Vben authored
23
24
  const activeKey = ref('tab1');
Vben authored
25
26
27
28
  const tabListTitle = [
    {
      key: 'tab1',
sanmu authored
29
      tab: '订单趋势',
30
    },
柏杨 authored
31
32
33
34
    {
      key: 'tab2',
      tab: '销售额完成率',
    },
35
36
37
38
  ];

  function onTabChange(key) {
    activeKey.value = key;
柏杨 authored
39
    exchangeTab.value = key;
40
  }
Vben authored
41
</script>
柏杨 authored
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
<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>