From 783ab4e467c95e26f7f031151507bd7ad8333a63 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 08 九月 2023 17:34:47 +0800 Subject: [PATCH] 2023-09-08 --- src/tabviews/custom/components/module/account/index.jsx | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/tabviews/custom/components/module/account/index.jsx b/src/tabviews/custom/components/module/account/index.jsx index a4f2cb1..24d04ca 100644 --- a/src/tabviews/custom/components/module/account/index.jsx +++ b/src/tabviews/custom/components/module/account/index.jsx @@ -160,24 +160,18 @@ addBook = () => { const { config } = this.props - let menuId = config.wrap.MenuID - let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] - - if (!menu && config.wrap.MenuNo) { - menu = { - MenuID: menuId, - MenuName: config.wrap.MenuName, - MenuNo: config.wrap.MenuNo || '', - type: config.wrap.tabType - } - } - - let newtab = { - ...menu, + let menu = { + MenuID: config.wrap.MenuID, + MenuName: config.wrap.MenuName, + type: config.wrap.tabType, param: {} } - MKEmitter.emit('modifyTabs', newtab, true) + if (window.GLOB.mkThdMenus.has(config.wrap.MenuID)) { + menu = {...window.GLOB.mkThdMenus.get(config.wrap.MenuID), param: {}} + } + + MKEmitter.emit('modifyTabs', menu, true) } render() { -- Gitblit v1.8.0