From 76a4300654a18d228838c3f27455dc8e7a8cd616 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 15 一月 2021 17:04:42 +0800 Subject: [PATCH] Merge branch 'master' into bms --- src/menu/components/card/cardcomponent/index.jsx | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/menu/components/card/cardcomponent/index.jsx b/src/menu/components/card/cardcomponent/index.jsx index b16e051..e424497 100644 --- a/src/menu/components/card/cardcomponent/index.jsx +++ b/src/menu/components/card/cardcomponent/index.jsx @@ -206,6 +206,13 @@ }) } + clickComponent = (e) => { + if ((sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'propcard') && this.props.cards.subtype === 'propcard') { + e.stopPropagation() + MKEmitter.emit('clickComponent', this.state.card, this.props.cards, 'propcard') + } + } + render() { const { cards, offset } = this.props const { card, elements, side, settingVisible, dict } = this.state @@ -229,7 +236,7 @@ return ( <Col span={card.setting.width || 6} offset={offset || 0}> - <div className="card-item" style={_style}> + <div className="card-item" style={_style} onClick={this.clickComponent} id={card.uuid}> <CardCellComponent cards={cards} cardCell={card} side={side} elements={elements} updateElement={this.updateCard}/> <div className="card-control"> <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ @@ -244,8 +251,8 @@ <Icon className="plus" title="宸︾Щ" type="arrow-left" onClick={() => this.props.move(card, 'left')} /> <Icon className="close" title="鍙崇Щ" type="arrow-right" onClick={() => this.props.move(card, 'right')} /> </div> - } trigger="hover" getPopupContainer={() => document.getElementById(card.uuid)}> - <Icon type="swap" id={card.uuid}/> + } trigger="hover" getPopupContainer={() => document.getElementById(card.uuid + 'swap')}> + <Icon type="swap" id={card.uuid + 'swap'}/> </Popover> : null} {cards.subtype === 'propcard' ? <Icon className="close" title="鍒犻櫎鍗$墖" type="delete" onClick={() => this.props.deleteElement(card)} /> : null} {card.setting.type === 'multi' ? <Switch size="small" onClick={this.changeSide} defaultChecked /> : null} -- Gitblit v1.8.0