mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-14 23:59:49 +08:00
feat(playground): 设置配置表单的label-width
This commit is contained in:
parent
49e9d5b985
commit
50d238a48c
@ -55,6 +55,7 @@ import {
|
|||||||
type MenuBarData,
|
type MenuBarData,
|
||||||
type MenuButton,
|
type MenuButton,
|
||||||
type MoveableOptions,
|
type MoveableOptions,
|
||||||
|
propsService,
|
||||||
type Services,
|
type Services,
|
||||||
TMagicEditor,
|
TMagicEditor,
|
||||||
} from '@tmagic/editor';
|
} from '@tmagic/editor';
|
||||||
@ -125,9 +126,9 @@ const usePasteMenu = (menu?: Ref<InstanceType<typeof ContentMenu> | undefined>):
|
|||||||
const initialTop =
|
const initialTop =
|
||||||
calcValueByFontsize(stage?.renderer.getDocument(), (rect.top || 0) - (parentRect?.top || 0)) /
|
calcValueByFontsize(stage?.renderer.getDocument(), (rect.top || 0) - (parentRect?.top || 0)) /
|
||||||
services.uiService.get('zoom');
|
services.uiService.get('zoom');
|
||||||
services?.editorService?.paste({ left: initialLeft, top: initialTop });
|
services?.editorService?.paste({ left: initialLeft, top: initialTop }, collectorOptions);
|
||||||
} else {
|
} else {
|
||||||
services?.editorService?.paste();
|
services?.editorService?.paste({}, collectorOptions);
|
||||||
services?.codeBlockService?.paste();
|
services?.codeBlockService?.paste();
|
||||||
services?.dataSourceService?.paste();
|
services?.dataSourceService?.paste();
|
||||||
}
|
}
|
||||||
@ -310,6 +311,10 @@ editorService.usePlugin({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
propsService.usePlugin({
|
||||||
|
beforeFillConfig: (config) => [config, '100px'],
|
||||||
|
});
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
editorService.removeAllPlugins();
|
editorService.removeAllPlugins();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user