项目实战-点餐小程序-11 配置小程序多页面

一、创建images文件夹

创建images文件夹,与pages文件夹同级。将小程序多页面的小图标文件放在images文件夹下。

 

 

 

二、配置多页面

打开app.json文件,添加tabBar代码。

 1  "tabBar": {
 2     "color": "#C3C3C3",
 3     "selectedColor": "#FF9966",
 4     "borderStyle": "white",
 5     "list": [
 6       {
 7       "pagePath": "pages/home/home",
 8       "text": "首页",
 9       "iconPath": "images/home-no.png",
10       "selectedIconPath": "images/home-yes.png"
11     },
12       {
13       "pagePath": "pages/me/me",
14       "text": "首页",
15       "iconPath": "images/me-no.png",
16       "selectedIconPath": "images/me-yes.png"
17     }
18   ]
19   },

 

posted @ 2021-07-30 17:50  AnnLing  阅读(817)  评论(1)    收藏  举报