mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 17:08:14 +00:00
Merge branch 'fix/blockAndLowCodeComponentEditor' into 'release/0.9.0'
fix: 修复低代码组件设计器、区块设计器根节点为 Page 的问题,修复 topArea 样式 See merge request !867191
This commit is contained in:
commit
108a676ce3
@ -517,6 +517,10 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
|
||||
}
|
||||
}
|
||||
|
||||
toData() {
|
||||
return this.export();
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出 schema
|
||||
*/
|
||||
|
||||
@ -39,10 +39,13 @@ const pages = Object.assign(project, {
|
||||
} else {
|
||||
componentsTree = pages[0].componentsTree;
|
||||
if (componentsTree[0]) {
|
||||
componentsTree[0].componentName = 'Page';
|
||||
componentsTree[0].componentName = componentsTree[0].componentName || 'Page';
|
||||
// FIXME
|
||||
componentsTree[0].lifeCycles = {};
|
||||
componentsTree[0].methods = {};
|
||||
if (componentsTree[0].componentName === 'Page' ||
|
||||
componentsTree[0].componentName === 'Component') {
|
||||
componentsTree[0].lifeCycles = {};
|
||||
componentsTree[0].methods = {};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -143,6 +143,11 @@ body {
|
||||
margin-bottom: 2px;
|
||||
padding: 8px 12px 8px 16px;
|
||||
|
||||
.lc-top-area-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.lc-top-area-center{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
||||
@ -69,7 +69,7 @@ export function isSchema(schema, ignoreArr) {
|
||||
|
||||
export function isFileSchema(schema) {
|
||||
if (isEmpty(schema)) return false;
|
||||
return ['Page', 'Block', 'Component', 'Addon', 'Temp'].includes(schema.componentName);
|
||||
return ['Page', 'Block', 'Component', 'Addon', 'Temp', 'Div'].includes(schema.componentName);
|
||||
}
|
||||
|
||||
// 判断当前页面是否被嵌入到同域的页面中
|
||||
|
||||
@ -61,7 +61,7 @@ export default class BlockEngine extends BaseEngine {
|
||||
render() {
|
||||
const { __schema } = this.props;
|
||||
|
||||
if (!isSchema(__schema, true) || __schema.componentName !== 'Block') {
|
||||
if (!isSchema(__schema, true) || (__schema.componentName !== 'Block' && __schema.componentName !== 'Div')) {
|
||||
return '区块schema结构异常!';
|
||||
}
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ const ENGINE_COMPS = {
|
||||
BlockEngine,
|
||||
AddonEngine,
|
||||
TempEngine,
|
||||
DivEngine: BlockEngine,
|
||||
};
|
||||
|
||||
class FaultComponent extends PureComponent {
|
||||
|
||||
2
packages/react-renderer/src/utils/index.js
vendored
2
packages/react-renderer/src/utils/index.js
vendored
@ -69,7 +69,7 @@ export function isSchema(schema, ignoreArr) {
|
||||
|
||||
export function isFileSchema(schema) {
|
||||
if (isEmpty(schema)) return false;
|
||||
return ['Page', 'Block', 'Component', 'Addon', 'Temp'].includes(schema.componentName);
|
||||
return ['Page', 'Block', 'Component', 'Addon', 'Temp', 'Div'].includes(schema.componentName);
|
||||
}
|
||||
|
||||
// 判断当前页面是否被嵌入到同域的页面中
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user