feat: 组件未找到文案调整 to #46352540

This commit is contained in:
lingmin.ylm 2023-05-24 20:58:30 +08:00
parent 52272c020f
commit 366a0d8c2a

View File

@ -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 || '当前组件未找到,可能已被卸载或删除');
}
}