作者:just路人周 | 来源:互联网 | 2023-08-20 16:24
【Jeecg-Uni-App】-增加菜单项目1.commonutilwork.js{title:扫码,icon:staticiconscancode.png,descrip
【Jeecg-Uni-App】-增加菜单项目
1./common/util/work.js
{
title: "扫码",
icon: "/static/icon/scancode.png",
description: "扫码",
page: "scanCodeList",
useCount: 1000,
},
【注意】:page必须和Router.js中的page文件名一致。
否则会报错!
例如:
不一致的名字,报错:
2.pages.json
{
"path": “pages/scancode/scanCodeList",
"style": {
"navigationBarTitleText": "扫码测试"
}
},
3./common/router/index.js ->whiteList
const whiteList = [
'/pages/login/login',
...
'/pages/scancode/scanCodeList’,
]
4./common/router/modules/routes.js
{
path: "/pages/scancode/scanCodeList",
name: "scanCodeList”,
meta: {
title: "扫码测试",
},
},
添加的位置: