Commit 37758b8a authored by nikogu's avatar nikogu

Remove unnecessary dependency of components from scaffold

parent 541128ec
...@@ -2,10 +2,13 @@ import React, { PureComponent } from 'react'; ...@@ -2,10 +2,13 @@ import React, { PureComponent } from 'react';
import { MiniArea } from '../Charts'; import { MiniArea } from '../Charts';
import NumberInfo from '../NumberInfo'; import NumberInfo from '../NumberInfo';
import { fixedZero } from '../../utils/utils';
import styles from './index.less'; import styles from './index.less';
function fixedZero(val) {
return val * 1 < 10 ? `0${val}` : val;
}
function getActiveData() { function getActiveData() {
const activeData = []; const activeData = [];
for (let i = 0; i < 24; i += 1) { for (let i = 0; i < 24; i += 1) {
......
@import "~antd/lib/style/themes/default.less";
@import "../../utils/utils.less";
.activeChart { .activeChart {
position: relative; position: relative;
} }
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../../utils/utils.less";
.textOverflow() {
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
white-space: nowrap;
}
.chartCard { .chartCard {
position: relative; position: relative;
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../../utils/utils.less";
.field { .field {
white-space: nowrap; white-space: nowrap;
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../../utils/utils.less";
.miniProgress { .miniProgress {
padding: 5px 0; padding: 5px 0;
......
...@@ -45,14 +45,16 @@ class Pie extends Component { ...@@ -45,14 +45,16 @@ class Pie extends Component {
if (!this.state.legendBlock) { if (!this.state.legendBlock) {
this.setState({ this.setState({
legendBlock: true, legendBlock: true,
}, () => {
this.renderChart();
}); });
this.renderChart();
} }
} else if (this.state.legendBlock) { } else if (this.state.legendBlock) {
this.setState({ this.setState({
legendBlock: false, legendBlock: false,
}, () => {
this.renderChart();
}); });
this.renderChart();
} }
} }
...@@ -94,7 +96,7 @@ class Pie extends Component { ...@@ -94,7 +96,7 @@ class Pie extends Component {
animate = true, animate = true,
colors, colors,
lineWidth = 0, lineWidth = 0,
} = this.props; } = this.props;
const defaultColors = colors; const defaultColors = colors;
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../../utils/utils.less";
.pie { .pie {
position: relative; position: relative;
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../../utils/utils.less";
.radar { .radar {
.legend { .legend {
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../../utils/utils.less";
.waterWave { .waterWave {
display: inline-block; display: inline-block;
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../utils/utils.less"; @import "~antd/lib/style/mixins/clearfix.less";
.exception { .exception {
display: flex; display: flex;
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../utils/utils.less";
.textOverflow() {
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
white-space: nowrap;
}
.numberInfo { .numberInfo {
.suffix { .suffix {
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../utils/utils.less";
.standardFormRow { .standardFormRow {
border-bottom: 1px dashed @border-color-split; border-bottom: 1px dashed @border-color-split;
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../utils/utils.less";
.standardTable { .standardTable {
:global { :global {
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../utils/utils.less";
.tagSelect { .tagSelect {
user-select: none; user-select: none;
......
@import "~antd/lib/style/themes/default.less"; @import "~antd/lib/style/themes/default.less";
@import "../../utils/utils.less";
.trendItem { .trendItem {
display: inline-block; display: inline-block;
......
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