QuickNav.vue 717 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <Card title="快捷导航" v-bind="$attrs">
  3. <template v-for="item in items" :key="item">
  4. <CardGrid>
  5. <span class="flex flex-col items-center">
  6. <Icon :icon="item.icon" :color="item.color" size="20" />
  7. <span class="text-md mt-2">{{ item.title }}</span>
  8. </span>
  9. </CardGrid>
  10. </template>
  11. </Card>
  12. </template>
  13. <script lang="ts">
  14. import { defineComponent } from 'vue';
  15. import { Card } from 'ant-design-vue';
  16. import { Icon } from '/@/components/Icon';
  17. import { navItems } from './data';
  18. export default defineComponent({
  19. components: { Card, CardGrid: Card.Grid, Icon },
  20. setup() {
  21. return { items: navItems };
  22. },
  23. });
  24. </script>