cut moment locale/lodash size & revert d06ee20

This commit is contained in:
Baorong Li
2018-04-13 18:19:22 +08:00
parent d06ee20c47
commit a6b3dba92e
6 changed files with 19 additions and 10 deletions
+1
View File
@@ -21,4 +21,5 @@ export default {
urlLoaderExcludes: [
/\.svg$/,
],
ignoreMomentLocale: true,
}
+5 -1
View File
@@ -14,8 +14,11 @@
"echarts-for-react": "^2.0.8",
"echarts-gl": "^1.1.0",
"echarts-liquidfill": "^2.0.0",
"highcharts-exporting": "^0.1.7",
"highcharts-more": "^0.1.7",
"jsonp": "^0.2.1",
"lodash": "^4.17.5",
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0",
"nprogress": "^0.2.0",
"path-to-regexp": "^2.2.0",
"prop-types": "^15.6.1",
@@ -52,6 +55,7 @@
"lint"
],
"scripts": {
"analyze": "cross-env ANALYZE=1 BABELRC=1 umi build",
"start": "cross-env BABELRC=1 COMPILE_ON_DEMAND=none BROWSER=none HOST=0.0.0.0 umi dev",
"lint": "eslint --fix --ext .js src",
"build": "cross-env BABELRC=1 umi build",
+4 -3
View File
@@ -2,7 +2,8 @@ import React from 'react'
import PropTypes from 'prop-types'
import { Table } from 'antd'
import { request } from 'utils'
import lodash from 'lodash'
import cloneDeep from 'lodash.clonedeep'
import isEqual from 'lodash.isequal'
import './DataTable.less'
class DataTable extends React.Component {
@@ -32,11 +33,11 @@ class DataTable extends React.Component {
}
componentWillReceiveProps (nextProps) {
const staticNextProps = lodash.cloneDeep(nextProps)
const staticNextProps = cloneDeep(nextProps)
delete staticNextProps.columns
const { columns, ...otherProps } = this.props
if (!lodash.isEqual(staticNextProps, otherProps)) {
if (!isEqual(staticNextProps, otherProps)) {
this.props = nextProps
this.fetch()
}
@@ -1,8 +1,11 @@
import React from 'react'
import ReactHighcharts from 'react-highcharts'
import HighchartsExporting from 'highcharts-exporting'
import HighchartsMore from 'highcharts-more'
require ('highcharts-more')(ReactHighcharts.Highcharts)
require ('highcharts-exporting')(ReactHighcharts.Highcharts)
HighchartsMore(ReactHighcharts.Highcharts)
HighchartsExporting(ReactHighcharts.Highcharts)
const config = {
chart: {
+2 -2
View File
@@ -1,5 +1,5 @@
/* global window */
import lodash from 'lodash'
import cloneDeep from 'lodash.clonedeep'
export classnames from 'classnames'
export config from './config'
@@ -80,7 +80,7 @@ export function queryArray (array, key, keyAlias = 'key') {
* @return {Array}
*/
export function arrayToTree (array, id = 'id', pid = 'pid', children = 'children') {
let data = lodash.cloneDeep(array)
let data = cloneDeep(array)
let result = []
let hash = {}
data.forEach((item, index) => {
+2 -2
View File
@@ -2,7 +2,7 @@
import axios from 'axios'
import qs from 'qs'
import jsonp from 'jsonp'
import lodash from 'lodash'
import cloneDeep from 'lodash.clonedeep'
import pathToRegexp from 'path-to-regexp'
import { message } from 'antd'
import { YQL, CORS } from './config'
@@ -15,7 +15,7 @@ const fetch = (options) => {
url,
} = options
const cloneData = lodash.cloneDeep(data)
const cloneData = cloneDeep(data)
try {
let domin = ''