mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 09:41:57 +00:00
fix rect
This commit is contained in:
commit
4eee69763f
@ -41,7 +41,8 @@
|
||||
"@alife/theme-lowcode-light": "^0.1.0",
|
||||
"react": "^16.8.1",
|
||||
"react-dom": "^16.8.1",
|
||||
"@ali/vu-function-parser": "^2.5.0-beta.0"
|
||||
"@ali/vu-function-parser": "^2.5.0-beta.0",
|
||||
"compare-versions": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ali/iceluna-cli": "^0.0.16",
|
||||
|
||||
@ -18,8 +18,11 @@ import { upgradeAssetsBundle } from './upgrade-assets';
|
||||
import { isCSSUrl } from '@ali/lowcode-utils';
|
||||
import { I18nSetter } from '@ali/visualengine-utils';
|
||||
import VariableSetter from '@ali/vs-variable-setter';
|
||||
import { isObject, isArray } from 'lodash';
|
||||
import _isArray from "lodash/isArray";
|
||||
import _isObject from "lodash/isObject";
|
||||
import _get from 'lodash/get';
|
||||
import funcParser from '@ali/vu-function-parser';
|
||||
import cv from 'compare-versions';
|
||||
|
||||
|
||||
const { editor, skeleton, context, HOOKS, Trunk } = Engine;
|
||||
@ -99,7 +102,7 @@ function initDemoPanes() {
|
||||
props: {
|
||||
align: 'bottom',
|
||||
icon: 'set',
|
||||
description: '设置',
|
||||
description: '设置'
|
||||
},
|
||||
});
|
||||
skeleton.add({
|
||||
@ -109,7 +112,7 @@ function initDemoPanes() {
|
||||
props: {
|
||||
align: 'bottom',
|
||||
icon: 'help',
|
||||
description: '帮助',
|
||||
description: '帮助'
|
||||
},
|
||||
});
|
||||
|
||||
@ -332,9 +335,9 @@ function replaceFuncProp(props?: any){
|
||||
}
|
||||
if ((prop.compiled && prop.source) || prop.type === 'actionRef' || prop.type === 'js') {
|
||||
replaceProps[name] = funcParser(prop);
|
||||
} else if (isObject(prop)) {
|
||||
} else if (_isObject(prop)) {
|
||||
replaceFuncProp(prop);
|
||||
} else if (isArray(prop)) {
|
||||
} else if (_isArray(prop)) {
|
||||
prop.map((propItem) => {
|
||||
replaceFuncProp(propItem);
|
||||
});
|
||||
@ -344,7 +347,6 @@ function replaceFuncProp(props?: any){
|
||||
for (const name in replaceProps) {
|
||||
props[name] = replaceProps[name];
|
||||
}
|
||||
|
||||
return props;
|
||||
};
|
||||
|
||||
|
||||
1
packages/demo/src/vision/module.d.ts
vendored
1
packages/demo/src/vision/module.d.ts
vendored
@ -10,3 +10,4 @@ declare module '@ali/ve-i18n-manage-pane';
|
||||
declare module '@ali/ve-action-pane';
|
||||
declare module '@ali/vu-legao-design-fetch-context';
|
||||
declare module "@ali/vu-function-parser";
|
||||
declare module "compare-versions";
|
||||
|
||||
@ -466,6 +466,11 @@ export class DocumentModel {
|
||||
return this.rootNode;
|
||||
}
|
||||
|
||||
// add toData
|
||||
toData() {
|
||||
return { componentsTree: [this.project?.currentDocument?.export(TransformStage.Save)] };
|
||||
}
|
||||
|
||||
getHistory(): History {
|
||||
return this.history;
|
||||
}
|
||||
@ -473,10 +478,6 @@ export class DocumentModel {
|
||||
get root() {
|
||||
return this.rootNode;
|
||||
}
|
||||
|
||||
toData() {
|
||||
return this.export(TransformStage.Save);
|
||||
}
|
||||
}
|
||||
|
||||
export function isDocumentModel(obj: any): obj is DocumentModel {
|
||||
|
||||
@ -13,7 +13,7 @@ export default class MainArea extends Component<{ area: Area<any, Panel | Widget
|
||||
render() {
|
||||
const { area } = this.props;
|
||||
return (
|
||||
<div className={classNames('lc-main-area')}>
|
||||
<div className={classNames('lc-main-area engine-workspacepane')}>
|
||||
{area.container.items.map((item) => item.content)}
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -12,7 +12,7 @@ export default class RightArea extends Component<{ area: Area<any, Panel> }> {
|
||||
render() {
|
||||
const { area } = this.props;
|
||||
return (
|
||||
<div className={classNames('lc-right-area', {
|
||||
<div className={classNames('lc-right-area engine-tabpane', {
|
||||
'lc-area-visible': area.visible,
|
||||
})}>
|
||||
<Contents area={area} />
|
||||
|
||||
@ -8,7 +8,7 @@ export default class TopArea extends Component<{ area: Area, itemClassName?: str
|
||||
render() {
|
||||
const { area, itemClassName } = this.props;
|
||||
return (
|
||||
<div className={classNames("lc-top-area", {
|
||||
<div className={classNames("lc-top-area engine-actionpane", {
|
||||
'lc-area-visible': area.visible
|
||||
})}>
|
||||
<Contents area={area} itemClassName={itemClassName} />
|
||||
|
||||
@ -185,12 +185,12 @@ body {
|
||||
display: flex;
|
||||
margin-bottom: 2px;
|
||||
padding: 8px;
|
||||
.lc-top-area-left{}
|
||||
|
||||
.lc-top-area-center{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-right: 8px;
|
||||
justify-content: center;
|
||||
margin: 0 8px;
|
||||
}
|
||||
.lc-top-area-right{
|
||||
display: flex;
|
||||
@ -274,7 +274,7 @@ body {
|
||||
svg {
|
||||
fill: var(--color-icon-normal,rgba(31,56,88,.4));
|
||||
}
|
||||
|
||||
|
||||
&.has-tip{
|
||||
cursor: pointer;
|
||||
}
|
||||
@ -331,6 +331,7 @@ body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
z-index: 10;
|
||||
.lc-toolbar {
|
||||
height: var(--toolbar-height);
|
||||
background-color: var(--color-pane-background);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user