index.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import { createRouter, createWebHistory } from "vue-router"
  2. import TabGroup from './../pages/tab-group';
  3. // 2. 定义路由配置
  4. const routes = [
  5. {
  6. path: '/tab-group',
  7. name: 'tabGroup',
  8. component: TabGroup
  9. },
  10. {
  11. path: '/nav-message',
  12. name: 'navMessage',
  13. component: () => require('@/pages/tabbar/message/index')
  14. },
  15. {
  16. path: '/nav-nft-index',
  17. name: 'navNftIndex',
  18. component: () => require('@/pages/tabbar/nft/index')
  19. },
  20. {
  21. path: '/nav-nft-detail',
  22. name: 'navNftDetail',
  23. component: () => require('@/pages/tabbar/nft/detail')
  24. },
  25. {
  26. path: '/nav-nft-transfer',
  27. name: 'navNftTransfer',
  28. component: () => require('@/pages/tabbar/nft/transfer')
  29. },
  30. {
  31. path: '/nav-wallet-index',
  32. name: 'navWalletIndex',
  33. component: () => require('@/pages/tabbar/wallet/index')
  34. },
  35. {
  36. path: '/nav-wallet-transactions',
  37. name: 'navWalletTransactions',
  38. component: () => require('@/pages/tabbar/wallet/transactions')
  39. },
  40. {
  41. path: '/page-currency-detail',
  42. name: 'pageCurrencyDetail',
  43. component: () => require('@/pages/currency/detail')
  44. }
  45. ]
  46. // 3. 创建路由实例
  47. const router = createRouter({
  48. // 4. 采用hash 模式
  49. // history: createWebHashHistory('popup.html'),
  50. // 采用 history 模式
  51. history: createWebHistory(),
  52. routes, // short for `routes: routes`
  53. });
  54. export default router