From 12089dced6e9d73157b6da3e74751b6ec79c89cc Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 16 May 2022 10:01:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8B=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/pages.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/pages.js b/bin/pages.js index be121c2..2a15db1 100644 --- a/bin/pages.js +++ b/bin/pages.js @@ -12,8 +12,9 @@ const getFileInfo = (app, file) => { app.style = {navigationBarTitleText: app.label} } if (/^App/.test(app.name)) { - let {name, label} = app - apps.list.push({id: name, name, label, path: `/mods/${name}/${name}`, libPath: file?.replace(/\\/g, '/')?.replace(/^src(\/.+)\.vue/, '$1')}) + let {name, label} = app, + path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g,`/mods/$1/$2`) + apps.list.push({id: name, name, label, path, libPath: file?.replace(/\\/g, '/')?.replace(/^src(\/.+)\.vue/, '$1')}) } } const saveApps = app => {