From be5485c8e39a8cee2cfdb370ef71a676095496c1 Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 27 Jan 2022 14:10:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=88=B0=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/serve.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/serve.js b/bin/serve.js index 785f496f..c9d39309 100644 --- a/bin/serve.js +++ b/bin/serve.js @@ -90,6 +90,11 @@ const start = () => { name: file.replace(/.*\\([^\\]+).vue/g, '$1'), path: file.replace(/^src\\(.*).vue/g, '$1').replace(/\\/g, '/') } + if (/appName/.test(vue.script.content)) { + let appName = vue.script.content.replace(/[\s\S]*(appName:.+),[\s\S]*/gm, '$1'), + title = appName.replace(/(appName:|["'])/g, '') + app.style = {navigationBarTitleText: title} + } json.pages.push(app) } })