app.config.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. const appConfig = defineAppConfig({
  2. pages: [
  3. 'pages/clock/Clock',
  4. 'pages/demo',
  5. 'pages/index/index',
  6. 'pages/account/Login',
  7. 'pages/account/Auth',
  8. 'pages/account/ChooseAuth',
  9. 'pages/clock/ChooseScenario',
  10. 'pages/clock/SetSchedule',
  11. 'pages/common/H5',
  12. 'pages/account/Profile',
  13. 'pages/metric/Metric',
  14. 'pages/activity/Activity',
  15. 'pages/common/RecordsHistory',
  16. 'pages/account/ProfileSetting',
  17. 'pages/account/Setting',
  18. 'pages/account/EditPage',
  19. ],
  20. subPackages: [
  21. {
  22. root: 'moduleA',
  23. pages: [
  24. 'pages/third'
  25. ]
  26. }
  27. ],
  28. usingComponents:{
  29. 'mysvg':'./components/basic/svg'
  30. },
  31. // tabBar: {
  32. // custom: true,
  33. // list:[
  34. // {
  35. // pagePath: 'pages/Clock',
  36. // text: '首页',
  37. // },
  38. // {
  39. // pagePath: 'pages/Metric',
  40. // text: '第二页',
  41. // },
  42. // {
  43. // pagePath: 'pages/Activity',
  44. // text: '第三页',
  45. // },
  46. // {
  47. // pagePath: 'pages/Profile',
  48. // text: '第二页',
  49. // }
  50. // ]
  51. // },
  52. window: {
  53. "backgroundTextStyle": "light",
  54. "navigationBarBackgroundColor": "#000000",
  55. "navigationBarTitleText": "Weixin",
  56. "navigationBarTextStyle": "white",
  57. "backgroundColor": "#000000"
  58. },
  59. // darkmode: true
  60. })
  61. process.env.TARO_ENV === 'weapp' && (appConfig.tabBar = {
  62. custom: true,
  63. list: [
  64. {
  65. pagePath: 'pages/clock/Clock',
  66. text: '首页',
  67. },
  68. {
  69. pagePath: 'pages/metric/Metric',
  70. text: '第二页',
  71. },
  72. {
  73. pagePath: 'pages/activity/Activity',
  74. text: '第三页',
  75. },
  76. {
  77. pagePath: 'pages/account/Profile',
  78. text: '第四页',
  79. }
  80. ]
  81. })
  82. //src/pages/rn/RNMain.tsx
  83. process.env.TARO_ENV === 'rn' && (appConfig.pages = [
  84. 'pages/rn/RNMain'
  85. ])
  86. export default appConfig;