mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-11 16:28:18 +00:00
feat: 组件未找到文案调整 to #46352540
This commit is contained in:
parent
52272c020f
commit
366a0d8c2a
@ -18,34 +18,27 @@ export default function rendererFactory() {
|
||||
|
||||
const debug = Debug('renderer:entry');
|
||||
|
||||
const exceptionStyle = {
|
||||
width: '100%',
|
||||
height: '50px',
|
||||
lineHeight: '50px',
|
||||
textAlign: 'center',
|
||||
fontSize: '15px',
|
||||
color: '#ff0000',
|
||||
border: '2px solid #ff0000',
|
||||
borderRadius: '4px',
|
||||
};
|
||||
|
||||
class FaultComponent extends PureComponent {
|
||||
render() {
|
||||
console.error(this.props.error);
|
||||
console.error('render error', this.props);
|
||||
return createElement(Div, {
|
||||
className: 'engine-fault-component',
|
||||
style: exceptionStyle,
|
||||
style: {
|
||||
width: '100%',
|
||||
height: '50px',
|
||||
lineHeight: '50px',
|
||||
textAlign: 'center',
|
||||
fontSize: '15px',
|
||||
color: '#ff0000',
|
||||
border: '2px solid #ff0000',
|
||||
},
|
||||
}, '组件渲染异常,请查看控制台日志');
|
||||
}
|
||||
}
|
||||
|
||||
class NotFoundComponent extends PureComponent {
|
||||
render() {
|
||||
return createElement(Div, {
|
||||
className: 'engine-unknown-component',
|
||||
style: exceptionStyle,
|
||||
}, this.props.children || '组件未找到');
|
||||
return createElement(Div, this.props, this.props.children || '当前组件未找到,可能已被卸载或删除');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user