diff --git a/.eslintrc.js b/.eslintrc.js index d43710d6456d1785649990178507eab240fc279d..a8d6638874f6e7687714b5b061125bbf3bc00677 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -11,6 +11,18 @@ module.exports = { devDependencies: ['**/tests/**.js', '/mock/**/**.js', '**/**.test.js', '**/**._mock.js'], }, ], + 'import/no-named-as-default': 0, + }, + settings: { + ...fabric.default.settings, + // support import modules from TypeScript files in JavaScript files + 'import/resolver': { + node: { extensions: ['.js', '.ts', '.tsx'] }, + alias: { + map: [['@', './src'], ['utils', './src/utils'], ['config', './config']], + extensions: ['.ts', '.js', '.jsx', '.json'], + }, + }, }, globals: { ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true, diff --git a/README.fr-FR.md b/README.fr-FR.md deleted file mode 100644 index fb05736b0217eeba687e29dba852b6dccfbbd380..0000000000000000000000000000000000000000 --- a/README.fr-FR.md +++ /dev/null @@ -1,122 +0,0 @@ -[English](./README.md) | [简体中文](./README.zh-CN.md) | [Русский](./README.ru-RU.md) | [Türkçe](./README.tr-TR.md) | [日本語](./README.ja-JP.md) | Français - -

Ant Design Pro

- -
- -Une solution UI prête à l'emploi pour des applications d'entreprise en tant que modèle React. - -[![Construit avec Umi](https://img.shields.io/badge/build%20with-umi-028fe4.svg?style=flat-square)](http://umijs.org/) [![Status de la construction](https://dev.azure.com/ant-design/ant-design-pro/_apis/build/status/ant-design.ant-design-pro?branchName=master)](https://dev.azure.com/ant-design/ant-design-pro/_build/latest?definitionId=1?branchName=master) [![Dépendences](https://img.shields.io/david/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro) [![Dépendences de développement](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev) [![Gitter](https://img.shields.io/gitter/room/ant-design/pro-english.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEyMzUiIGhlaWdodD0iNjUwIiB2aWV3Qm94PSIwIDAgNzQxMCAzOTAwIj4NCjxyZWN0IHdpZHRoPSI3NDEwIiBoZWlnaHQ9IjM5MDAiIGZpbGw9IiNiMjIyMzQiLz4NCjxwYXRoIGQ9Ik0wLDQ1MEg3NDEwbTAsNjAwSDBtMCw2MDBINzQxMG0wLDYwMEgwbTAsNjAwSDc0MTBtMCw2MDBIMCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjMwMCIvPg0KPHJlY3Qgd2lkdGg9IjI5NjQiIGhlaWdodD0iMjEwMCIgZmlsbD0iIzNjM2I2ZSIvPg0KPGcgZmlsbD0iI2ZmZiI%2BDQo8ZyBpZD0iczE4Ij4NCjxnIGlkPSJzOSI%2BDQo8ZyBpZD0iczUiPg0KPGcgaWQ9InM0Ij4NCjxwYXRoIGlkPSJzIiBkPSJNMjQ3LDkwIDMxNy41MzQyMzAsMzA3LjA4MjAzOSAxMzIuODczMjE4LDE3Mi45MTc5NjFIMzYxLjEyNjc4MkwxNzYuNDY1NzcwLDMwNy4wODIwMzl6Ii8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB5PSI0MjAiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHk9Ijg0MCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTI2MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTY4MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjczQiIHg9IjI0NyIgeT0iMjEwIi8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzOSIgeD0iNDk0Ii8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzMTgiIHg9Ijk4OCIvPg0KPHVzZSB4bGluazpocmVmPSIjczkiIHg9IjE5NzYiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3M1IiB4PSIyNDcwIi8%2BDQo8L2c%2BDQo8L3N2Zz4%3D)](https://gitter.im/ant-design/pro-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Rejoignez la discussion dans https://gitter.im/ant-design/ant-design-pro](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAzMCAyMCI%2BDQo8ZGVmcz4NCjxwYXRoIGlkPSJzIiBkPSJNMCwtMSAwLjU4Nzc4NSwwLjgwOTAxNyAtMC45NTEwNTcsLTAuMzA5MDE3SDAuOTUxMDU3TC0wLjU4Nzc4NSwwLjgwOTAxN3oiIGZpbGw9IiNmZmRlMDAiLz4NCjwvZGVmcz4NCjxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2RlMjkxMCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNSw1KSBzY2FsZSgzKSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsMikgcm90YXRlKDIzLjAzNjI0MykiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLDQpIHJvdGF0ZSg0NS44Njk4OTgpIi8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiw3KSByb3RhdGUoNjkuOTQ1Mzk2KSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsOSkgcm90YXRlKDIwLjY1OTgwOCkiLz4NCjwvc3ZnPg%3D%3D)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Netlify Status](https://api.netlify.com/api/v1/badges/ee4b4cc9-f8d7-4542-929f-a025c5927663/deploy-status)](https://app.netlify.com/sites/angry-lumiere-4b8ba4/deploys) ![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png) - -
- -- Aperçu: http://preview.pro.ant.design -- Page d'accueil: http://pro.ant.design -- Documentation: http://pro.ant.design/docs/getting-started -- ChangeLog: http://pro.ant.design/docs/changelog -- FAQ: http://pro.ant.design/docs/faq -- Site mirroir en Chine: http://ant-design-pro.gitee.io - -## 2.0 Sorti maintenant! 🎉🎉🎉 - -[Annoncement de Ant Design Pro 2.0.0](https://medium.com/ant-design/beautiful-and-powerful-ant-design-pro-2-0-release-51358da5af95) - -## Recrutement pour la traduction :loudspeaker: - -Nous avons besoin de votre aide: https://github.com/ant-design/ant-design-pro/issues/120 - -## Fonctionnalités - -- :gem: **Design soigné**: Suit [la spécification Ant Design](http://ant.design/) -- :triangular_ruler: **Modèles communs**: Modèles typiques d'application d'entreprise -- :rocket: **Développement dernier cri**: Infrastructure de développement de React/umi/dva/antd la plus récente -- :iphone: **Design adapté**: Conçu pour des tailles d'écran variables -- :art: **Thématisation**: Thème personnalisable avec configuration simple -- :globe_with_meridians: **International**: Solution i18n intégrée -- :gear: **Meilleures pratiques**: Flux de travail solide pour rendre votre code sain -- :1234: **Développement simulé**: Solution de développement simulée facile à utiliser -- :white_check_mark: **Tests UI**: Volez en toute sécurité avec les tests unitaires et e2e - -## Modèles - -``` -- Tableau de bord - - Analytique - - Moniteur - - Espace de travail -- Formulaire - - Formulaire de base - - Formulaire par étape - - Formulaire avancé -- Liste - - Tableau standard - - Liste standard - - Liste de cartes - - Liste de recherche (Projet/Applications/Article) -- Profil - - Profil simple - - Profil avancé -- Compte - - Centre du compte - - Paramètres du compte -- Résultat - - Succès - - Échec -- Exception - - 403 - - 404 - - 500 -- Utilisateur - - Connexion - - S'inscrire - - Résultat de l'inscription -``` - -## Utilisation - -### Utiliser bash - -```bash -$ yarn create umi # or npm create umi - -# Choose ant-design-pro: - Select the boilerplate type (Use arrow keys) -❯ ant-design-pro - Create project with an layout-only ant-design-pro boilerplate, use together with umi block. - app - Create project with a simple boilerplate, support typescript. - block - Create a umi block. - library - Create a library with umi. - plugin - Create a umi plugin. - -$ npm install -$ npm start # visit http://localhost:8000 -``` - -### Utilisation de Gitpod - -Ouvrez le projet avec Gitpod (environnement de développement gratuit pour GitHub) et commencez à coder immédiatement. - -[![Ouvrir dans Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ant-design/ant-design-pro) - -Plus d'instructions dans la [documentation](http://pro.ant.design/docs/getting-started). - -## Support des navigateurs - -Navigateurs modernes et IE11. - -| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | [Opera](http://godban.github.io/browsers-support-badges/)
Opera | -| --- | --- | --- | --- | --- | -| IE11, Edge | deux dernières versions | deux dernières versions | deux dernières versions | deux dernières versions | - -## Contribution - -Toute forme de contribution est la bienvenue, voici quelques exemples de façons dont vous pouvez contribuer à ce projet: - -- Utiliser Ant Design Pro dans votre travail quotidien. -- Soumettre des [issues](http://github.com/ant-design/ant-design-pro/issues) pour reporter les bugs ou poser des questions. -- Proposer des [pull requests](http://github.com/ant-design/ant-design-pro/pulls) pour améliorer notre code. - -
- - - -
diff --git a/README.ja-JP.md b/README.ja-JP.md deleted file mode 100644 index 8de6863299ac74df0dba34b9e90eddd093843a21..0000000000000000000000000000000000000000 --- a/README.ja-JP.md +++ /dev/null @@ -1,124 +0,0 @@ -[English](./README.md) | [简体中文](./README.zh-CN.md) | [Русский](./README.ru-RU.md) | [Türkçe](./README.tr-TR.md) | 日本語 | [Français](./README.fr-FR.md) - -

Ant Design Pro

- -
- -独創的な業務システムの UI を解決するための React ボイラープレート。 - -[![Build With Umi](https://img.shields.io/badge/build%20with-umi-028fe4.svg?style=flat-square)](http://umijs.org/) [![Build Status](https://dev.azure.com/ant-design/ant-design-pro/_apis/build/status/ant-design.ant-design-pro?branchName=master)](https://dev.azure.com/ant-design/ant-design-pro/_build/latest?definitionId=1?branchName=master) [![Dependencies](https://img.shields.io/david/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro) [![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev) [![Gitter](https://img.shields.io/gitter/room/ant-design/pro-english.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEyMzUiIGhlaWdodD0iNjUwIiB2aWV3Qm94PSIwIDAgNzQxMCAzOTAwIj4NCjxyZWN0IHdpZHRoPSI3NDEwIiBoZWlnaHQ9IjM5MDAiIGZpbGw9IiNiMjIyMzQiLz4NCjxwYXRoIGQ9Ik0wLDQ1MEg3NDEwbTAsNjAwSDBtMCw2MDBINzQxMG0wLDYwMEgwbTAsNjAwSDc0MTBtMCw2MDBIMCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjMwMCIvPg0KPHJlY3Qgd2lkdGg9IjI5NjQiIGhlaWdodD0iMjEwMCIgZmlsbD0iIzNjM2I2ZSIvPg0KPGcgZmlsbD0iI2ZmZiI%2BDQo8ZyBpZD0iczE4Ij4NCjxnIGlkPSJzOSI%2BDQo8ZyBpZD0iczUiPg0KPGcgaWQ9InM0Ij4NCjxwYXRoIGlkPSJzIiBkPSJNMjQ3LDkwIDMxNy41MzQyMzAsMzA3LjA4MjAzOSAxMzIuODczMjE4LDE3Mi45MTc5NjFIMzYxLjEyNjc4MkwxNzYuNDY1NzcwLDMwNy4wODIwMzl6Ii8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB5PSI0MjAiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHk9Ijg0MCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTI2MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTY4MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjczQiIHg9IjI0NyIgeT0iMjEwIi8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzOSIgeD0iNDk0Ii8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzMTgiIHg9Ijk4OCIvPg0KPHVzZSB4bGluazpocmVmPSIjczkiIHg9IjE5NzYiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3M1IiB4PSIyNDcwIi8%2BDQo8L2c%2BDQo8L3N2Zz4%3D)](https://gitter.im/ant-design/pro-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Join the chat at https://gitter.im/ant-design/ant-design-pro](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAzMCAyMCI%2BDQo8ZGVmcz4NCjxwYXRoIGlkPSJzIiBkPSJNMCwtMSAwLjU4Nzc4NSwwLjgwOTAxNyAtMC45NTEwNTcsLTAuMzA5MDE3SDAuOTUxMDU3TC0wLjU4Nzc4NSwwLjgwOTAxN3oiIGZpbGw9IiNmZmRlMDAiLz4NCjwvZGVmcz4NCjxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2RlMjkxMCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNSw1KSBzY2FsZSgzKSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsMikgcm90YXRlKDIzLjAzNjI0MykiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLDQpIHJvdGF0ZSg0NS44Njk4OTgpIi8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiw3KSByb3RhdGUoNjkuOTQ1Mzk2KSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsOSkgcm90YXRlKDIwLjY1OTgwOCkiLz4NCjwvc3ZnPg%3D%3D)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Netlify Status](https://api.netlify.com/api/v1/badges/ee4b4cc9-f8d7-4542-929f-a025c5927663/deploy-status)](https://app.netlify.com/sites/angry-lumiere-4b8ba4/deploys) ![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png) - -
- -- プレビュー: http://preview.pro.ant.design -- ホームページ: http://pro.ant.design -- ドキュメント: http://pro.ant.design/docs/getting-started -- 変更ログ: http://pro.ant.design/docs/changelog -- FAQ: http://pro.ant.design/docs/faq -- 中国のミラーサイト: http://ant-design-pro.gitee.io - -## 2.0 がリリースされました 🎉🎉🎉 - -[Announcing Ant Design Pro 2.0.0](https://medium.com/ant-design/beautiful-and-powerful-ant-design-pro-2-0-release-51358da5af95) - -## 翻訳の募集 :loudspeaker: - -私たちはあなたの助けを必要としています。: https://github.com/ant-design/ant-design-pro/issues/120 - -## 特徴 - -- :gem: **きちんとしたデザイン**: [Ant Design specification](http://ant.design/) に従ってくださ い。 -- :triangular_ruler: **共通のテンプレート**: 業務システム用のテンプレート -- :rocket: **現状のアート開発**: `React/umi/dva/antd` の最新開発スタック -- :iphone: **レスポンシブ**: さまざまな画面サイズ用の設計 -- :art: **テーマ**: シンプルな設定でカスタマイズ可能なテーマ -- :globe_with_meridians: **国際化**: 国際化の解決策を内蔵 -- :gear: **ベストプラクティス**: コードを美しくするための正しいワークフロー -- :1234: **モック開発**: 使いやすいモック開発 -- :white_check_mark: **UI テスト**: ユニットテストと e2e テスト - -## テンプレート - -``` -- ダッシュボード - - アナリティクス - - モニター -  - ワークスペース -- 形 -  - 基本フォーム -  - ステップフォーム -  - 高度なフォーム - - リスト -  - スタンダードテーブル -  - スタンダードリスト -  - カードリスト -  - 検索リスト(プロジェクト/アプリケーション/記事) - - プロフィール -  - 簡単なプロフィール -  - 高度なプロファイル - - アカウント -  - アカウントセンター -  - アカウント設定 - - 結果 -  - 成功 -  - 失敗 - - 例外 -  - 403 -  - 404 -  - 500 - - ユーザー -  - ログイン -  - 登録 -  - 登録結果 -``` - -## 使用法 - -### bash を使う方法 - -```bash -$ yarn create umi # or npm create umi - -# Choose ant-design-pro: - Select the boilerplate type (Use arrow keys) -❯ ant-design-pro - Create project with an layout-only ant-design-pro boilerplate, use together with umi block. - app - Create project with a simple boilerplate, support typescript. - block - Create a umi block. - library - Create a library with umi. - plugin - Create a umi plugin. - -$ npm install -$ npm start # http://localhost:8000 を開く -``` - -### Gitpod を使う方法 - -Gitpod(GitHub 用の無料オンライン開発環境)でプロジェクトを開き、すぐにコーディングを開始できます。 - -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ant-design/ant-design-pro) - -その他の指示は [ドキュメント](http://pro.ant.design/docs/getting-started) を確認してください。 - -## サポートするブラウザー - -モダンなブラウザと IE11。 - -| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | [Opera](http://godban.github.io/browsers-support-badges/)
Opera | -| --- | --- | --- | --- | --- | -| IE11, Edge | 最新版から 2 バージョン | 最新版から 2 バージョン | 最新版から 2 バージョン | 最新版から 2 バージョン | - -## 貢献する - -どんな種類の貢献でも大歓迎です。あなたがこのプロジェクトに貢献できる方法のいくつかの例はここにあります。: - -- 毎日の仕事に Ant Design Pro を使用すること。 -- 報告すること。 [issues](http://github.com/ant-design/ant-design-pro/issues) にバグ報告や質問をしてください。 -- 更新すること。 改善を、[pull requests](http://github.com/ant-design/ant-design-pro/pulls) で送ってください。 - -[![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev) - -
- - - -
diff --git a/README.ru-RU.md b/README.ru-RU.md deleted file mode 100644 index 1395ccbf0e85d2ead319a78c4f141d780d7e73a8..0000000000000000000000000000000000000000 --- a/README.ru-RU.md +++ /dev/null @@ -1,110 +0,0 @@ -[English](./README.md) | [简体中文](./README.zh-CN.md) | Русский | [Türkçe](./README.tr-TR.md) | [日本語](./README.ja-JP.md) | [Français](./README.fr-FR.md) - -

Ant Design Pro

- -
- -UI-решение "из коробки" для корпоративных приложений как React boilerplate - -[![Build With Umi](https://img.shields.io/badge/build%20with-umi-028fe4.svg?style=flat-square)](http://umijs.org/) [![Build Status](https://dev.azure.com/ant-design/ant-design-pro/_apis/build/status/ant-design.ant-design-pro?branchName=master)](https://dev.azure.com/ant-design/ant-design-pro/_build/latest?definitionId=1?branchName=master) [![Dependencies](https://img.shields.io/david/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro) [![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev) [![Gitter](https://img.shields.io/gitter/room/ant-design/pro-english.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjEyMzUiIGhlaWdodD0iNjUwIiB2aWV3Qm94PSIwIDAgNzQxMCAzOTAwIj4NCjxyZWN0IHdpZHRoPSI3NDEwIiBoZWlnaHQ9IjM5MDAiIGZpbGw9IiNiMjIyMzQiLz4NCjxwYXRoIGQ9Ik0wLDQ1MEg3NDEwbTAsNjAwSDBtMCw2MDBINzQxMG0wLDYwMEgwbTAsNjAwSDc0MTBtMCw2MDBIMCIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjMwMCIvPg0KPHJlY3Qgd2lkdGg9IjI5NjQiIGhlaWdodD0iMjEwMCIgZmlsbD0iIzNjM2I2ZSIvPg0KPGcgZmlsbD0iI2ZmZiI%2BDQo8ZyBpZD0iczE4Ij4NCjxnIGlkPSJzOSI%2BDQo8ZyBpZD0iczUiPg0KPGcgaWQ9InM0Ij4NCjxwYXRoIGlkPSJzIiBkPSJNMjQ3LDkwIDMxNy41MzQyMzAsMzA3LjA4MjAzOSAxMzIuODczMjE4LDE3Mi45MTc5NjFIMzYxLjEyNjc4MkwxNzYuNDY1NzcwLDMwNy4wODIwMzl6Ii8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB5PSI0MjAiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHk9Ijg0MCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTI2MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjcyIgeT0iMTY4MCIvPg0KPC9nPg0KPHVzZSB4bGluazpocmVmPSIjczQiIHg9IjI0NyIgeT0iMjEwIi8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzOSIgeD0iNDk0Ii8%2BDQo8L2c%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzMTgiIHg9Ijk4OCIvPg0KPHVzZSB4bGluazpocmVmPSIjczkiIHg9IjE5NzYiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3M1IiB4PSIyNDcwIi8%2BDQo8L2c%2BDQo8L3N2Zz4%3D)](https://gitter.im/ant-design/pro-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Join the chat at https://gitter.im/ant-design/ant-design-pro](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square&logoWidth=20&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiIHZpZXdCb3g9IjAgMCAzMCAyMCI%2BDQo8ZGVmcz4NCjxwYXRoIGlkPSJzIiBkPSJNMCwtMSAwLjU4Nzc4NSwwLjgwOTAxNyAtMC45NTEwNTcsLTAuMzA5MDE3SDAuOTUxMDU3TC0wLjU4Nzc4NSwwLjgwOTAxN3oiIGZpbGw9IiNmZmRlMDAiLz4NCjwvZGVmcz4NCjxyZWN0IHdpZHRoPSIzMCIgaGVpZ2h0PSIyMCIgZmlsbD0iI2RlMjkxMCIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNSw1KSBzY2FsZSgzKSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsMikgcm90YXRlKDIzLjAzNjI0MykiLz4NCjx1c2UgeGxpbms6aHJlZj0iI3MiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyLDQpIHJvdGF0ZSg0NS44Njk4OTgpIi8%2BDQo8dXNlIHhsaW5rOmhyZWY9IiNzIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiw3KSByb3RhdGUoNjkuOTQ1Mzk2KSIvPg0KPHVzZSB4bGluazpocmVmPSIjcyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAsOSkgcm90YXRlKDIwLjY1OTgwOCkiLz4NCjwvc3ZnPg%3D%3D)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Netlify Status](https://api.netlify.com/api/v1/badges/ee4b4cc9-f8d7-4542-929f-a025c5927663/deploy-status)](https://app.netlify.com/sites/angry-lumiere-4b8ba4/deploys) ![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png) - -
- -- Демо: http://preview.pro.ant.design -- Домашняя страница: http://pro.ant.design -- Документация: http://pro.ant.design/docs/getting-started -- История изменений: http://pro.ant.design/docs/changelog -- FAQ: http://pro.ant.design/docs/faq -- Китайское зеркало сайта: http://ant-design-pro.gitee.io - -## Поиск переводчиков :loudspeaker: - -Нам нужна ваша помощь: https://github.com/ant-design/ant-design-pro/issues/120 - -## Возможности - -- :gem: **Аккуратный дизайн**: Посмотрите [спецификацию Ant Design](http://ant.design/) -- :triangular_ruler: **Общие шаблоны**: Стандартные шаблоны для корпоративных приложений -- :rocket: **Разработка, как искусство**: Новейший стек технологий React/umi/dva/antd -- :iphone: **Отзывчивая верстка**: Создан для экранов разных размеров -- :art: **Темизация**: Возможность изменения темы с помощью конфигурации -- :globe_with_meridians: **Мультиязычность**: Встроенное i18n решение -- :gear: **Лучшие практики**: Надежные процессы для хорошего кода -- :1234: **Разработка по шаблону**: Простое в использовании решение для разработки -- :white_check_mark: **UI тесты**: Разрабатывайте безопасно с юнит и e2e тестами - -## Шаблоны - -``` -- Dashboard - - Analytic - - Monitor - - Workspace -- Form - - Basic Form - - Step Form - - Advanced From -- List - - Standard Table - - Standard List - - Card List - - Search List (Project/Applications/Article) -- Profile - - Simple Profile - - Advanced Profile -- Account - - Account Center - - Account Settings -- Result - - Success - - Failed -- Exception - - 403 - - 404 - - 500 -- User - - Login - - Register - - Register Result -``` - -## Использование - -```bash -$ yarn create umi # or npm create umi - -# Choose ant-design-pro: - Select the boilerplate type (Use arrow keys) -❯ ant-design-pro - Create project with an layout-only ant-design-pro boilerplate, use together with umi block. - app - Create project with a simple boilerplate, support typescript. - block - Create a umi block. - library - Create a library with umi. - plugin - Create a umi plugin. - -$ npm install -$ npm start # visit http://localhost:8000 -``` - -Больше информации в [документации](http://pro.ant.design/docs/getting-started). - -## Совместимость - -Современные браузеры и IE11. - -| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | [Opera](http://godban.github.io/browsers-support-badges/)
Opera | -| --- | --- | --- | --- | --- | -| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | - -## Распространение - -Любые варианты распространения приветствуются! Вот несколько примеров того, как вы можете помочь распространению проекта: - -- Использовать Ant Design Pro в ежедневной работе. -- Создавать [задачи](http://github.com/ant-design/ant-design-pro/issues) заводить баги или отвечать на вопросы. -- Делать [pull-реквесты](http://github.com/ant-design/ant-design-pro/pulls) для совершенствования нашего кода. - -
- - - -
diff --git a/README.tr-TR.md b/README.tr-TR.md deleted file mode 100644 index 939be9f865cbca8b3e90947b5092829ba225144c..0000000000000000000000000000000000000000 --- a/README.tr-TR.md +++ /dev/null @@ -1,114 +0,0 @@ -[English](./README.md) | [简体中文](./README.zh-CN.md) | [Русский](./README.ru-RU.md) | Türkçe | [日本語](./README.ja-JP.md) | [Français](./README.fr-FR.md) - -

Ant Design Pro

- -
- -React ile kurumsal uygulamalar için taslak olarak geliştirilmiş kullanıma hazır bir UI çözümü. - -[![CircleCI Status](https://circleci.com/gh/ant-design/ant-design-pro.svg?style=svg)](https://circleci.com/gh/ant-design/ant-design-pro/) [![Build status](https://ci.appveyor.com/api/projects/status/67fxu2by3ibvqtat/branch/master?svg=true)](https://ci.appveyor.com/project/afc163/ant-design-pro/branch/master) [![Dependencies](https://img.shields.io/david/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro) [![DevDependencies](https://img.shields.io/david/dev/ant-design/ant-design-pro.svg)](https://david-dm.org/ant-design/ant-design-pro?type=dev) [![Gitter](https://img.shields.io/gitter/room/ant-design/pro-english.svg)](https://gitter.im/ant-design/pro-english?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)(🇺🇸) [![Gitter](https://img.shields.io/gitter/room/ant-design/ant-design-pro.svg?style=flat-square)](https://gitter.im/ant-design/ant-design-pro?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)(🇨🇳) [![Netlify Status](https://api.netlify.com/api/v1/badges/ee4b4cc9-f8d7-4542-929f-a025c5927663/deploy-status)](https://app.netlify.com/sites/angry-lumiere-4b8ba4/deploys) ![](https://user-images.githubusercontent.com/8186664/44953195-581e3d80-aec4-11e8-8dcb-54b9db38ec11.png) - -
- -- Önizleme: http://preview.pro.ant.design -- Anasayfa: http://pro.ant.design -- Dokümantasyon: http://pro.ant.design/docs/getting-started -- ChangeLog: http://pro.ant.design/docs/changelog -- SSS: http://pro.ant.design/docs/faq -- Çinde barındırılan site: http://ant-design-pro.gitee.io - -## 2.0 Versiyonu Şimdi Yayında! 🎉🎉🎉 - -[Announcing Ant Design Pro 2.0.0](https://medium.com/ant-design/beautiful-and-powerful-ant-design-pro-2-0-release-51358da5af95) - -## Çeviri Desteği :loudspeaker: - -Çeviriler için yardımınıza ihtiyacımız var: https://github.com/ant-design/ant-design-pro/issues/120 - -## Özellikler - -- :gem: **Zarif Tasarım**: Buradan [Ant Design özellikleri](http://ant.design/) -- :triangular_ruler: **Ortak Şablonlar**: Kurumsal uygulamalar için şablonlar -- :rocket: **Sanatsal gelişim durumu**: Newest development stack of React/umi/dva/antd -- :iphone: **Responsive**: Değişken ekran boyutları için tasarlanmıştır -- :art: **Tema Kullanımı**: Basit ayarlar ile özelleştirilebilir tema -- :globe_with_meridians: **Uluslararası**: Built-in i18n solution -- :gear: **Best Practices**: İyi kod için sağlam iş akışı -- :1234: **Mock Geliştirme**: Model(Mock) geliştirmeler için kolay çözüm -- :white_check_mark: **UI Testi**: Unit ve e2e testleri ile güvenli sürdürülebilirlik - -## Şablonlar - -``` -- Dashboard - - Analitik - - Monitör - - Çalışma alanı -- Form - - Basit Form - - Step Form - - Gelişmiş Form -- List - - Standard Tablo - - Standard Liste - - Kart Liste - - Arama Listesi (Project/Applications/Article) -- Profil - - Basit Profil - - Gelişmiş Profil -- Hesap - - Hesap Yönetimi - - Hesap Ayarları -- Sonuç - - Başarılı - - Hatalı -- Hatalar - - 403 - - 404 - - 500 -- Kullanıcı - - Giriş - - Kayıt - - Kayıt Sonucu -``` - -## Kullanım - -```bash -$ yarn create umi # or npm create umi - -# Choose ant-design-pro: - Select the boilerplate type (Use arrow keys) -❯ ant-design-pro - Create project with an layout-only ant-design-pro boilerplate, use together with umi block. - app - Create project with a simple boilerplate, support typescript. - block - Create a umi block. - library - Create a library with umi. - plugin - Create a umi plugin. - -$ npm install -$ npm start # visit http://localhost:8000 -``` - -Daha fazla talimat için [dokümantasyon](http://pro.ant.design/docs/getting-started) sayfasına göz atın. - -## Tarayıcı desteği - -Modern internet tarayıcıları ve IE11. - -| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | [Opera](http://godban.github.io/browsers-support-badges/)
Opera | -| --- | --- | --- | --- | --- | -| IE11, Edge | son 2 versiyon | son 2 versiyon | son 2 versiyon | son 2 versiyon | - -## Destek - -Her türlü desteğinize açığız, bu projeye nasıl katkıda bulunabileceğinize dair bazı örnekler: - -- Günlük işinizde Ant Design Pro kullanın. -- Hataları bildirmek veya soru sormak için [issues](http://github.com/ant-design/ant-design-pro/issues) gönderin. -- kodumuzu geliştirmek için [pull requests](http://github.com/ant-design/ant-design-pro/pulls) gönderin. - -
- - - -
diff --git a/config/config.ts b/config/config.ts index d5c90e6aeed832dafaa8c22c4394fc10b3873c42..cd2052c8ece4730c4abecea94e26c5868fb17833 100644 --- a/config/config.ts +++ b/config/config.ts @@ -1,10 +1,13 @@ import { IConfig, IPlugin } from 'umi-types'; import defaultSettings from './defaultSettings'; // https://umijs.org/config/ +import theme from './theme.config'; import os from 'os'; import slash from 'slash2'; import webpackPlugin from './plugin.config'; -const { pwa, primaryColor } = defaultSettings; // preview.pro.ant.design only do not use in your production ; +const path = require('path'); + +const { pwa } = defaultSettings; // preview.pro.ant.design only do not use in your production ; // preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。 const { ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION, TEST, NODE_ENV } = process.env; @@ -320,6 +323,12 @@ export default { }, ], }, + { + name: 'parameter', + icon: 'highlight', + path: '/parameter', + component: './system/parameter', + }, { path: '/', redirect: '/dashboard/analysis', @@ -332,9 +341,7 @@ export default { ], // Theme for antd // https://ant.design/docs/react/customize-theme-cn - theme: { - 'primary-color': primaryColor, - }, + theme, // proxy: { // '/server/api/': { // target: 'https://preview.pro.ant.design/', @@ -354,7 +361,7 @@ export default { resourcePath: string; }, localIdentName: string, - localName: string + localName: string, ) => { if ( context.resourcePath.includes('node_modules') || @@ -383,4 +390,14 @@ export default { }, uglifyJSOptions, chainWebpack: webpackPlugin, + // 配置 webpack 的 resolve.alias 属性 默认src=>@ + alias: { + src: path.join(__dirname, '../src'), + components: path.join(__dirname, '../src', 'components'), + utils: path.join(__dirname, '../src', 'utils'), + assets: path.join(__dirname, '../src', 'assets'), + themes: path.join(__dirname, '../src', 'themes'), + config: path.join(__dirname, '../src', '../config'), + public: path.join(__dirname, '../public'), + }, } as IConfig; diff --git a/config/defaultSettings.ts b/config/defaultSettings.ts index 4b2c53c6cc1aae1625d3457e3df95e65bccba10a..0f6d6fcb5b7e4d32e8a7dc876c0752f01e1062a7 100644 --- a/config/defaultSettings.ts +++ b/config/defaultSettings.ts @@ -2,13 +2,19 @@ import { MenuTheme } from 'antd/es/menu'; export type ContentWidth = 'Fluid' | 'Fixed'; +export interface localeProps { + key: string; + icon: string; + label: string; +} + export interface DefaultSettings { /** * theme for nav menu */ navTheme: MenuTheme; /** - * primary color of ant design + * primary color of ant design 默认#1890FF */ primaryColor: string; /** @@ -40,11 +46,15 @@ export interface DefaultSettings { // Usage: https://github.com/ant-design/ant-design-pro/pull/3517 iconfontUrl: string; colorWeak: boolean; + /** + * 只有一种语言的时候,系统固话成一个语言,无导航栏选择框 + */ + locales: localeProps[]; } export default { navTheme: 'dark', - primaryColor: '#1890FF', + primaryColor: '#43cec4', layout: 'sidemenu', contentWidth: 'Fluid', fixedHeader: false, @@ -54,7 +64,13 @@ export default { menu: { locale: true, }, - title: 'Ant Design Pro', + title: 'KIM3.0平台业务架构', pwa: false, iconfontUrl: '', + locales: [ + { key: 'zh-CN', label: '简体中文', icon: '🇨🇳' }, + // { key: 'zh-TW', label: '繁体中文', icon: '🇭🇰' }, + { key: 'en-US', label: 'English', icon: '🇬🇧' }, + // { key: 'pt-BR', label: 'Português', icon: '🇧🇷' }, + ], } as DefaultSettings; diff --git a/package.json b/package.json index d8ab47408c3a997094ebc797b30d0b36297198bf..02f18ae625d279743680cd88e74ee86d68a55dcf 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "husky": { "hooks": { - "pre-commit": "npm run lint-staged" + } }, "lint-staged": { @@ -52,7 +52,7 @@ "not ie <= 10" ], "dependencies": { - "@ant-design/pro-layout": "^4.5.0", + "@ant-design/pro-layout": "^4.5.5", "@antv/data-set": "^0.10.2", "@types/lodash.debounce": "^4.0.6", "@types/react-router": "^5.0.2", @@ -129,8 +129,9 @@ "stylelint": "^10.1.0", "webpack-theme-color-replacer": "^1.1.5", "mockjs": "^1.0.1-beta3", - "@types/mockjs":"^1.0.2" - }, + "@types/mockjs":"^1.0.2", + "eslint-import-resolver-alias": "^1.1.2" + }, "optionalDependencies": { "puppeteer": "^1.17.0" }, diff --git a/src/components/GlobalHeader/RightContent.tsx b/src/components/GlobalHeader/RightContent.tsx index 6fc42e819630e8976c747c122d56214474b7da0b..9b0d933940b87ce3e4fde9f16544d2eae0883b8c 100644 --- a/src/components/GlobalHeader/RightContent.tsx +++ b/src/components/GlobalHeader/RightContent.tsx @@ -8,6 +8,7 @@ import { connect } from 'dva'; import { formatMessage } from 'umi-plugin-react/locale'; import styles from './index.less'; import NoticeIconView from './NoticeIconView'; +import DefaultSettings from 'config/defaultSettings'; export type SiderTheme = 'light' | 'dark'; export interface GlobalHeaderRightProps extends ConnectProps { @@ -64,7 +65,7 @@ const GlobalHeaderRight: React.SFC = props => { - + ); }; diff --git a/src/components/SelectLang/index.tsx b/src/components/SelectLang/index.tsx index c45354dbe8a05720231d268cca84d5be5906dff3..b7abd6378233e09bed868c707884b252036b0745 100644 --- a/src/components/SelectLang/index.tsx +++ b/src/components/SelectLang/index.tsx @@ -3,48 +3,38 @@ import { formatMessage, getLocale, setLocale } from 'umi-plugin-react/locale'; import { ClickParam } from 'antd/es/menu'; import React from 'react'; import classNames from 'classnames'; +import DefaultSettings, { localeProps } from 'config/defaultSettings'; import HeaderDropdown from '../HeaderDropdown'; import styles from './index.less'; interface SelectLangProps { className?: string; + locales: localeProps[]; } + const SelectLang: React.FC = props => { - const { className } = props; + const { className, locales } = props; const selectedLang = getLocale(); const changeLang = ({ key }: ClickParam): void => setLocale(key, false); - const locales = ['zh-CN', 'zh-TW', 'en-US', 'pt-BR']; - const languageLabels = { - 'zh-CN': '简体中文', - 'zh-TW': '繁体中文', - 'en-US': 'English', - 'pt-BR': 'Português', - }; - const languageIcons = { - 'zh-CN': '🇨🇳', - 'zh-TW': '🇭🇰', - 'en-US': '🇬🇧', - 'pt-BR': '🇧🇷', - }; const langMenu = ( - {locales.map(locale => ( - - - {languageIcons[locale]} + {locales.map(({ key, icon, label }) => ( + + + {icon} {' '} - {languageLabels[locale]} + {label} ))} ); - return ( + return locales.length >= 1 ? ( - ); + ) : null; }; export default SelectLang; diff --git a/src/global.less b/src/global.less index b4237f7e6208bb12c2ab1cf22c47a950d031f9b3..01dc7eee7114df2ab2f1007f61ecd6e1436ebca9 100644 --- a/src/global.less +++ b/src/global.less @@ -45,3 +45,19 @@ ol { } } } + +// 覆盖antd design pro样式 +:global { + .kim-layout { + .ant-pro-sider-menu-logo { + padding-left: 8px; + } + .ant-pro-sider-menu-logo h1 { + font-weight: 500; + font-size: 16px; + } + .ant-pro-global-header { + // background: #43cec4; + } + } +} diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index c5e634f2e17e94252b05394eb9a91a94a65abd18..49786f4686bb4da71db430ecea79351dc3a0c36c 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -40,6 +40,7 @@ const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] => return Authorized.check(item.authority, localItem, null) as MenuDataItem; }); +// footer渲染 const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => { if (!isAntDesignPro()) { return defaultDom; @@ -94,9 +95,11 @@ const BasicLayout: React.FC = props => { }); return ( - <> +
( {defaultDom} @@ -111,7 +114,7 @@ const BasicLayout: React.FC = props => { }, ...routers, ]} - footerRender={footerRender} + footerRender={false} // 不显示footer menuDataRender={menuDataRender} formatMessage={formatMessage} rightContentRender={rightProps => } @@ -129,7 +132,7 @@ const BasicLayout: React.FC = props => { }) } /> - +
); }; diff --git a/src/layouts/UserLayout.tsx b/src/layouts/UserLayout.tsx index 6f916fbc4f704158f1765ff208d9fe0744f16341..f774a337a9609afe98ba01df28f33f55d3e2644e 100644 --- a/src/layouts/UserLayout.tsx +++ b/src/layouts/UserLayout.tsx @@ -6,6 +6,7 @@ import React from 'react'; import SelectLang from '@/components/SelectLang'; import { connect } from 'dva'; import { formatMessage } from 'umi-plugin-react/locale'; +import DefaultSettings from 'config/defaultSettings'; import logo from '../assets/logo.svg'; import styles from './UserLayout.less'; @@ -39,7 +40,7 @@ const UserLayout: React.SFC = props => { >
- +
diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 6cbf7d57479353ff6c87485e561b19a93b204df9..1037a6c34e48d10226144699edff924e0b56a295 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -3,6 +3,9 @@ const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|( const isUrl = (path: string): boolean => reg.test(path); +/** + * 是否为antd design pro + */ const isAntDesignPro = (): boolean => { if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') { return true;