diff --git a/.editorconfig b/.editorconfig old mode 100755 new mode 100644 diff --git a/.eslintrc.js b/.eslintrc.js old mode 100755 new mode 100644 diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index 89543e7bff7b92f6da32005aa26439fb4a1be84b..95071f8136ce07eb39c16e95c7750a5fbaa94e86 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ jsconfig.json *.log functions/mock -.temp +.temp/** # umi .umi diff --git a/.webpackrc.js b/.webpackrc.js new file mode 100644 index 0000000000000000000000000000000000000000..17f26da9eda63ed7c9b3043a7dc628537ddae7a8 --- /dev/null +++ b/.webpackrc.js @@ -0,0 +1,28 @@ +const path = require('path'); + +export default { + entry: 'src/index.js', + extraBabelPlugins: [['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }]], + env: { + development: { + extraBabelPlugins: ['dva-hmr'], + }, + }, + externals: { + '@antv/data-set': 'DataSet', + }, + alias: { + components: path.resolve(__dirname, 'src/components/'), + }, + ignoreMomentLocale: true, + theme: './src/theme.js', + html: { + template: './src/index.ejs', + }, + lessLoaderOptions: { + javascriptEnabled: true, + }, + disableDynamicImport: true, + publicPath: '/', + hash: true, +}; diff --git a/README.ru-RU.md b/README.ru-RU.md index d7eb793c6f0eb31b4dbd231169bb4f7b69c671bc..7d53f4494f1c6847a6cc3bc8c6ff8b78487ee302 100644 --- a/README.ru-RU.md +++ b/README.ru-RU.md @@ -36,7 +36,7 @@ UI-решение "из коробки" для корпоративных при - :art: **Темизация**: Возможность изменения темы с помощью конфигурации - :globe_with_meridians: **Мультиязычность**: Встроенное i18n решение - :gear: **Лучшие практики**: Надежные процессы для хорошего кода -- :1234: **Разработка по шиблону**: Простое в использовании решение для разработки +- :1234: **Разработка по шаблону**: Простое в использовании решение для разработки - :white_check_mark: **UI тесты**: Разрабатывайте безопасно с юнит и e2e тестами ## Шаблоны diff --git a/package.json b/package.json old mode 100755 new mode 100644 index 43cc1e6ab2c9caabba6423a267f21a81c179d558..2a812fee63405993c8dd2cb2e186de54da380dc9 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ant-design-pro", - "version": "2.0.0-beta.4", + "version": "2.0.0", "description": "An out-of-box UI solution for enterprise applications", "private": true, "scripts": { diff --git a/src/components/Charts/Pie/index.d.ts b/src/components/Charts/Pie/index.d.ts index 46e4600d80c8eb71cfec87bbc8f12406cb685173..66c93eeb5d856928697335530c090c68492e81a5 100644 --- a/src/components/Charts/Pie/index.d.ts +++ b/src/components/Charts/Pie/index.d.ts @@ -2,6 +2,7 @@ import * as React from 'react'; export interface IPieProps { animate?: boolean; color?: string; + colors?: string[]; height: number; hasLegend?: boolean; padding?: [number, number, number, number]; diff --git a/src/components/HeaderSearch/index.js b/src/components/HeaderSearch/index.js index f207e96eac07f2aa2904f23ff9a3a4e7e5694a15..ebc9ae701f41f576f860c3343b3d2b7862616738 100644 --- a/src/components/HeaderSearch/index.js +++ b/src/components/HeaderSearch/index.js @@ -53,7 +53,7 @@ export default class HeaderSearch extends PureComponent { const { onChange } = this.props; this.setState({ value }); if (onChange) { - onChange(); + onChange(value); } }; diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index 71b45ad26c4200a0396f6b54dc32c4f5977f5377..764e7b3995cf9eb80e0cc175cda4ef3516936194 100644 --- a/src/components/PageHeader/index.js +++ b/src/components/PageHeader/index.js @@ -94,6 +94,9 @@ export default class PageHeader extends PureComponent { // Loop data mosaic routing const extraBreadcrumbItems = pathSnippets.map((url, index) => { const currentBreadcrumb = getBreadcrumb(breadcrumbNameMap, url); + if (currentBreadcrumb.inherited) { + return null; + } const isLinkable = index !== pathSnippets.length - 1 && currentBreadcrumb.component; const name = itemRender ? itemRender(currentBreadcrumb) : currentBreadcrumb.name; return currentBreadcrumb.name && !currentBreadcrumb.hideInBreadcrumb ? ( diff --git a/src/pages/Forms/TableForm.js b/src/pages/Forms/TableForm.js index 9bfd8acf3c16a2d1d3e140f30f2c8744d2a8c289..fad77137262cda039221907d29939a7a6c93637e 100644 --- a/src/pages/Forms/TableForm.js +++ b/src/pages/Forms/TableForm.js @@ -107,10 +107,10 @@ export default class TableForm extends PureComponent { }); return; } - const { data } = this.state; - const { onChange } = this.props; delete target.isNew; this.toggleEditable(e, key); + const { data } = this.state; + const { onChange } = this.props; onChange(data); this.setState({ loading: false, @@ -126,9 +126,9 @@ export default class TableForm extends PureComponent { const target = this.getRowByKey(key, newData); if (this.cacheOriginData[key]) { Object.assign(target, this.cacheOriginData[key]); - target.editable = false; delete this.cacheOriginData[key]; } + target.editable = false; this.setState({ data: newData }); this.clickedCancel = false; }