pages.config.ts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
  2. export default defineUniPages({
  3. globalStyle: {
  4. navigationStyle: 'white',
  5. navigationBarTitleText: 'vue3-uniapp',
  6. },
  7. easycom: {
  8. autoscan: true,
  9. custom: {
  10. '^Fly(.*)': '@/components/fly-$1/fly-$1.vue',
  11. '^fly-(.*)': '@/components/fly-$1/fly-$1.vue',
  12. '^uni-(.*)': '@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue',
  13. },
  14. },
  15. tabBar: {
  16. color: '#7A7E83',
  17. selectedColor: '#00f',
  18. backgroundColor: '#ffffff',
  19. borderStyle: 'black',
  20. height: '50px',
  21. fontSize: '10px',
  22. iconWidth: '24px',
  23. spacing: '3px',
  24. list: [
  25. {
  26. pagePath: 'pages/index/index',
  27. iconPath: 'static/tab-icons/extui.png',
  28. selectedIconPath: 'static/tab-icons/extuiHL.png',
  29. text: '首页',
  30. },
  31. {
  32. pagePath: 'pages/throughout/index',
  33. iconPath: 'static/tab-icons/template.png',
  34. selectedIconPath: 'static/tab-icons/templateHL.png',
  35. text: '通屏',
  36. },
  37. ],
  38. },
  39. /**
  40. * 设置默认路由入口
  41. * @default 'pages/index' || 'pages/index/index'
  42. */
  43. // homePage: 'pages/index/index',
  44. /**
  45. * 是否扫描并合并 pages.json 中 pages 字段
  46. * @default true
  47. */
  48. // mergePages: true,
  49. /**
  50. * 扫描的目录
  51. * @default 'src/pages'
  52. */
  53. // dir: 'src/pages',
  54. /**
  55. * 自定义块语言
  56. * @default 'json5' 可选值:'json5' | 'json' | 'yaml' | 'yml',
  57. */
  58. // routeBlockLang: 'json5', // 注意json5允许注释,单行多行都可以,还有其他很多特性,推荐使用
  59. /**
  60. * 排除的页面,相对于 dir 和 subPackages,通常把这些目录里面的components里面的文件排除掉
  61. * @default []
  62. */
  63. exclude: ['**/components/**/*.*'],
  64. // 你也可以定义 pages 字段,它具有最高的优先级。
  65. pages: [],
  66. /**
  67. * subPackages 扫描的目录,例如:src/pages-sub
  68. * @type SubPackage[] | undefined
  69. */
  70. subPackages: undefined,
  71. })