mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 14:04:28 +00:00
Merge branch 'polyfill/vision' of gitlab.alibaba-inc.com:ali-lowcode/ali-lowcode-engine into polyfill/vision
This commit is contained in:
commit
4e00dc0434
@ -25,12 +25,12 @@
|
|||||||
"@ali/ve-icons": "^4.1.9",
|
"@ali/ve-icons": "^4.1.9",
|
||||||
"@ali/ve-less-variables": "2.0.3",
|
"@ali/ve-less-variables": "2.0.3",
|
||||||
"@ali/ve-popups": "^4.2.5",
|
"@ali/ve-popups": "^4.2.5",
|
||||||
|
"@ali/ve-trunk-pane": "^5.1.0-beta.14",
|
||||||
"@ali/ve-utils": "^1.1.0",
|
"@ali/ve-utils": "^1.1.0",
|
||||||
"@ali/vu-css-style": "^1.1.3",
|
"@ali/vu-css-style": "^1.1.3",
|
||||||
"@ali/vu-logger": "^1.0.7",
|
"@ali/vu-logger": "^1.0.7",
|
||||||
"@ali/vu-style-sheet": "^2.4.0",
|
"@ali/vu-style-sheet": "^2.4.0",
|
||||||
"@alifd/next": "^1.19.12",
|
"@alifd/next": "^1.19.12",
|
||||||
"@ali/ve-stage-box": "^4.0.0",
|
|
||||||
"@alife/theme-lowcode-dark": "^0.1.0",
|
"@alife/theme-lowcode-dark": "^0.1.0",
|
||||||
"@alife/theme-lowcode-light": "^0.1.0",
|
"@alife/theme-lowcode-light": "^0.1.0",
|
||||||
"react": "^16.8.1",
|
"react": "^16.8.1",
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import Engine from '@ali/visualengine';
|
import Engine, { Panes } from '@ali/visualengine';
|
||||||
|
import getTrunkPane from '@ali/ve-trunk-pane';
|
||||||
import loadUrls from './loader';
|
import loadUrls from './loader';
|
||||||
import { upgradeAssetsBundle } from './upgrade-assets';
|
import { upgradeAssetsBundle } from './upgrade-assets';
|
||||||
|
|
||||||
const { editor } = Engine;
|
const { editor } = Engine;
|
||||||
|
|
||||||
|
initTrunkPane();
|
||||||
Engine.init();
|
Engine.init();
|
||||||
|
|
||||||
load();
|
load();
|
||||||
@ -52,3 +54,19 @@ async function loadSchema() {
|
|||||||
const schema = await editor.utils.get('./schema.json');
|
const schema = await editor.utils.get('./schema.json');
|
||||||
editor.set('schema', schema);
|
editor.set('schema', schema);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function initTrunkPane() {
|
||||||
|
const assets = await editor.onceGot('legao-assets');
|
||||||
|
const config = {
|
||||||
|
disableLowCodeComponent: true,
|
||||||
|
disableComponentStore: true,
|
||||||
|
app: {
|
||||||
|
getAssetsData() {
|
||||||
|
return assets;
|
||||||
|
// return data;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const TrunkPane = getTrunkPane(config);
|
||||||
|
Panes.add(TrunkPane);
|
||||||
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import PanelDock from './panel-dock';
|
|||||||
import Dock from './dock';
|
import Dock from './dock';
|
||||||
import { Stage, StageConfig } from './stage';
|
import { Stage, StageConfig } from './stage';
|
||||||
import { isValidElement } from 'react';
|
import { isValidElement } from 'react';
|
||||||
|
import { isPlainObject } from 'globals/src/utils';
|
||||||
|
|
||||||
export enum SkeletonEvents {
|
export enum SkeletonEvents {
|
||||||
PANEL_DOCK_ACTIVE = 'skeleton.panel-dock.active',
|
PANEL_DOCK_ACTIVE = 'skeleton.panel-dock.active',
|
||||||
@ -230,7 +231,7 @@ export class Skeleton {
|
|||||||
add(config: IWidgetBaseConfig & { area: string }) {
|
add(config: IWidgetBaseConfig & { area: string }) {
|
||||||
const { content, ...restConfig } = config;
|
const { content, ...restConfig } = config;
|
||||||
if (content) {
|
if (content) {
|
||||||
if (typeof content === 'object' && !isValidElement(content)) {
|
if (isPlainObject(content) && !isValidElement(content)) {
|
||||||
Object.keys(content).forEach((key) => {
|
Object.keys(content).forEach((key) => {
|
||||||
if (/props$/i.test(key) && restConfig[key]) {
|
if (/props$/i.test(key) && restConfig[key]) {
|
||||||
restConfig[key] = {
|
restConfig[key] = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user