mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 19:52:51 +00:00
feat: refine pop drawer
This commit is contained in:
parent
c5ffbd59c4
commit
abf8fae3ef
@ -1,6 +1,6 @@
|
|||||||
import { createContext, ReactNode, Component, PureComponent } from 'react';
|
import { createContext, ReactNode, Component, PureComponent } from 'react';
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
import { Drawer } from '@alifd/next';
|
import { Drawer, ConfigProvider } from '@alifd/next';
|
||||||
import { uniqueId } from '@alilc/lowcode-utils';
|
import { uniqueId } from '@alilc/lowcode-utils';
|
||||||
import './style.less';
|
import './style.less';
|
||||||
|
|
||||||
@ -82,6 +82,8 @@ export default class PopupService extends Component<{ popupPipe?: PopupPipe; act
|
|||||||
export class PopupContent extends PureComponent<{ safeId?: string }> {
|
export class PopupContent extends PureComponent<{ safeId?: string }> {
|
||||||
static contextType = PopupContext;
|
static contextType = PopupContext;
|
||||||
|
|
||||||
|
popupContainerId = uniqueId('popupContainer');
|
||||||
|
|
||||||
state: any = {
|
state: any = {
|
||||||
visible: false,
|
visible: false,
|
||||||
offsetX: -300,
|
offsetX: -300,
|
||||||
@ -151,7 +153,7 @@ export class PopupContent extends PureComponent<{ safeId?: string }> {
|
|||||||
}}
|
}}
|
||||||
trigger={<div className="lc-popup-placeholder" style={pos} />}
|
trigger={<div className="lc-popup-placeholder" style={pos} />}
|
||||||
triggerType="click"
|
triggerType="click"
|
||||||
canCloseByOutSideClick={false}
|
canCloseByOutSideClick
|
||||||
animation={false}
|
animation={false}
|
||||||
onClose={this.onClose}
|
onClose={this.onClose}
|
||||||
id={this.props.safeId}
|
id={this.props.safeId}
|
||||||
@ -161,9 +163,13 @@ export class PopupContent extends PureComponent<{ safeId?: string }> {
|
|||||||
<div className="lc-ballon-title">{title}</div>
|
<div className="lc-ballon-title">{title}</div>
|
||||||
<div className="lc-ballon-content">
|
<div className="lc-ballon-content">
|
||||||
<PopupService actionKey={actionKey} safeId={id}>
|
<PopupService actionKey={actionKey} safeId={id}>
|
||||||
{content}
|
<ConfigProvider popupContainer={this.popupContainerId}>
|
||||||
|
{content}
|
||||||
|
</ConfigProvider>
|
||||||
</PopupService>
|
</PopupService>
|
||||||
</div>
|
</div>
|
||||||
|
<div id={this.popupContainerId} />
|
||||||
|
<div id="engine-variable-setter-dialog" />
|
||||||
</Drawer>
|
</Drawer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user