mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 11:20:11 +00:00
fix: fix tooltip being covered by other elements (#1717)
* docs: fix incorrect content for emit method in event api * fix: Fix tooltip being covered by other elements
This commit is contained in:
parent
4d4a8a6d6f
commit
95a1137b46
@ -3,12 +3,10 @@ import { TipItem } from './tip-item';
|
|||||||
import { tipHandler } from './tip-handler';
|
import { tipHandler } from './tip-handler';
|
||||||
|
|
||||||
export class TipContainer extends Component {
|
export class TipContainer extends Component {
|
||||||
|
private dispose?: () => void;
|
||||||
shouldComponentUpdate() {
|
shouldComponentUpdate() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private dispose?: () => void;
|
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const over = (e: MouseEvent) => tipHandler.setTarget(e.target as any);
|
const over = (e: MouseEvent) => tipHandler.setTarget(e.target as any);
|
||||||
const down = () => tipHandler.hideImmediately();
|
const down = () => tipHandler.hideImmediately();
|
||||||
@ -27,10 +25,11 @@ export class TipContainer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return window.ReactDOM.createPortal(
|
||||||
<div className="lc-tips-container">
|
<div className="lc-tips-container">
|
||||||
<TipItem />
|
<TipItem />
|
||||||
</div>
|
</div>,
|
||||||
|
document.querySelector('body')!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user