| | |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | } else if (config.wrap.click === 'menu') { |
| | | let menuId = config.wrap.MenuID || config.wrap.menu.slice(-1)[0] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menuId = config.wrap.menu.slice(-1)[0] |
| | | let menu = null |
| | | |
| | | if (!menu && config.wrap.MenuName && config.wrap.tabType) { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId)} |
| | | } else if (config.wrap.MenuID) { |
| | | menu = { |
| | | MenuID: menuId, |
| | | MenuID: config.wrap.MenuID, |
| | | MenuName: config.wrap.MenuName, |
| | | MenuNo: config.wrap.MenuNo || '', |
| | | type: config.wrap.tabType |
| | | } |
| | | } |
| | | |
| | | if (!menu) return |
| | | |
| | | let newtab = { |
| | | ...menu, |
| | | param: {$BID: data.$$uuid || ''} |
| | | } |
| | | menu.param = {$BID: data.$$uuid || ''} |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | newtab.param[key] = data[key] |
| | | menu.param[key] = data[key] |
| | | }) |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } |
| | | } |
| | | |