From 8ce27cbc556690661531ae5e04cf37e213b423a9 Mon Sep 17 00:00:00 2001 From: aixianling Date: Wed, 1 Mar 2023 10:14:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E4=BC=98=E9=9B=85=E7=9A=84=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E9=A1=B5=E7=AD=BE=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/lib/js/modules.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/lib/js/modules.js b/ui/lib/js/modules.js index 545e5f75..53c5e99e 100644 --- a/ui/lib/js/modules.js +++ b/ui/lib/js/modules.js @@ -257,6 +257,14 @@ export const logs = { clearOtherPages(state) { const id = location.href?.replace(location.origin, "") state.pages = state.pages.filter(e => e.id == id) || [] + }, + setPageTitle(state, title) { + const id = location.href?.replace(location.origin, "") + state.pages.map(e => { + if (e.id == id) { + e.label = title + } + }) } }, actions: {