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