变更结构

This commit is contained in:
aixianling
2023-01-12 11:06:00 +08:00
parent 693c618c78
commit 520a78e861
11 changed files with 20 additions and 3 deletions

View File

@@ -16,6 +16,17 @@ const start = () => {
{root: "mods/", pages: []},
{root: "components/pages/", pages: []},
],
tabBar: {
// position: "top",
color: "#ddd",
selectedColor: "#92ACD1",
fontSize: "12px",
list: [
{text: "店铺", pagePath: "pages/home", iconPath: "static/tabbar/home.png", selectedIconPath: "static/tabbar/home-s.png"},
{text: "购物车", pagePath: "pages/AppCart", iconPath: "static/tabbar/cart.png", selectedIconPath: "static/tabbar/cart-s.png"},
{text: "我的", pagePath: "pages/AppMine", iconPath: "static/tabbar/mine.png", selectedIconPath: "static/tabbar/mine-s.png"},
]
},
globalStyle: {
pageOrientation: "auto",
navigationBarTextStyle: "white",
@@ -35,6 +46,12 @@ const start = () => {
return json.subPackages[0].pages.push(app)
}
}),
findPages('src/pages', file => {
if (/.+\\App[^\\]+\.vue/g.test(file)) {
const app = new PageBase(file.replace(/^src\\pages\\(.*).vue/g, 'pages/$1').replace(/\\/g, '/'), fs.readFileSync(file).toString())
return json.pages.push(app)
}
}),
]).then(() => {
fsExtra.outputJson('src/pages.json', json, () => {
chalkTag.done('生成pages.json')