pages.config.ts 893 B

1234567891011121314151617181920212223242526
  1. import { isH5 } from '@uni-helper/uni-env'
  2. import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
  3. import { tabBar } from './src/tabbar/config'
  4. export default defineUniPages({
  5. globalStyle: {
  6. navigationStyle: 'default',
  7. navigationBarTitleText: 'unibest',
  8. navigationBarBackgroundColor: '#f8f8f8',
  9. navigationBarTextStyle: 'black',
  10. backgroundColor: '#FFFFFF',
  11. },
  12. easycom: {
  13. autoscan: true,
  14. custom: {
  15. '^fg-(.*)': '@/components/fg-$1/fg-$1.vue',
  16. '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
  17. '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
  18. 'z-paging/components/z-paging$1/z-paging$1.vue',
  19. },
  20. },
  21. // tabbar 的配置统一在 “./src/tabbar/config.ts” 文件中
  22. // 无tabbar模式下,h5 设置为 {} 为了防止浏览器报错导致白屏
  23. tabBar: tabBar || (isH5 ? {} : undefined) as any,
  24. })