UNPKG

@ovine/core

Version:

Build flexible admin system with json.

26 lines (25 loc) 646 B
/** * 页面渲染错误处理 */ import React from 'react'; declare type Props = { type?: 'page' | 'component' | 'entry'; children: any; }; declare type State = { error?: any; hasError: boolean; }; declare class ErrorBoundary extends React.Component<Props, State> { constructor(props: any); static getDerivedStateFromError(error: any): { hasError: boolean; error: any; }; componentDidCatch(error: any, errorInfo: any): void; getSnapshotBeforeUpdate(_: any, prevState: State): null; private renderCompError; private renderPageError; render(): any; } export default ErrorBoundary;