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;
|
||||
|
||||
constructor() {
|
||||
this.injectCopyPaster(document);
|
||||
}
|
||||
|
||||
isCopyPasteEvent(e: Event) {
|
||||
this.isCopyPaster(e.target);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import BuiltinDragGhostComponent from './drag-ghost';
|
|||
import { Designer, DesignerProps } from './designer';
|
||||
import { ProjectView } from '../project';
|
||||
import './designer.less';
|
||||
import { clipboard } from './clipboard';
|
||||
|
||||
type IProps = DesignerProps & {
|
||||
designer?: Designer;
|
||||
|
@ -44,7 +43,6 @@ export class DesignerView extends Component<IProps> {
|
|||
if (onMount) {
|
||||
onMount(this.designer);
|
||||
}
|
||||
clipboard.injectCopyPaster(document);
|
||||
this.designer.postEvent('mount', this.designer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue