Vben
2021-03-31 8a14069e71d5393cfa5b758f46a1c5c001fa172b
提交 | 用户 | age
8a1406 1 <template>
V 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
16   import { Card } from 'ant-design-vue';
17   import { Icon } from '/@/components/Icon';
18   import { navItems } from './data';
19
20   export default defineComponent({
21     components: { Card, CardGrid: Card.Grid, Icon },
22     setup() {
23       return { items: navItems };
24     },
25   });
26 </script>