1. dialog 设置为 container,解决无法拖动 form 到 container 的问题;

2. page 设置 style prop 解决 page 无法设置样式的问题;
3. 解决 render error 无法找到 engine 对象的 bug
This commit is contained in:
mark.ck 2020-07-22 01:03:08 +08:00
parent 8b6cb03f6f
commit 3e85c283f4
5 changed files with 15 additions and 5 deletions

View File

@ -25,6 +25,12 @@
{
"componentName": "Page",
"title": "Page",
"props": [
{
"name": "style",
"propType": "object"
}
],
"configure": {
"events": {
"supportedLifecycles": [
@ -4265,7 +4271,12 @@
"name": "style",
"propType": "object"
}
]
],
"configure": {
"component": {
"isContainer": true
}
}
},
{
"componentName": "Inner",

View File

@ -5,7 +5,7 @@
"ref":"outterView",
"autoLoading":true,
"style":{
"padding":20
"padding": "0 5px 0 5px"
}
},
"fileName":"test",

View File

@ -144,7 +144,6 @@ export class SettingsPrimaryPane extends Component<{ editor: Editor }> {
animation={false}
excessMode="dropdown"
contentClassName="lc-settings-tabs-content"
disableKeyboard={true}
extra={this.renderBreadcrumb()}
>
{tabs}

View File

@ -211,11 +211,11 @@ export default class BaseRender extends PureComponent {
// parentInfo schemaComp
// idx Index
__createVirtualDom = (schema, self, parentInfo, idx) => {
const { engine } = this.context || {};
try {
if (!schema) return null;
const { __appHelper: appHelper, __components: components = {} } =
this.props || {};
const { engine } = this.context || {};
if (isJSExpression(schema)) {
return parseExpression(schema, self);
}

View File

@ -109,7 +109,7 @@ class Renderer extends Component<{ renderer: SimulatorRenderer }> {
viewProps._leaf = leaf;
viewProps._componentName = leaf?.componentName;
// 如果是容器 && 无children && 高宽为空 增加一个占位容器,方便拖动
if (leaf.isContainer() && children == null && !viewProps.style){
if (leaf?.isContainer() && children == null && !viewProps.style){
Object.assign(viewProps, {
style:{
height:'100px',