From bf292de8879e2ce71696cb3ddc4dc8fa88d91a20 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 10 六月 2022 16:51:22 +0800 Subject: [PATCH] 2022-06-10 --- src/mob/components/menubar/normal-menubar/index.jsx | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/mob/components/menubar/normal-menubar/index.jsx b/src/mob/components/menubar/normal-menubar/index.jsx index bca54f3..53d4e1f 100644 --- a/src/mob/components/menubar/normal-menubar/index.jsx +++ b/src/mob/components/menubar/normal-menubar/index.jsx @@ -225,6 +225,22 @@ }, 200) } + filterComponent = (config) => { + let item = null + config.subMenus.forEach(menu => { + if (menu.setting.type === 'linkmenu' && menu.setting.linkMenuId === '') { + item = menu + } + }) + + this.updateComponent(config) + + setTimeout(() => { + let node = document.getElementById(item.uuid) + node && node.click() + }, 200) + } + move = (item, direction) => { let card = fromJS(this.state.card).toJS() @@ -286,7 +302,7 @@ <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <CopyComponent type="menubar" card={card}/> - <PasteComponent config={card} options={['menucell']} updateConfig={this.updateComponent} /> + <PasteComponent config={card} options={['menucell']} updateConfig={this.filterComponent} /> <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} /> <UserComponent config={card}/> <DeleteOutlined className="close" title="鍒犻櫎缁勪欢" onClick={() => this.props.deletecomponent(card.uuid)} /> -- Gitblit v1.8.0