mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-07 02:47:12 +00:00
chore: 补充 SettingField 部分 API
This commit is contained in:
parent
3f041b592b
commit
19295bb040
@ -1,16 +1,14 @@
|
||||
import { createElement } from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { globalContext, Editor, engineConfig, EngineOptions } from '@ali/lowcode-editor-core';
|
||||
import * as editorCabin from '@ali/lowcode-editor-core';
|
||||
import {
|
||||
Designer,
|
||||
LowCodePluginManager,
|
||||
ILowCodePluginContext,
|
||||
// Setters,
|
||||
} from '@ali/lowcode-designer';
|
||||
import * as designerCabin from '@ali/lowcode-designer';
|
||||
import { Skeleton as InnerSkeleton, SettingsPrimaryPane, registerDefaults } from '@ali/lowcode-editor-skeleton';
|
||||
import * as skeletonCabin from '@ali/lowcode-editor-skeleton';
|
||||
|
||||
import Outline, { OutlineBackupPane, getTreeMaster } from '@ali/lowcode-plugin-outline-pane';
|
||||
import DesignerPlugin from '@ali/lowcode-plugin-designer';
|
||||
import {
|
||||
@ -20,20 +18,19 @@ import {
|
||||
Setters,
|
||||
Material,
|
||||
Event,
|
||||
editorSymbol,
|
||||
designerSymbol,
|
||||
skeletonSymbol,
|
||||
} from '@ali/lowcode-shell';
|
||||
import { getLogger, Logger, isPlainObject } from '@ali/lowcode-utils';
|
||||
import './modules/live-editing';
|
||||
import utils from './modules/utils';
|
||||
import * as editorCabin from './modules/editor-cabin';
|
||||
import * as skeletonCabin from './modules/skeleton-cabin';
|
||||
import * as designerCabin from './modules/designer-cabin';
|
||||
|
||||
export * from './modules/editor-types';
|
||||
export * from './modules/skeleton-types';
|
||||
export * from './modules/designer-types';
|
||||
export * from './modules/lowcode-types';
|
||||
|
||||
const { monitor } = editorCabin;
|
||||
registerDefaults();
|
||||
|
||||
const editor = new Editor();
|
||||
@ -88,7 +85,6 @@ export {
|
||||
*/
|
||||
// store,
|
||||
// hotkey,
|
||||
monitor,
|
||||
utils,
|
||||
// engineConfig,
|
||||
};
|
||||
@ -124,7 +120,6 @@ const getSelection = () => designer.currentDocument?.selection;
|
||||
*/
|
||||
// store,
|
||||
// hotkey,
|
||||
monitor,
|
||||
init,
|
||||
utils,
|
||||
config,
|
||||
|
||||
4
packages/engine/src/modules/designer-cabin.ts
Normal file
4
packages/engine/src/modules/designer-cabin.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export {
|
||||
SettingField,
|
||||
isSettingField,
|
||||
} from '@ali/lowcode-designer';
|
||||
12
packages/engine/src/modules/editor-cabin.ts
Normal file
12
packages/engine/src/modules/editor-cabin.ts
Normal file
@ -0,0 +1,12 @@
|
||||
export {
|
||||
Title,
|
||||
shallowIntl,
|
||||
createIntl,
|
||||
createSetterContent,
|
||||
// TODO: To be deleted
|
||||
obx,
|
||||
computed,
|
||||
observer,
|
||||
getSetter,
|
||||
getSettersMap,
|
||||
} from '@ali/lowcode-editor-core';
|
||||
6
packages/engine/src/modules/skeleton-cabin.ts
Normal file
6
packages/engine/src/modules/skeleton-cabin.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export {
|
||||
createSettingFieldView,
|
||||
PopupContext,
|
||||
PopupPipe,
|
||||
Workbench,
|
||||
} from '@ali/lowcode-editor-skeleton';
|
||||
@ -1,17 +1,17 @@
|
||||
import { SettingEntry } from '@ali/lowcode-designer';
|
||||
import { CompositeValue, SettingTarget } from '@ali/lowcode-types';
|
||||
import { SettingField } from '@ali/lowcode-designer';
|
||||
import { CompositeValue, FieldConfig } from '@ali/lowcode-types';
|
||||
import { settingPropEntrySymbol } from './symbols';
|
||||
import Node from './node';
|
||||
import SettingTopEntry from './setting-top-entry';
|
||||
|
||||
export default class SettingPropEntry {
|
||||
private readonly [settingPropEntrySymbol]: SettingEntry;
|
||||
private readonly [settingPropEntrySymbol]: SettingField;
|
||||
|
||||
constructor(prop: SettingEntry) {
|
||||
constructor(prop: SettingField) {
|
||||
this[settingPropEntrySymbol] = prop;
|
||||
}
|
||||
|
||||
static create(prop: SettingEntry) {
|
||||
static create(prop: SettingField) {
|
||||
return new SettingPropEntry(prop);
|
||||
}
|
||||
|
||||
@ -37,4 +37,20 @@ export default class SettingPropEntry {
|
||||
getProps() {
|
||||
return SettingTopEntry.create(this[settingPropEntrySymbol].getProps() as SettingEntry) as any;
|
||||
}
|
||||
|
||||
isUseVariable() {
|
||||
return this[settingPropEntrySymbol].isUseVariable();
|
||||
}
|
||||
|
||||
setUseVariable(flag: boolean) {
|
||||
this[settingPropEntrySymbol].setUseVariable(flag);
|
||||
}
|
||||
|
||||
createField(config: FieldConfig) {
|
||||
return SettingPropEntry.create(this[settingPropEntrySymbol].createField(config));
|
||||
}
|
||||
|
||||
getMockOrValue() {
|
||||
return this[settingPropEntrySymbol].getMockOrValue();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user