| | |
| | | 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() { |