我用navigateTo,实现页面之间的跳转,app.json配置如下

{

“pages”: [

“pages/login/login”,

“pages/index/index”,

“pages/home/home”,

“pages/user/user”

],

“window”: {

“backgroundColor”: “#f4f4f4”,

“backgroundTextStyle”: “light”,

“navigationBarBackgroundColor”: “#0099FF”,

“navigationBarTitleText”: “AA”,

“enablePullDownRefresh”: “true”,

“navigationBarTextStyle”: “white”

},

“tabBar”: {

“selectedColor”: “#0099FF”,

“borderStyle”: “lightgray”,

“backgroundColor”: “white”,

“list”: [

{

“pagePath”: “pages/index/index”,

“iconPath”: “resources/images/index.png”,

“selectedIconPath”: “resources/images/index.png”,

“text”: “首頁”

},

{

“pagePath”: “pages/home/home”,

“iconPath”: “resources/images/home.png”,

“selectedIconPath”: “resources/images/home.png”,

“text”: “主頁”

}]

Logo

开源鸿蒙跨平台开发社区汇聚开发者与厂商,共建“一次开发,多端部署”的开源生态,致力于降低跨端开发门槛,推动万物智联创新。

更多推荐