mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-02-28 04:40:32 +00:00
style: editor-preset-general
editor-preset-general 代码规范化 Link: https://code.aone.alibaba-inc.com/ali-lowcode/ali-lowcode-engine/codereview/3707974 * style: editor-preset-general
This commit is contained in:
parent
ae76a1cffd
commit
0d3e7c96b3
@ -1,11 +1,13 @@
|
||||
import { render } from 'react-dom';
|
||||
import { createElement } from 'react';
|
||||
import { Workbench, Skeleton, SettingsPrimaryPane, registerDefaults } from '@ali/lowcode-editor-skeleton';
|
||||
import { globalContext, Editor } from '@ali/lowcode-editor-core';
|
||||
import { Designer, LiveEditing, TransformStage, Node } from '@ali/lowcode-designer';
|
||||
import Outline, { OutlineBackupPane, getTreeMaster } from '@ali/lowcode-plugin-outline-pane';
|
||||
import DesignerPlugin from '@ali/lowcode-plugin-designer';
|
||||
import '@ali/lowcode-editor-setters';
|
||||
import DesignerPlugin from '@ali/lowcode-plugin-designer';
|
||||
import { Designer, LiveEditing } from '@ali/lowcode-designer';
|
||||
import { globalContext, Editor } from '@ali/lowcode-editor-core';
|
||||
import { OutlineBackupPane, getTreeMaster } from '@ali/lowcode-plugin-outline-pane';
|
||||
import { Workbench, Skeleton, SettingsPrimaryPane, registerDefaults } from '@ali/lowcode-editor-skeleton';
|
||||
|
||||
import { version } from '../package.json';
|
||||
import { liveEditingRule, liveEditingSaveHander } from './live-editing';
|
||||
|
||||
export * from '@ali/lowcode-types';
|
||||
@ -50,8 +52,6 @@ skeleton.add({
|
||||
content: OutlineBackupPane,
|
||||
});
|
||||
|
||||
const version = '0.9.0-beta';
|
||||
|
||||
export default function GeneralWorkbench(props: any) {
|
||||
return createElement(Workbench, {
|
||||
skeleton,
|
||||
|
||||
@ -21,7 +21,7 @@ function getText(node: DocNode, prop: string) {
|
||||
|
||||
export function liveEditingRule(target: EditingTarget) {
|
||||
// for vision components specific
|
||||
const { node, rootElement, event } = target;
|
||||
const { node, event } = target;
|
||||
|
||||
const targetElement = event.target as HTMLElement;
|
||||
|
||||
@ -53,7 +53,7 @@ function equalText(v: any, innerText: string) {
|
||||
|
||||
export const liveEditingSaveHander: SaveHandler = {
|
||||
condition: (prop) => {
|
||||
const v = prop.getValue();
|
||||
// const v = prop.getValue();
|
||||
return prop.type === 'expression'; // || isI18nData(v);
|
||||
},
|
||||
onSaveContent: (content, prop) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user