Commit fdc189cf authored by XieZhiXiong's avatar XieZhiXiong
parents e3b44856 e6e33cf2
......@@ -23,6 +23,10 @@ const config: any = {
},
routes,
extraBabelPlugins: [
['import', {
libraryName: 'bizcharts', libraryDirectory: 'lib/components',
customName: require('path').resolve(__dirname, './utils/customBitchartsName.js')
}, 'bizcharts'],
['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }, 'antd'],
['import', { libraryName: 'god', libraryDirectory: 'es', style: true }, 'god'],
['import', { libraryName: '@umijs/hooks', libraryDirectory: 'lib', camel2DashComponentName: false }, '@umijs/hooks'],// 将下划线转化关闭
......
module.exports = function customName(name) {
if (name === 'interval') {
return 'bizcharts/lib/geometry/Interval'
}
return `bizcharts/lib/components/${name}`
};
\ No newline at end of file
......@@ -11,7 +11,7 @@
"start": "yarn api && yarn scripts:build && umi dev",
"build": "yarn api && yarn scripts:build && yarn build:clean",
"build:yxc": "yarn api && yarn scripts:build-yxc && umi build",
"build:analyze": "ANALYZE=1 umi build",
"build:analyze": "NODE_OPTIONS=--max_old_space_size=4096 ANALYZE=1 umi build",
"build:dev": "pm2 start scripts/devServer.js",
"build:clean": "NODE_OPTIONS=--max_old_space_size=4096 umi build",
"postinstall": "umi generate tmp",
......
import React from 'react';
import { Axis, Chart, Geom, Tooltip } from 'bizcharts';
import { IAxis } from 'bizcharts/lib/components/Axis';
// import Chart from 'bizcharts/lib/components/Chart';
import Geom from 'bizcharts/lib/geometry';
// import Tooltip from 'bizcharts/lib/components/Tooltip';
import { Chart, Tooltip, Axis } from 'bizcharts'
import autoHeight from '../autoHeight';
import styles from './index.less';
import { ShapeString, ShapeAttrCallback, IChartProps } from 'bizcharts/lib/interface';
import { ShapeString, ShapeAttrCallback } from 'bizcharts/lib/interface';
export interface MiniAreaProps {
color?: string;
......
......@@ -5,8 +5,7 @@ import {
Interaction,
Coordinate,
Legend,
Tooltip,
registerShape,
Tooltip
} from 'bizcharts';
import React, { Component } from 'react';
import { Row, Col } from 'antd';
......@@ -15,7 +14,6 @@ import { RowProps, ColProps } from 'antd/lib/grid';
import DataSet from '@antv/data-set';
import G2 from '@antv/g2/lib/chart/chart';
import Debounce from 'lodash.debounce';
import { Divider } from 'antd';
import classNames from 'classnames';
import autoHeight from '../autoHeight';
import styles from './index.less';
......
......@@ -21,7 +21,7 @@ const AvatarDropdown = () => {
const menuHeaderDropdown = (
<Menu className={styles.menu} selectedKeys={[]}>
<Menu.Item key="center">
{/* <Menu.Item key="center">
<UserOutlined />
个人中心
</Menu.Item>
......@@ -29,7 +29,7 @@ const AvatarDropdown = () => {
<SettingOutlined />
个人设置
</Menu.Item>
<Menu.Divider />
<Menu.Divider /> */}
<Menu.Item onClick={logout} key="logout">
<LogoutOutlined />
退出登录
......
......@@ -9,21 +9,17 @@ import StatusColors from '../../components/StatusColors'
import { FieldTimeOutlined } from '@ant-design/icons'
import {
Chart,
Interval,
Axis,
Tooltip,
Coordinate,
Legend,
View,
Annotation,
} from 'bizcharts';
import Interval from 'bizcharts/lib/geometry/Interval'
import DataSet from "@antv/data-set";
// 圆形环状金额显示
const CircleChart = props => {
const { sumPrice = 100, alreadyPay = 10 } = props
const { DataView } = DataSet;
const dv = new DataView();
const userData = [
{ type: '总金额', value: (sumPrice - alreadyPay) || 100 },
......
......@@ -10,12 +10,9 @@ import { FieldTimeOutlined } from '@ant-design/icons'
import {
Chart,
Interval,
Axis,
Tooltip,
Coordinate,
Legend,
View,
Annotation,
View
} from 'bizcharts';
import DataSet from "@antv/data-set";
......
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