Closed yz1311 closed 2 years ago
可以通过在设计视图里,自定义占位符实现~
class YourComponent {
render() {
if (this.props.leaf.isEmpty) {
return <div>空</div>;
}
return 其他视图;
}
}
This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 2 days.
This issue was closed because it has been stalled for 10 days with no activity.
复现截图
想给StyleSetter直接设置默认值,目前碰到一些问题,用snippets的方式,直接给style赋值是可以的,但是界面里面的占位视图会消失, 查询源码得到,这里对style有做判断,如果不为空,就直接不显示占位视图,请问这样做是为什么?那我如何能给StyleSetter设置默认值,并且保留占位视图?
复现流程与链接
这里有做判断 https://github.com/alibaba/lowcode-engine/blob/main/packages/react-simulator-renderer/src/renderer-view.tsx#L205
期望结果
StyleSetter设置默认值,并且保留占位视图
环境信息