UNPKG

@linkdesign/screen

Version:

屏组件库,但使用场景又不局限于屏。主要用于BI、大盘和屏

60 lines (59 loc) 1.23 kB
import React, { PureComponent } from 'react'; import { EChartOption, ECharts } from 'echarts'; import { ITitle, UniversalStyle } from '../title'; interface IProps { /** * 类名 */ className?: string; /** * 图表标题 */ title?: React.ReactNode; /** * 通用样式 */ universalStyle?: UniversalStyle; /** * 标题配置 */ titleOptions?: ITitle; /** * 初始化回调 * * @param chart ECharts */ onInit?: (chart: ECharts) => void; /** * echarts options配置 */ options: EChartOption & { /** * 空态占位图 url */ placeholder?: string; }; /** * 显示加载动画效果 */ loading?: boolean; } /** * echarts图表 * * @class EChart * @extends {PureComponent<IProps>} */ declare class EChart extends PureComponent<IProps> { private containerRef; private titleRef; private chartRef; private chart; constructor(props: IProps); componentDidMount(): void; componentDidUpdate(prevProps: IProps): void; componentWillUnmount(): void; handlerResize: () => void; render(): React.ReactNode; } export default EChart;