mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
fix: fix clipboard.setData fial in workspace mode
This commit is contained in:
parent
8931d8393d
commit
34a5a11b49
@ -36,6 +36,10 @@ class Clipboard implements IClipboard {
|
|||||||
|
|
||||||
private waitFn?: (data: any, e: ClipboardEvent) => void;
|
private waitFn?: (data: any, e: ClipboardEvent) => void;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.injectCopyPaster(document);
|
||||||
|
}
|
||||||
|
|
||||||
isCopyPasteEvent(e: Event) {
|
isCopyPasteEvent(e: Event) {
|
||||||
this.isCopyPaster(e.target);
|
this.isCopyPaster(e.target);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import BuiltinDragGhostComponent from './drag-ghost';
|
|||||||
import { Designer, DesignerProps } from './designer';
|
import { Designer, DesignerProps } from './designer';
|
||||||
import { ProjectView } from '../project';
|
import { ProjectView } from '../project';
|
||||||
import './designer.less';
|
import './designer.less';
|
||||||
import { clipboard } from './clipboard';
|
|
||||||
|
|
||||||
type IProps = DesignerProps & {
|
type IProps = DesignerProps & {
|
||||||
designer?: Designer;
|
designer?: Designer;
|
||||||
@ -44,7 +43,6 @@ export class DesignerView extends Component<IProps> {
|
|||||||
if (onMount) {
|
if (onMount) {
|
||||||
onMount(this.designer);
|
onMount(this.designer);
|
||||||
}
|
}
|
||||||
clipboard.injectCopyPaster(document);
|
|
||||||
this.designer.postEvent('mount', this.designer);
|
this.designer.postEvent('mount', this.designer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user