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 # 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) ## [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", "name": "@wisdom-components/devicetree",
"version": "1.3.8", "version": "1.3.9",
"description": "> TODO: description", "description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>", "author": "tuqian <webtuqian@163.com>",
"homepage": "", "homepage": "",
......
...@@ -92,15 +92,17 @@ const Demo = () => { ...@@ -92,15 +92,17 @@ const Demo = () => {
}; };
return ( return (
<HistoryInfo <div style={{ height: '1200px' }}>
title={'指标曲线'} <HistoryInfo
columns={columns} title={'指标曲线'}
dataSource={data} columns={columns}
chartOptions={{ series }} dataSource={data}
tableProps={{ bordered: true }} chartOptions={{ series }}
onChange={onChangeParams} tableProps={{ bordered: true }}
defaultChecked={'roundClock'} 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 PropTypes from 'prop-types';
import classNames from 'classnames'; import classNames from 'classnames';
import Highcharts from 'highcharts/highstock'; import Highcharts from 'highcharts/highstock';
...@@ -115,10 +115,16 @@ const HistoryInfo = (props) => { ...@@ -115,10 +115,16 @@ const HistoryInfo = (props) => {
const [state, dispatch] = useReducer(reducer, initialState); const [state, dispatch] = useReducer(reducer, initialState);
const container = useRef(null);
useEffect(() => { useEffect(() => {
onChange(state); onChange(state);
}, [state]); }, [state]);
useEffect(() => {
dispatch({ type: UPDATE_TIME.UPDATE_TIME, payload: props.defaultChecked });
}, [props.defaultChecked]);
// 时间设置切换(自定义/同期对比) // 时间设置切换(自定义/同期对比)
const onTimeSetChange = (e) => { const onTimeSetChange = (e) => {
setTimeValue(e.target.value); setTimeValue(e.target.value);
...@@ -390,6 +396,15 @@ const HistoryInfo = (props) => { ...@@ -390,6 +396,15 @@ const HistoryInfo = (props) => {
}; };
} }
if (container.current) {
Highcharts.setOptions({
chart: {
width: container.current.offsetWidth,
height: container.current.offsetHeight - 10,
},
});
}
return options; return options;
}; };
...@@ -462,13 +477,14 @@ const HistoryInfo = (props) => { ...@@ -462,13 +477,14 @@ const HistoryInfo = (props) => {
{renderOptions(item)} {renderOptions(item)}
{!dataSource.length && <Empty />} {!dataSource.length && <Empty />}
{!!dataSource.length && ( {!!dataSource.length && (
<div> <div style={{ flex: 1 }} ref={container}>
{item.key === 'curve' && ( {item.key === 'curve' && (
<HighchartsReact <HighchartsReact
immutable={true} immutable={true}
highcharts={Highcharts} highcharts={Highcharts}
constructorType={'stockChart'} constructorType={'stockChart'}
options={handleChartOptions()} options={handleChartOptions()}
allowChartUpdate={true}
/> />
)} )}
{item.key === 'table' && ( {item.key === 'table' && (
......
...@@ -2,7 +2,17 @@ ...@@ -2,7 +2,17 @@
@history-info-prefix-cls: ~'@{ant-prefix}-history-info'; @history-info-prefix-cls: ~'@{ant-prefix}-history-info';
.@{history-info-prefix-cls} { .@{history-info-prefix-cls} {
height: 100%;
.ant-tabs,
.ant-tabs-content {
height: 100%;
}
&-content { &-content {
display: flex;
flex-direction: column;
height: 100%;
padding: 10px 0 0 0; padding: 10px 0 0 0;
} }
......
# Change Log # 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) ## [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", "name": "@wisdom-components/quotaselect",
"version": "1.7.2", "version": "1.7.3",
"description": "> TODO: description", "description": "> TODO: description",
"author": "tuqian <webtuqian@163.com>", "author": "tuqian <webtuqian@163.com>",
"homepage": "", "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