Blame view

src/views/dashboard/workbench/components/QuickNav.vue 717 Bytes
Vben authored
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
<template>
  <Card title="快捷导航" v-bind="$attrs">
    <template v-for="item in items" :key="item">
      <CardGrid>
        <span class="flex flex-col items-center">
          <Icon :icon="item.icon" :color="item.color" size="20" />
          <span class="text-md mt-2">{{ item.title }}</span>
        </span>
      </CardGrid>
    </template>
  </Card>
</template>
<script lang="ts">
  import { defineComponent } from 'vue';

  import { Card } from 'ant-design-vue';
  import { Icon } from '/@/components/Icon';
  import { navItems } from './data';

  export default defineComponent({
    components: { Card, CardGrid: Card.Grid, Icon },
    setup() {
      return { items: navItems };
    },
  });
</script>