QuickNav.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <Card title="快捷导航" v-bind="$attrs">
  3. <template v-for="item in navItems" :key="item">
  4. <CardGrid @click="goPage">
  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" setup>
  14. import { Card } from 'ant-design-vue';
  15. import { useMessage } from '/@/hooks/web/useMessage';
  16. import { Icon } from '/@/components/Icon';
  17. const CardGrid = Card.Grid;
  18. const $message = useMessage();
  19. const navItems = [
  20. {
  21. title: '业务受理',
  22. icon: 'ion:home-outline',
  23. color: '#1fdaca',
  24. },
  25. {
  26. title: '业务管理',
  27. icon: 'ion:grid-outline',
  28. color: '#bf0c2c',
  29. },
  30. {
  31. title: '文件管理',
  32. icon: 'ion:layers-outline',
  33. color: '#e18525',
  34. },
  35. {
  36. title: '信息查询',
  37. icon: 'ion:settings-outline',
  38. color: '#3fb27f',
  39. },
  40. {
  41. title: '通知公告',
  42. icon: 'ion:notifications',
  43. color: '#13b0ff',
  44. },
  45. {
  46. title: '我的任务',
  47. icon: 'ion:person-stalker',
  48. color: '#b27315',
  49. },
  50. ];
  51. function goPage() {
  52. $message.createMessage.success('根据业务自行处理跳转页面!');
  53. }
  54. </script>