frame.ts 974 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { RouteRecordRaw } from 'vue-router';
  2. import { Layout } from '@/router/constant';
  3. import { DesktopOutline } from '@vicons/ionicons5';
  4. import { renderIcon } from '@/utils/index';
  5. const IFrame = () => import('@/views/iframe/index.vue');
  6. const routes: Array<RouteRecordRaw> = [
  7. {
  8. path: '/frame',
  9. name: 'Frame',
  10. redirect: '/frame/docs',
  11. component: Layout,
  12. meta: {
  13. title: '外部页面',
  14. sort: 9,
  15. icon: renderIcon(DesktopOutline),
  16. },
  17. children: [
  18. {
  19. path: 'docs',
  20. name: 'frame-docs',
  21. meta: {
  22. title: '项目文档(内嵌)',
  23. frameSrc: 'https://www.naiveadmin.com',
  24. },
  25. component: IFrame,
  26. },
  27. {
  28. path: 'element-plus',
  29. name: 'frame-element-plus',
  30. meta: {
  31. title: 'ElementPlus(内嵌)',
  32. frameSrc: 'https://element-plus.org',
  33. },
  34. component: IFrame,
  35. },
  36. ],
  37. },
  38. ];
  39. export default routes;