2024-01-04 09:53:17 +08:00
|
|
|
|
import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
|
2024-01-16 10:15:20 +08:00
|
|
|
|
import { isWxProd } from './vite.config'
|
2024-01-04 09:53:17 +08:00
|
|
|
|
|
|
|
|
|
export default defineUniPages({
|
|
|
|
|
globalStyle: {
|
2024-01-04 10:42:11 +08:00
|
|
|
|
navigationStyle: 'default',
|
2024-01-04 09:53:17 +08:00
|
|
|
|
navigationBarTitleText: 'vue3-uniapp',
|
2024-01-04 10:42:11 +08:00
|
|
|
|
navigationBarBackgroundColor: '#f8f8f8',
|
|
|
|
|
navigationBarTextStyle: 'black',
|
2024-01-05 10:57:20 +08:00
|
|
|
|
backgroundColor: '#FFFFFF',
|
2024-01-04 09:53:17 +08:00
|
|
|
|
},
|
|
|
|
|
easycom: {
|
|
|
|
|
autoscan: true,
|
|
|
|
|
custom: {
|
|
|
|
|
'^fly-(.*)': '@/components/fly-$1/fly-$1.vue',
|
|
|
|
|
'^uni-(.*)': '@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
tabBar: {
|
2024-01-15 17:36:11 +08:00
|
|
|
|
color: '#999999',
|
|
|
|
|
selectedColor: '#018d71',
|
|
|
|
|
backgroundColor: '#F8F8F8',
|
2024-01-04 09:53:17 +08:00
|
|
|
|
borderStyle: 'black',
|
|
|
|
|
height: '50px',
|
|
|
|
|
fontSize: '10px',
|
|
|
|
|
iconWidth: '24px',
|
|
|
|
|
spacing: '3px',
|
2024-01-16 10:15:20 +08:00
|
|
|
|
list: isWxProd
|
|
|
|
|
? [
|
|
|
|
|
{
|
|
|
|
|
iconPath: 'static/tabbar/home.png',
|
|
|
|
|
selectedIconPath: 'static/tabbar/homeHL.png',
|
|
|
|
|
pagePath: 'pages/index/index',
|
|
|
|
|
text: '首页',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
iconPath: 'static/tabbar/personal.png',
|
|
|
|
|
selectedIconPath: 'static/tabbar/personalHL.png',
|
|
|
|
|
pagePath: 'pages/my/index',
|
|
|
|
|
text: '我的',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: [
|
|
|
|
|
{
|
|
|
|
|
iconPath: 'static/tabbar/home.png',
|
|
|
|
|
selectedIconPath: 'static/tabbar/homeHL.png',
|
|
|
|
|
pagePath: 'pages/index/index',
|
|
|
|
|
text: '首页',
|
|
|
|
|
},
|
|
|
|
|
// 生产环境要注释掉demo,所以分开来写
|
|
|
|
|
{
|
|
|
|
|
iconPath: 'static/tabbar/example.png',
|
|
|
|
|
selectedIconPath: 'static/tabbar/exampleHL.png',
|
|
|
|
|
pagePath: 'pages/demo/index',
|
|
|
|
|
text: '示例',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
iconPath: 'static/tabbar/personal.png',
|
|
|
|
|
selectedIconPath: 'static/tabbar/personalHL.png',
|
|
|
|
|
pagePath: 'pages/my/index',
|
|
|
|
|
text: '我的',
|
|
|
|
|
},
|
|
|
|
|
],
|
2024-01-04 09:53:17 +08:00
|
|
|
|
},
|
|
|
|
|
// 你也可以定义 pages 字段,它具有最高的优先级。
|
|
|
|
|
pages: [],
|
|
|
|
|
/**
|
|
|
|
|
* subPackages 扫描的目录,例如:src/pages-sub
|
|
|
|
|
* @type SubPackage[] | undefined
|
|
|
|
|
*/
|
|
|
|
|
subPackages: undefined,
|
|
|
|
|
})
|