Commit 86531fb1 authored by 涂茜's avatar 涂茜

🎨 chore(release): Publish

- @wisdom-components/devicetree@1.3.9 - @wisdom-components/quotaselect@1.7.3
parent 9f4ef61f
Pipeline #26370 failed with stages
in 15 seconds
# Change Log
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.9](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.8...@wisdom-components/devicetree@1.3.9) (2021-04-21)
### Bug Fixes
* bug ([9f4ef61](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/9f4ef61f7016acbc1992e37ba1ffeda66517022d))
## [1.3.8](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/devicetree@1.3.5...@wisdom-components/devicetree@1.3.8) (2021-04-20)
......
{
"name": "@wisdom-components/devicetree",
"version": "1.3.8",
"version": "1.3.9",
"description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>",
"homepage": "",
......
......@@ -92,15 +92,17 @@ const Demo = () => {
};
return (
<HistoryInfo
title={'指标曲线'}
columns={columns}
dataSource={data}
chartOptions={{ series }}
tableProps={{ bordered: true }}
onChange={onChangeParams}
defaultChecked={'roundClock'}
/>
<div style={{ height: '1200px' }}>
<HistoryInfo
title={'指标曲线'}
columns={columns}
dataSource={data}
chartOptions={{ series }}
tableProps={{ bordered: true }}
onChange={onChangeParams}
// defaultChecked={'fourHour'}
/>
</div>
);
};
......
import React, { useContext, useState, useReducer, useEffect } from 'react';
import React, { useContext, useState, useReducer, useEffect, useRef } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Highcharts from 'highcharts/highstock';
......@@ -115,10 +115,16 @@ const HistoryInfo = (props) => {
const [state, dispatch] = useReducer(reducer, initialState);
const container = useRef(null);
useEffect(() => {
onChange(state);
}, [state]);
useEffect(() => {
dispatch({ type: UPDATE_TIME.UPDATE_TIME, payload: props.defaultChecked });
}, [props.defaultChecked]);
// 时间设置切换(自定义/同期对比)
const onTimeSetChange = (e) => {
setTimeValue(e.target.value);
......@@ -390,6 +396,15 @@ const HistoryInfo = (props) => {
};
}
if (container.current) {
Highcharts.setOptions({
chart: {
width: container.current.offsetWidth,
height: container.current.offsetHeight - 10,
},
});
}
return options;
};
......@@ -462,13 +477,14 @@ const HistoryInfo = (props) => {
{renderOptions(item)}
{!dataSource.length && <Empty />}
{!!dataSource.length && (
<div>
<div style={{ flex: 1 }} ref={container}>
{item.key === 'curve' && (
<HighchartsReact
immutable={true}
highcharts={Highcharts}
constructorType={'stockChart'}
options={handleChartOptions()}
allowChartUpdate={true}
/>
)}
{item.key === 'table' && (
......
......@@ -2,7 +2,17 @@
@history-info-prefix-cls: ~'@{ant-prefix}-history-info';
.@{history-info-prefix-cls} {
height: 100%;
.ant-tabs,
.ant-tabs-content {
height: 100%;
}
&-content {
display: flex;
flex-direction: column;
height: 100%;
padding: 10px 0 0 0;
}
......
# Change Log
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.7.3](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.7.2...@wisdom-components/quotaselect@1.7.3) (2021-04-21)
### Bug Fixes
* bug ([9f4ef61](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/commits/9f4ef61f7016acbc1992e37ba1ffeda66517022d))
## [1.7.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/quotaselect@1.6.0...@wisdom-components/quotaselect@1.7.2) (2021-04-20)
......
{
"name": "@wisdom-components/quotaselect",
"version": "1.7.2",
"version": "1.7.3",
"description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>",
"homepage": "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment