From b5747ede8a39f08499459f3569a99e577a5f395d Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 24 Mar 2023 09:43:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=93=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=9C=8B=E5=88=B0=E8=87=AA=E5=8A=A8=E7=94=9F?= =?UTF-8?q?=E6=88=90=E7=9A=84=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/serve.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/serve.js b/bin/serve.js index 4833415a..c1c88f6c 100644 --- a/bin/serve.js +++ b/bin/serve.js @@ -11,6 +11,18 @@ const getFileInfo = (app, file) => { } else app.style = {navigationBarTitleText: app.label} } + if (/^App/.test(app.name) && app.label) { + let {name, label} = app, + path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/apps/$1/$2`) + return apps.list.push({ + id: file.replace(/\.\/?(vue)?/g, '').replace(/[\\\/]/g, '_'), + name, + label, + path, + libPath: file.replace(/[\\\/]/g, '/').replace(/^src(\/.+)\.vue/, '$1'), + type: 'wxwork' + }) + } }