From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 八月 2022 11:42:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/mob/components/topbar/normal-navbar/index.jsx | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/mob/components/topbar/normal-navbar/index.jsx b/src/mob/components/topbar/normal-navbar/index.jsx index 5ee7895..9579b7e 100644 --- a/src/mob/components/topbar/normal-navbar/index.jsx +++ b/src/mob/components/topbar/normal-navbar/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Popover } from 'antd' -import { ExpandOutlined, ReloadOutlined, EllipsisOutlined, LogoutOutlined, ToolOutlined, ScanOutlined, LeftOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SearchOutlined } from '@ant-design/icons' +import { ExpandOutlined, ReloadOutlined, EllipsisOutlined, LogoutOutlined, ToolOutlined, ScanOutlined, LeftOutlined, EditOutlined, FontColorsOutlined, DeleteOutlined, SearchOutlined, MenuOutlined } from '@ant-design/icons' import asyncIconComponent from '@/utils/asyncIconComponent' import getWrapForm from './options' @@ -175,6 +175,14 @@ } updateWrap = (res) => { + let funs = res.funs || [] + + delete res.funs + + funs.forEach(n => { + res[n] = 'true' + }) + this.updateComponent({...this.state.card, wrap: res}) } @@ -204,12 +212,15 @@ if (card.wrap.refresh === 'true') { right = !right ? <ReloadOutlined /> : <EllipsisOutlined onDoubleClick={this.skip}/> } + if (card.wrap.menus && card.wrap.menus.length > 0) { + right = !right ? <MenuOutlined /> : <EllipsisOutlined onDoubleClick={this.skip}/> + } return ( <div className="normal-topbar-edit-box" style={card.style} onClick={this.clickComponent} id={card.uuid}> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ <div className="mk-popover-control"> - <NormalForm title="瀵艰埅鏍忚缃�" width={850} update={this.updateWrap} getForms={this.getWrapForms}> + <NormalForm title="瀵艰埅鏍忚缃�" width={900} update={this.updateWrap} getForms={this.getWrapForms}> <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <CopyComponent type="topbar" card={card}/> @@ -221,7 +232,7 @@ </Popover> <div className="am-navbar"> <div className="am-navbar-left"> - {card.wrap.back !== 'false' && card.wrap.menuPosition !== 'left' ? <LeftOutlined /> : null} + {card.wrap.back === 'true' && card.wrap.menuPosition !== 'left' ? <LeftOutlined /> : null} {card.wrap.menuPosition === 'left' ? <div className="img" style={{backgroundImage: `url(${avatar})`}}></div> : null} </div> {card.wrap.type !== 'search' ? -- Gitblit v1.8.0