Browse Source

Add favicon and update g2 default theme

pull/26/head
afc163 9 years ago
parent
commit
a957bffb4f
  1. 2
      public/index.html
  2. 18
      src/g2.js
  3. 4
      src/index.js

2
public/index.html

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ant Design Pro</title>
<link rel="icon" href="https://gw.alipayobjects.com/zos/rmsportal/IOtlElCiWVIOZqgDslYd.png" type="image/x-icon">
<link rel="stylesheet" href="index.css" />
</head>
<body>

18
src/g2.js

@ -0,0 +1,18 @@
// 全局 G2 设置
import G2 from 'g2';
G2.track(false);
const config = {
...G2.Theme,
defaultColor: '#1089ff',
tooltip: {
background: {
radius: 4,
fill: '#000',
fillOpacity: 0.75,
},
},
};
G2.Global.setTheme(config);

4
src/index.js

@ -1,12 +1,10 @@
import dva from 'dva';
import G2 from 'g2';
import 'moment/locale/zh-cn';
import models from './models';
import './g2';
// import { browserHistory } from 'dva/router';
import './index.less';
G2.track(false);
// 1. Initialize
const app = dva({
// history: browserHistory,

Loading…
Cancel
Save