陈帅 7 лет назад
Родитель
Сommit
5e21fefd91

+ 0 - 0
.editorconfig


+ 0 - 0
.eslintrc.js


+ 1 - 1
.gitignore

@@ -28,7 +28,7 @@ jsconfig.json
 *.log
 
 functions/mock
-.temp
+.temp/**
 
 # umi
 .umi

+ 28 - 0
.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,
+};

+ 1 - 1
README.ru-RU.md

@@ -36,7 +36,7 @@ UI-решение "из коробки" для корпоративных при
 - :art: **Темизация**: Возможность изменения темы с помощью конфигурации
 - :globe_with_meridians: **Мультиязычность**: Встроенное i18n решение
 - :gear: **Лучшие практики**: Надежные процессы для хорошего кода
-- :1234: **Разработка по шиблону**: Простое в использовании решение для разработки
+- :1234: **Разработка по шаблону**: Простое в использовании решение для разработки
 - :white_check_mark: **UI тесты**: Разрабатывайте безопасно с юнит и e2e тестами
 
 ## Шаблоны

+ 1 - 1
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": {

+ 1 - 0
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];

+ 1 - 1
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);
     }
   };
 

+ 3 - 0
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 ? (

+ 3 - 3
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;
   }