mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-15 18:58:11 +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
|
* 导出 schema
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -39,12 +39,15 @@ const pages = Object.assign(project, {
|
|||||||
} else {
|
} else {
|
||||||
componentsTree = pages[0].componentsTree;
|
componentsTree = pages[0].componentsTree;
|
||||||
if (componentsTree[0]) {
|
if (componentsTree[0]) {
|
||||||
componentsTree[0].componentName = 'Page';
|
componentsTree[0].componentName = componentsTree[0].componentName || 'Page';
|
||||||
// FIXME
|
// FIXME
|
||||||
|
if (componentsTree[0].componentName === 'Page' ||
|
||||||
|
componentsTree[0].componentName === 'Component') {
|
||||||
componentsTree[0].lifeCycles = {};
|
componentsTree[0].lifeCycles = {};
|
||||||
componentsTree[0].methods = {};
|
componentsTree[0].methods = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
project.load({
|
project.load({
|
||||||
version: '1.0.0',
|
version: '1.0.0',
|
||||||
|
|||||||
@ -143,6 +143,11 @@ body {
|
|||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
padding: 8px 12px 8px 16px;
|
padding: 8px 12px 8px 16px;
|
||||||
|
|
||||||
|
.lc-top-area-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.lc-top-area-center{
|
.lc-top-area-center{
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -69,7 +69,7 @@ export function isSchema(schema, ignoreArr) {
|
|||||||
|
|
||||||
export function isFileSchema(schema) {
|
export function isFileSchema(schema) {
|
||||||
if (isEmpty(schema)) return false;
|
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() {
|
render() {
|
||||||
const { __schema } = this.props;
|
const { __schema } = this.props;
|
||||||
|
|
||||||
if (!isSchema(__schema, true) || __schema.componentName !== 'Block') {
|
if (!isSchema(__schema, true) || (__schema.componentName !== 'Block' && __schema.componentName !== 'Div')) {
|
||||||
return '区块schema结构异常!';
|
return '区块schema结构异常!';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,7 @@ const ENGINE_COMPS = {
|
|||||||
BlockEngine,
|
BlockEngine,
|
||||||
AddonEngine,
|
AddonEngine,
|
||||||
TempEngine,
|
TempEngine,
|
||||||
|
DivEngine: BlockEngine,
|
||||||
};
|
};
|
||||||
|
|
||||||
class FaultComponent extends PureComponent {
|
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) {
|
export function isFileSchema(schema) {
|
||||||
if (isEmpty(schema)) return false;
|
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