pages.config.ts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
  2. export default defineUniPages({
  3. globalStyle: {
  4. navigationStyle: 'default',
  5. navigationBarTitleText: 'unibest',
  6. navigationBarBackgroundColor: '#f8f8f8',
  7. navigationBarTextStyle: 'black',
  8. backgroundColor: '#FFFFFF',
  9. },
  10. easycom: {
  11. autoscan: true,
  12. custom: {
  13. '^fg-(.*)': '@/components/fg-$1/fg-$1.vue',
  14. '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
  15. '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
  16. 'z-paging/components/z-paging$1/z-paging$1.vue',
  17. },
  18. },
  19. // 如果不需要tabBar,推荐使用 spa 模板。(pnpm create xxx -t spa)
  20. tabBar: {
  21. color: '#999999',
  22. selectedColor: '#018d71',
  23. backgroundColor: '#F8F8F8',
  24. borderStyle: 'black',
  25. height: '50px',
  26. fontSize: '10px',
  27. iconWidth: '24px',
  28. spacing: '3px',
  29. list: [
  30. {
  31. iconPath: 'static/tabbar/home.png',
  32. selectedIconPath: 'static/tabbar/homeHL.png',
  33. pagePath: 'pages/index/index',
  34. text: '首页',
  35. },
  36. {
  37. iconPath: 'static/tabbar/example.png',
  38. selectedIconPath: 'static/tabbar/exampleHL.png',
  39. pagePath: 'pages/about/about',
  40. text: '关于',
  41. },
  42. {
  43. iconPath: 'static/tabbar/personal.png',
  44. selectedIconPath: 'static/tabbar/personalHL.png',
  45. pagePath: 'pages/mine/index',
  46. text: '我的',
  47. },
  48. ],
  49. },
  50. // 微信小程序特定配置
  51. // 'mp-weixin': {
  52. // lazyCodeLoading: 'requiredComponents', // 微信小程序懒加载配置
  53. // },
  54. // 使用条件编译添加微信小程序特定配置
  55. // #ifdef MP-WEIXIN
  56. // lazyCodeLoading: 'requiredComponents',
  57. // #endif
  58. // 使用 custom 字段注入原生微信小程序配置
  59. // custom: {
  60. // mpWeixin: {
  61. // appJson: {
  62. // lazyCodeLoading: 'requiredComponents',
  63. // },
  64. // },
  65. // },
  66. })