uniapp:小程序分包加载配置subPackages
小程序分包加载API{"easycom": {"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"},"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages{"path": "pages/index/index","style": {"navigation
·
{
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "首页"
}
},
{
"path": "pages/index/category",
"style": {
"navigationBarTitleText": "分类"
}
},
{
"path": "pages/index/cart",
"style": {
"navigationBarTitleText": "购物车"
}
},
{
"path": "pages/index/mine",
"style": {
"navigationBarTitleText": "我的"
}
},
],
"subPackages": [
{
"root": "pages/goods",
"pages": [{
"path": "goodsDetail",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}]
},
{
"root": "pages/userinfo",
"pages": [{
"path": "user",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}]
},
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"app-plus": {
"titleNView": false,
"bounce": "none" // 取消APP端iOS回弹,避免与下拉刷新冲突 (可统一配在 'globalStyle')
}
},
"tabBar": { // 设置底部 tab 的表现
"color": "#5C5C66",
"selectedColor": "#47D366",
"borderStyle": "black",
"backgroundColor": "#fff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/icon/tabbar1.png",
"selectedIconPath": "static/icon/tabbar1-1.png",
"text": "首页"
}, {
"pagePath": "pages/index/category",
"iconPath": "static/icon/tabbar2.png",
"selectedIconPath": "static/icon/tabbar2-2.png",
"text": "分类"
}, {
"pagePath": "pages/index/cart",
"iconPath": "static/icon/tabbar3.png",
"selectedIconPath": "static/icon/tabbar3-3.png",
"text": "购物车"
}, {
"pagePath": "pages/index/mine",
"iconPath": "static/icon/tabbar4.png",
"selectedIconPath": "static/icon/tabbar4-4.png",
"text": "我的"
}]
}
}
对应目录结构
更多推荐
已为社区贡献3条内容
所有评论(0)