SysRouter.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import Drag from '@/Engine/Drag';
  2. import { PAGE_KEY } from '@/Project/constants';
  3. import React from 'react';
  4. export const route: GT.IRouterOptions[] = [
  5. {
  6. key: PAGE_KEY.Home,
  7. component: () => import('@/Project/pages/Home/index'),
  8. options: {
  9. name: 'Home',
  10. right: 0,
  11. top: 20,
  12. width: 400,
  13. height: 500,
  14. },
  15. },
  16. {
  17. key: PAGE_KEY.Access,
  18. component: () => import('@/Project/pages/Access/index'),
  19. options: {
  20. name: 'Access',
  21. left: 100,
  22. top: 20,
  23. width: 400,
  24. height: 500,
  25. },
  26. },
  27. {
  28. key: PAGE_KEY.Login,
  29. //@ts-ignore
  30. component: () => import('@/Project/pages/Login'),
  31. //@ts-ignore
  32. models: () => import('@/Project/pages/Login/models/login'),
  33. options: {
  34. name: '登录页',
  35. left: 0,
  36. top: 0,
  37. width: '100%',
  38. height: '100%',
  39. },
  40. },
  41. {
  42. key: PAGE_KEY.PlatformMenu,
  43. //@ts-ignore
  44. component: () => import('@/Project/pages/PlatformMenu'),
  45. //@ts-ignore
  46. models: () => import('@/Project/pages/PlatformMenu/models/menu'),
  47. options: {
  48. name: '首页',
  49. left: 0,
  50. top: 0,
  51. width: '100%',
  52. height: '100%',
  53. header: false,
  54. },
  55. },
  56. ];
  57. let Pages: { [key: string]: any } = {};
  58. route.forEach((item) => {
  59. Pages[item.key] = Drag(item);
  60. });
  61. export default Pages;