Compare commits

..
815 Commits
Author SHA1 Message Date
zuiidea 5abad21082 ✨ Optimization Split Chunks, Antd Icon, CI. 2020-08-20 14:16:32 +08:00
Baorong Li 1ae41c7ae5 Merge pull request #1060 from mlboy/patch-1
Update README.md
2020-06-03 14:46:44 +08:00
mlboy e41671dbf9 Update README.md
调整antd版本
2020-05-13 07:42:01 +08:00
Baorong Li eaeb9092e4 bump antd-admin@5.3.0 2020-05-10 21:05:23 +08:00
Baorong Li 2f3ca0a006 Merge branch 'develop' 2020-05-10 21:04:40 +08:00
Baorong Li 1b65351be4 upgrade umi@3 fin. 2020-03-24 15:17:57 +08:00
Baorong Li 0422f6d51e upgrade umi@3 partly 2020-03-24 12:12:20 +08:00
Baorong Li 8d050d4040 fix pathToRegexp not work 2020-03-20 11:59:04 +08:00
zuiidea 82b3a4b384 ⚡️ Exclude node_modules by babel-loader. 2020-03-19 22:26:55 +08:00
Baorong Li d2f391a881 upgrade umi@3 partly 2020-03-19 17:06:31 +08:00
Baorong Li 9e778487d9 upgrade umi@3 partly 2020-03-19 12:50:12 +08:00
Baorong Li 7938d71f2f upgrade umi@3 partly 2020-03-19 00:05:44 +08:00
Baorong Li 422a6fed30 upgrade umi@3 partly 2020-03-18 16:17:25 +08:00
Baorong Li c6ea0454b3 upgrade umi@3 partly 2020-03-15 08:24:05 +08:00
Baorong Li 467767a6c5 upgrade umi@3 partly 2020-03-05 23:22:02 +08:00
Baorong Li cf795c512a bump antd-admin@5.2.0 2020-03-05 20:21:22 +08:00
Baorong Li 18b499030d upgrade antd@4.0.0 2020-02-29 22:47:45 +08:00
zuiidea d800d6f3ce Merge branch 'master' into develop 2020-01-08 09:31:45 +08:00
zuiidea 185f706107 💚 Fixing now config. 2020-01-07 17:17:57 +08:00
zuiidea 5a4661cdad Merge branch 'develop' of https://github.com/zuiidea/antd-admin into develop 2020-01-07 16:02:51 +08:00
zuiidea 7abdd94a0e 🚀 Optimize deployment configuration. 2020-01-07 16:02:33 +08:00
Baorong Li 22f0684ab0 chore: docs normal 2020-01-07 15:58:48 +08:00
Baorong Li 80b2c63693 Merge pull request #1040 from vagusX/feat/migrate-antd-v4
feat: migrate to antd v4
2019-12-02 22:07:08 -06:00
vagusX 4b2a553bda feat: add antd v4 dependencies 2019-12-03 10:19:54 +08:00
vagusX ad30e73b10 feat: migrate to antd v4 2019-12-03 09:58:49 +08:00
Baorong Li 15b62e302d bump antd-admin@5.1.3 2019-10-22 10:38:52 +08:00
Baorong Li 9d5ec20f20 Merge branch 'develop' 2019-10-22 10:37:43 +08:00
Baorong Li c878425fd0 upgrade antd@3.24.x 2019-10-22 10:30:04 +08:00
Baorong Li 90e80dda64 Merge pull request #1022 from rioarray/feature/inline-conditional-rendering
inline conditional rendering in some components
2019-10-17 16:32:30 +08:00
rioarray 1db5bfeab5 inline conditional rendering in some components 2019-10-17 14:45:30 +07:00
zuiidea b2b3fcd4a3 ✨ Support disable i18n. 2019-10-09 20:20:11 +08:00
Baorong Li 9cf97375c7 fix 404 when path = '/' 2019-08-01 23:12:42 +08:00
Baorong Li 7839b6affb Merge pull request #1007 from Louis-7/master
[fix] add notification popup to #primaryLayout instead of #layoutHeader
2019-07-25 08:26:35 -05:00
Louis 597064a07d [fix] add notification popup to #primaryLayout instead of #layoutHeader 2019-07-25 11:47:32 +08:00
Baorong Li 0ea57d14c9 fix #980 cannot read property 'map' of null 2019-07-07 23:01:20 +08:00
Baorong Li afd736d615 bump antd-admin@5.1.2 2019-07-07 22:48:34 +08:00
Baorong Li ce9b8c376f Merge pull request #996 from tuantvk/master
🐛 fix bug sub menu Charts when collapsed
2019-07-07 08:03:31 -05:00
tuantv 79776e6752 🐛 fix bug sub menu Charts when collapsed 2019-07-07 11:56:52 +07:00
zuiidea a2432022a1 ✨ Updating manifest logo and adding portugal flag image. 2019-07-02 17:47:16 +08:00
zuiidea ea5ee96bdc 🎨 Improving format of the code. 2019-07-06 11:02:56 +08:00
zuiidea fe954092a4 🐛 Fixing dva history.listen multiple triggers. 2019-07-06 10:50:50 +08:00
zuiidea 5e148fec92 Merge branch 'develop' of https://github.com/zuiidea/antd-admin into develop 2019-07-06 09:43:30 +08:00
Baorong Li 5daa2a9548 add moment locale setting 2019-07-05 22:26:29 +08:00
Baorong Li f1913f7b18 add pt_BR locale-provider in layout 2019-07-05 22:16:54 +08:00
zuiidea 65a453553e ✨ Updating mock avatar image. 2019-07-05 19:52:37 +08:00
Baorong Li 29da8f24da Merge pull request #989 from tuantvk/master
🐛 fix remove and update user error handleRefresh
2019-06-29 09:57:46 -05:00
tuantv 3443ad9968 🐛 fix edit and update user error handleRefresh 2019-06-29 21:19:57 +07:00
Baorong Li 838dc93eff bump antd-admin@5.1.1 2019-06-29 10:56:03 +08:00
Baorong Li 07ef68ec1f Merge remote-tracking branch 'origin/develop' 2019-06-29 10:54:10 +08:00
Baorong Li 3cb7f86086 fix login jump to /enundefined 2019-06-29 10:49:11 +08:00
Baorong Li fc9565c157 add a flag to detect refresh saving query times in model/app.js 2019-06-24 20:50:09 +08:00
Baorong Li 557f6022f3 bump antd-admin@5.1.0 2019-06-24 16:05:28 +08:00
Baorong Li d0a56169e3 revert dispatch query in model/app.js 2019-06-24 15:40:44 +08:00
Baorong Li f7d6e2b4ed Merge pull request #984 from lovemegowin/master
refactor user,menu,permission storage strategy
2019-06-24 15:26:06 +08:00
lovemegowin df82ee42fd fix #985 , close #985 2019-06-24 15:20:25 +08:00
lovemegowin a29d761483 refactor user, menu, permission storage strategy then make full loader unnecessary 2019-06-21 15:26:06 +08:00
lovemegowin 713a86b9d6 add null point assert 2019-06-21 15:23:19 +08:00
lovemegowin d6250f16b0 fullScreen loader is not always necessary refactor default spinning to false 2019-06-21 14:12:15 +08:00
Baorong Li 1c5d5c3788 upgrade umi@2.8.x 2019-06-20 16:31:00 +08:00
Baorong Li 699e9d9ff1 fix warning inlineCollapsed not control Menu under Sider 2019-06-04 15:47:35 +08:00
Baorong Li fad0cb931a use options instead of option in react-perfect-scrollbar 2019-06-04 15:34:45 +08:00
Baorong Li 5d7ff55869 upgrade dependency 2019-06-04 15:09:51 +08:00
Baorong Li 642ccb5b82 Merge pull request #975 from deepred5/master
fix: 关闭弹窗时有动画效果
2019-05-27 23:59:48 -05:00
深红 51a7ce0827 update: 关闭弹窗时销毁子元素,保证initialValue更新并且关闭弹窗时有动画效果 2019-05-28 10:27:27 +08:00
Baorong Li 157a54b11d Merge pull request #969 from ccyanxyz/patch-1
fix markdown code block in docs/layout.md
2019-05-04 18:32:34 -05:00
cyan be083d81fc fix markdown code block 2019-05-05 00:38:43 +08:00
zuiidea f6c869ad47 Merge pull request #965 from zuiidea/develop
✏️  Fixing typos, exlude => exclude.
2019-04-18 10:10:14 +08:00
zuiidea bef5b26509 ✏️ Fixing typos, exlude => exclude. 2019-04-18 09:58:16 +08:00
Baorong Li 59cfe24178 Merge branch 'develop'
# Conflicts:
#	package.json
2019-04-10 07:27:25 +08:00
Baorong Li 87d0d58ae8 Merge commit '0ac4839e948f7b1d34c90d33f4ece483bd9d2f48' 2019-04-10 07:24:20 +08:00
Baorong Li de8b6c972d bump antd-admin@5.0.6 2019-04-10 07:24:06 +08:00
Baorong Li 0ac4839e94 upgrade umi@2.6.x 2019-04-10 07:22:53 +08:00
Baorong Li 565bce6d8b refix #958 by reset form in componentDidUpdate 2019-04-05 09:02:25 +08:00
Baorong Li b278b028cf fix #958 redux form initialValues not updating with state 2019-04-04 16:45:28 +08:00
Baorong Li 33abd9369e fix #957 an flaw ignored 2019-03-19 10:59:37 +08:00
Baorong Li e6b2f7f271 fix #950 modify z-index in header 2019-03-13 16:59:12 +08:00
Baorong Li 0bd1e9cf59 fix #947 misspelled word cancel 2019-03-06 12:11:42 +08:00
Baorong Li 693625bf2c bump antd-admin@5.0.5 2019-03-05 16:23:16 +08:00
Baorong Li 3a6c587569 upgrade antd@3.14 2019-03-05 16:17:12 +08:00
Baorong Li bd85eaf0a0 fix less is not a command in prettier 2019-03-05 16:15:33 +08:00
Baorong Li 29aa0f416e fix Cannot read property 'addEventListener' of null #946 2019-03-05 16:15:02 +08:00
Baorong Li 5b32607911 bump antd-admin@5.0.4 2019-02-19 22:00:36 +08:00
Baorong Li 76e5359752 upgrade umi@2.5.0 2019-02-19 21:46:01 +08:00
Baorong Li 5ec4efbb6e reset default lang to en 2019-02-07 09:19:39 +08:00
Baorong Li f8bb7b421a remove description about support IE9/IE10 that not working well 2019-02-07 08:52:40 +08:00
Baorong Li 887c169aa8 upgrade and lock antd@3.13.0 2019-02-07 08:36:53 +08:00
Baorong Li 8c10dcc6c2 Merge pull request #939 from rrfaria/feature/pt-br
added pt-br language and some improvements to language control to route mocks
2019-02-07 08:08:01 +08:00
Rafael Faria 671da6b5fa added pt-br and some improvements to language control 2019-02-06 14:39:02 -02:00
Baorong Li 7fdb2f4ea8 bump antd-admin@5.0.3 2019-01-11 18:43:48 +08:00
Baorong Li 67388b31f5 enable umi treeShaking 2019-01-11 18:40:39 +08:00
Baorong Li 2379cca765 upgrade umi@2.4.0 & antd@3.12.x 2019-01-11 18:39:19 +08:00
Baorong Li 34be6651e5 fix #935 root path / will be not found after login 2019-01-10 17:36:23 +08:00
Baorong Li 10f8e3e8ef fix mix require / module.exports and import / export #934 2019-01-08 23:30:18 +08:00
Baorong Li 0c6ea8eb5c fix cannot read property 'hash' of undefined by turn off hardSource 2019-01-08 22:56:23 +08:00
Baorong Li 6e69b06e61 Publish antd-admin@5.0.2 2018-12-28 14:01:51 +08:00
Baorong Li 98ba383a68 upgrade umi@2.3 antd@3.11 2018-12-28 11:42:44 +08:00
Baorong Li 4e6d81a9bf Merge pull request #928 from luckcoding/fix-bread-link
fix bread route has no matching lang
2018-12-13 22:35:56 +08:00
Baorong Li 0e2c206023 Merge branch 'develop' into fix-bread-link 2018-12-13 22:35:47 +08:00
luckcoding 285f06d1e7 fix bread route has no matching lang 2018-12-13 16:57:49 +08:00
Baorong Li d03787a871 Publish antd-admin@5.0.1 2018-12-12 13:48:34 +08:00
zuiidea 6aead03f3e 🐛 Fix style error when menu is collapsed. 2018-12-12 11:35:44 +08:00
Baorong Li 0949a298c9 fix #924 404 Not Found after router change 2018-12-12 06:53:26 +08:00
Baorong Li 94c8e2168f fix #926 createUser api in services 2018-12-12 06:17:30 +08:00
Baorong Li 358134f417 fallback umi to 2.2.8 to fix #923 2018-12-09 23:07:16 +08:00
Baorong Li 7eb9e06452 upgrade antd@3.10.9, umi@2.3.0-beta.3 2018-12-01 11:29:09 +08:00
zuiidea fab06d5005 fix: 🐛 CI fails when pull request 2018-11-29 10:00:11 +08:00
Baorong Li 7483572b1d Merge pull request #921 from francolaiuppa/patch-1
Mini typo fixes for English docs, Configuration section.
2018-11-29 09:45:38 +08:00
Franco Laiuppa d1ce8e0739 Mini typo fixes
Hi! Great project!

I was reading the docs and noticed some typos regarding the layout names and the `exclude` parameter, so I've decided to fix it.
I'm new to this repo so I hope this is a valid edit if not please let me know and I'll change it.

Thanks!
2018-11-28 16:53:25 +01:00
zuiidea 16860f93ad Merge pull request #920 from alexxyzeng/alex
fix: show vertical centered modal in ie
2018-11-28 10:18:22 +08:00
xiayao 6ba45d5bc3 fix: show vertical centered modal in ie 2018-11-28 00:44:21 +08:00
zuiidea f230429ddd Merge branch 'develop' of https://github.com/zuiidea/antd-admin into develop 2018-11-21 10:36:51 +08:00
zuiidea 78c3b6d597 📝 Add some comments image to document. 2018-11-20 21:30:22 +08:00
Baorong Li cdbc2782ff chore: remove beta tag in version from package.json 2018-11-20 17:50:20 +08:00
zuiidea 108aca99b9 📝 Add documentation for Add Layout. 2018-11-18 23:08:12 +08:00
Baorong Li 7dd5dfb1bf fix: icons' format not right in manifest.json 2018-11-15 14:11:47 +08:00
zuiidea ee7a0fffc2 ⚡ Update manifest.json. 2018-11-15 00:11:17 +08:00
zuiidea 6999871860 📝 Add documentation for Add Luanguage. 2018-11-14 23:46:59 +08:00
zuiidea 6742207c77 🐛 Fix cannot translate fields with variables. 2018-11-14 22:44:46 +08:00
Baorong Li d71c29ee2e feat: enable pwa 2018-11-14 13:37:34 +08:00
zuiidea 6917d6b89a Merge branch 'develop' of https://github.com/zuiidea/antd-admin into develop 2018-11-12 23:31:11 +08:00
zuiidea c3f369f0b3 📝 Add documentation for API configuration. 2018-11-12 23:30:56 +08:00
Baorong Li 01abc5ca38 upgrade antd@3.10.5 2018-11-10 09:50:20 +08:00
Baorong Li 08a348090c upgrade umi@2.3.0-beta.1 2018-11-09 23:16:42 +08:00
Baorong Li 63b1ecf79f Upgrade umi@2.2.5 2018-11-09 11:26:19 +08:00
Baorong Li efe7e74375 fix #913 handleMenuClick is not defined 2018-11-07 16:23:36 +08:00
Baorong Li 6d552d22d9 add doc about custom http header #829 2018-11-05 11:23:43 +08:00
zuiidea 017af0ddfc 📝 Update docs. 2018-11-04 22:55:50 +08:00
zuiidea c2161ceca9 📝 Update README.md and package.json. 2018-11-04 21:08:43 +08:00
Baorong Li 140af31bec adjust user mock 2018-11-03 09:39:37 +08:00
zuiidea 1199e7e618 👷 Update travis.yml. 2018-11-02 19:27:55 +08:00
zuiidea 3fa24d00fa 📝 👷 Add some English docs, Update travis.yml. 2018-11-02 19:21:22 +08:00
zuiidea 5d23c77100 📝 Add some Chinese documentations. 2018-11-02 18:13:43 +08:00
zuiidea 286178fc5e 📝 Update README.md and Add README-zh_CN.md. 2018-11-02 18:08:29 +08:00
zuiidea f6621572df ⚡ Improving performance. 2018-11-02 18:06:28 +08:00
zuiidea d32b09d802 🔧 Change configuration file 2018-11-01 19:37:09 +08:00
zuiidea dbe86ec0a8 🐛 💄 Fix can't scroll on the table, Update the UI in the dashbord page. 2018-11-01 19:34:36 +08:00
zuiidea 5f8141148a :lipstick:Update logo and favicon. 2018-11-01 09:41:34 +08:00
zuiidea c7c24983cc :memo:Write the documentation of getting started. 2018-10-31 23:33:49 +08:00
zuiidea f80b6d366f :memo:Rewrite the documentation of app structure. 2018-10-30 22:32:59 +08:00
zuiidea 0b360eeebb fix some style, remove svg config. 2018-10-28 22:34:24 +08:00
zuiidea c92a1e1342 remove pwa config. 2018-10-28 20:44:19 +08:00
zuiidea c0963cbcd9 change umi version. 2018-10-27 14:09:35 +08:00
Baorong Li 4979d5cbc4 Upgrade umi@2.2.x 2018-10-26 17:17:55 +08:00
zuiidea ff85c1447b Upgrade umi@2.2.0-beta.8 2018-10-25 13:34:34 +08:00
Baorong Li df608b2dc1 remove yarn.lock 2018-10-25 09:29:49 +08:00
Baorong Li f38e0ce7e2 upgrade antd@3.10.x 2018-10-25 08:47:35 +08:00
zuiidea 0499b70218 Translation user and post page. 2018-10-24 18:52:56 +08:00
zuiidea f654b277fa Remove table animation. 2018-10-23 22:08:47 +08:00
zuiidea 95eeebb09e Add configuration for sticky primary layout header. 2018-10-23 16:29:35 +08:00
zuiidea bb61d7f7dc Optimize the Request page. 2018-10-20 17:03:26 +08:00
zuiidea d821a7cf59 Add automatic translation commend. 2018-10-18 23:13:55 +08:00
zuiidea 9db8827d4a Add automatic translation scripts. 2018-10-17 23:51:39 +08:00
zuiidea 0b17931c62 Menu supports multiple languages. 2018-10-16 16:20:48 +08:00
zuiidea c1df88c25f Added notification component on the Header. 2018-10-16 14:44:35 +08:00
zuiidea f6454e71f0 Added language switching drop-down menu. 2018-10-15 15:08:48 +08:00
zuiidea 66a6e55191 Added Scrollbar. 2018-10-12 22:05:16 +08:00
zuiidea 0a3fac2e72 Added component Scrollbar, Added avatar 2018-10-11 22:50:42 +08:00
zuiidea 2f928329d1 fix style. 2018-10-10 22:06:13 +08:00
zuiidea 9a5ff4aa98 mobile device supports drawer menu. 2018-10-09 11:46:19 +08:00
Baorong Li dd3c191139 upgrade umi@2.1 2018-09-28 14:17:23 +08:00
Baorong Li 9a702fb774 try to optimize city.js 2018-09-26 18:15:47 +08:00
Baorong Li d0c2713f20 fix login with wrong path 2018-09-22 18:31:20 +08:00
Baorong Li a6bf4286dc add favicon 2018-09-22 18:29:31 +08:00
zuiidea 08f40efd2b Optimization: cancel the request of the current page when the page jumps. 2018-09-20 19:55:32 +08:00
zuiidea 4e7795ec7c Optimization and rewriting PrimaryLayout. 2018-09-18 22:04:30 +08:00
zuiidea 5aa187334a Optimize mock related files and variable names. 2018-09-17 20:54:06 +08:00
zuiidea abfcf2460e Added new logo. 2018-09-17 17:22:29 +08:00
zuiidea bcd6248833 Merge branch 'develop' of https://github.com/zuiidea/antd-admin into develop 2018-09-17 10:52:33 +08:00
zuiidea baa5869fe5 doc:Initialize 2018-09-16 23:38:17 +08:00
Baorong Li 58f62d8145 add a simple e2e test and enable pwa 2018-09-16 12:32:54 +08:00
zuiidea 2044beb7f1 fix:Menu and breadcrumbs cannot be highlighted with the path. 2018-09-15 21:34:18 +08:00
zuiidea 5f8a298ece fix:change language after switching language login. 2018-09-15 18:06:24 +08:00
zuiidea 487b39f97c Merge branch 'develop' of https://github.com/zuiidea/antd-admin into develop 2018-09-15 17:50:48 +08:00
zuiidea c5724f208a Adjust the router to automatically add the current language prefix before the pathname in push and replace.
Added `pathMatchRegexp` to match routes and regexp if the route prefix is ignored
2018-09-15 17:50:15 +08:00
Baorong Li 03a23bab9a use dva-immer 2018-09-15 17:32:26 +08:00
zuiidea d58b6ce948 Merge branch 'develop' of https://github.com/zuiidea/antd-admin into develop 2018-09-15 12:28:34 +08:00
zuiidea 7c83c80d5d Support for dynamically loading language packs.
Load the `lodash` function as needed.
Added i18n related configuration.
2018-09-15 12:26:22 +08:00
Baorong Li 0801d83856 add github icon in GlobalFooter 2018-09-15 11:02:27 +08:00
zuiidea 8aa55330b4 Support antd-design-pro,Added language switching on login page. 2018-09-14 22:35:49 +08:00
Baorong Li ee10965f43 fix first page jump to login fail 2018-09-14 11:32:28 +08:00
zuiidea 755e19ed12 Use jslingui as the i18n solution. 2018-09-13 23:52:08 +08:00
zuiidea 40d3914b3c Optimize layout configuration to make it simpler and more flexible. 2018-09-13 20:20:25 +08:00
zuiidea 47fd515944 Using the decorator syntax, Fixed user page filter data by address. 2018-09-12 19:44:34 +08:00
zuiidea ba426defdd Optimize the utils function and add JSdoc
Change the variable color to Color.
Add package loadsh.isempty.
2018-09-12 18:10:09 +08:00
zuiidea a8bd1a587a Added eslint rule 'no-conole', Fixed request page and post page,Replace utils/enums.js to utils/contant.js 2018-09-12 16:00:36 +08:00
zuiidea 237efb4e72 Optimize the way to import api, Removed some configuration in utils/config.js. 2018-09-12 14:05:20 +08:00
zuiidea 0de24b8251 Merge branch 'develop' of https://github.com/zuiidea/antd-admin into develop 2018-09-11 22:00:29 +08:00
zuiidea 7077ef15f3 Added CI for document. 2018-09-11 22:00:18 +08:00
Baorong Li b3d5d11539 try add a simple test 2018-09-11 18:09:06 +08:00
Baorong Li 2522b971f1 clean README.md 2018-09-11 17:52:44 +08:00
Baorong Li c6be37ca09 fix login page miss 2018-09-11 17:52:16 +08:00
zuiidea ae8ac62938 Added docsify and update umi config. 2018-09-11 17:28:51 +08:00
zuiidea 349eb3216d Optimize .travis.yml. 2018-09-10 22:14:35 +08:00
zuiidea d1d559b1d6 Added travis. 2018-09-10 18:01:26 +08:00
zuiidea 7d5ad95cff Optimize file 'request.js',and remove code about cross domin. 2018-09-09 23:25:12 +08:00
zuiidea e09c22fc18 Merge branch 'develop' of https://github.com/zuiidea/antd-admin into develop
# Conflicts:
#	package.json
#	src/pages/dashboard/components/cpu.js
#	src/pages/dashboard/components/user.js
#	yarn.lock
2018-09-09 14:23:00 +08:00
zuiidea a7e84edad3 Added lint-staged and husky to unify code style. 2018-09-09 14:18:22 +08:00
zuiidea 0f466b2abe Added lint-statged and husky to unify code style. 2018-09-09 14:02:46 +08:00
Baorong Li 0ccdcdbc92 upgrade dep 2018-09-09 09:06:56 +08:00
Baorong Li 3d3f8e70dd remove MoonComponent in ECharts 2018-09-09 08:57:25 +08:00
Baorong Li 417215cfcc remove useless mock 2018-09-09 08:53:06 +08:00
Baorong Li ae8aba68f2 remove iconfont component related svg 2018-09-09 08:22:06 +08:00
zuiidea cd53b36e76 Deprecated component layer、Search、DataTable、Iconfont,because there are exist similar component in antd. 2018-09-08 23:39:49 +08:00
Baorong Li a44f5795fd remove iconfont component @part 2018-09-08 18:26:42 +08:00
zuiidea 556169871a Support Stylelint.
Added Prettierrc.
Optimize the configuration file .umirc.js, and Added annotations.
Replace eslint-plugin-umi to eslint-plugin-react-app as eslint bese plugin.
And so on.
2018-09-08 17:10:57 +08:00
zuiidea 261fbb8428 Support Stylelint.
Added Prettierrc.
Optimize the configuration file .umirc.js, and Added annotations.
Replace eslint-plugin-umi to eslint-plugin-react-app as eslint bese plugin.
And so on.
2018-09-08 17:10:20 +08:00
Baorong Li f02d39ace0 Merge pull request #891 from Louis-7/bugfix/motion-switch
Bugfix/motion switch
2018-09-04 15:58:00 +08:00
Louis-7 4d32829445 fix motion switch style on Users page 2018-09-04 15:06:48 +08:00
Baorong Li 5438e04fc5 Merge pull request #888 from Louis-7/bugfix/chart-shake
Bugfix/chart shake
2018-09-03 15:38:35 +08:00
Baorong Li 54bbe4d70a 🎉🎉 upgrade umi@2.0.0 2018-09-03 15:38:03 +08:00
Louis 78ece0c9fb Merge pull request #2 from Louis-7/bugfix/chart-shake
fix move mouse into chart will cause chart shake issue.
2018-09-03 15:26:48 +08:00
Louis-7 3407f9a0c1 fix move mouse into chart will cause chart shake issue. 2018-09-03 15:24:15 +08:00
Louis f1b78e8d1f Merge pull request #1 from Louis-7/bugfix/sidebar-shake
Bugfix/sidebar shake
2018-09-03 15:15:40 +08:00
Baorong Li df2fc9c32e Merge pull request #886 from Louis-7/bugfix/sidebar-shake
Bugfix/sidebar shake
2018-09-03 15:11:15 +08:00
Louis-7 cc5c319332 remove useless rule
Signed-off-by: Louis-7 <louisgh.cn@gmail.com>
2018-09-03 14:58:56 +08:00
Louis-7 43ef09dfed Revert "restrict rule"
This reverts commit 843bd1a088.
2018-09-03 14:57:04 +08:00
Louis-7 0c95751b8d restrict rule
Signed-off-by: Louis-7 <louisgh.cn@gmail.com>
2018-09-03 14:56:06 +08:00
Louis-7 843bd1a088 restrict rule
Signed-off-by: Louis-7 <louisgh.cn@gmail.com>
2018-09-03 14:54:20 +08:00
Louis-7 a0db71e571 Revert "fix sidebar shake once mouse over it"
This reverts commit 7fc14eddd9.
2018-09-03 13:28:13 +08:00
Louis-7 7fc14eddd9 fix sidebar shake once mouse over it
Signed-off-by: Louis-7 <louisgh.cn@gmail.com>
2018-09-03 13:18:46 +08:00
Baorong Li 7f2fdc383b upgrade query-string@6 2018-08-22 15:58:12 +08:00
Baorong Li ff2caecb3a Merge pull request #877 from sorrycc/refact/migrate-to-umi-2
[WIP] refact: migrate to umi@2
2018-08-22 15:32:08 +08:00
sorrycc d01df1ef13 refact: migrate to umi@2 2018-08-22 15:12:01 +08:00
Baorong Li cd55df3a15 upgrade antd@3.8.0 2018-08-05 22:46:55 +08:00
Baorong Li ce59f3e7b2 Update README.md 2018-08-02 17:25:18 +08:00
Baorong Li 4d722f103a Update README.md 2018-08-02 17:20:02 +08:00
Baorong Li c1bc6f27b1 upgrade antd@3.7.3 2018-08-02 16:50:34 +08:00
Baorong Li ed88c087bf forgot to remove css part in dashboard/user 2018-07-21 13:15:16 +08:00
Baorong Li 4e337caa07 remove unuse png 2018-07-21 12:49:56 +08:00
Baorong Li ea3929b4c2 cut project size 2018-07-21 12:43:10 +08:00
Baorong Li 9eff4ca129 modify mock method in users delete, fix #859 2018-07-20 11:48:33 +08:00
Baorong Li d6d94e2121 upgrade antd@3.7.0 2018-07-20 11:18:42 +08:00
Baorong Li 737c0236d6 Merge pull request #844 from JChord/master
refactor:修改父ID取值逻辑
2018-06-25 12:42:14 +08:00
DosLin 69571f2916 refactor:修改父ID取值逻辑 2018-06-25 10:53:10 +08:00
Baorong Li 6dffa7378c Merge pull request #842 from JChord/master
fix:进入动态路由下的二级页面菜单栏无法选中问题
2018-06-22 17:02:08 +08:00
DosLin c2a7bc7106 fix:进入动态路由下的二级页面菜单栏无法选中问题 2018-06-22 16:50:58 +08:00
Baorong Li e752750c9e update doc, fix #839 2018-06-20 09:07:52 +08:00
Baorong Li 32bde8f69e Merge pull request #834 from codeif/master
Rename variable name  domin  to domain
2018-06-08 10:26:44 +08:00
codeif b5f9ef51f1 Rename variable name domin
to domain
2018-06-07 21:53:54 +08:00
Baorong Li 8c10be6ee6 upgrade umi@1.3.5 => fix #723 2018-06-01 15:56:37 +08:00
zuiidea c1e3872792 Fix README conflic 2018-05-25 17:37:23 +08:00
zuiidea c3eef53e4d Merge develop and update to 5.0.0-beta 2018-05-25 17:20:20 +08:00
zuiidea a1b9c0c33d Fix the files under the 'public' dicrectoy can't visit after build 2018-05-25 17:13:30 +08:00
Baorong Li c49b0edbe9 update umi@1.3.4 & antd@3.5.3 [use MOCK=none for production] 2018-05-25 13:49:13 +08:00
Baorong Li 0fd8824ad7 fix logout not work #826, #669 2018-05-25 11:52:39 +08:00
Baorong Li 973199135f update umi@1.3.3 antd@3.5.2 [no production for this commit] 2018-05-17 18:32:33 +08:00
Baorong Li 43b7b21ad3 update umi@1.3.1 [no production for this commit] 2018-05-15 22:04:42 +08:00
Baorong Li ba96ebb874 update dep 2018-05-12 14:34:00 +08:00
Baorong Li c66f086f42 fix #372 update navOpenKeys when copy link open 2018-05-05 12:11:03 +08:00
Baorong Li 07b2175e92 upgrade dep antd@3.5.0, umi@1.2.6 2018-05-05 12:05:07 +08:00
Baorong Li d245a1eabc upgrade umi@1.2.1 2018-04-24 23:00:31 +08:00
Baorong Li f1e2fd3b18 fix: alias 2018-04-24 22:51:12 +08:00
Baorong Li a6b3dba92e cut moment locale/lodash size & revert d06ee20 2018-04-13 18:19:22 +08:00
Baorong Li 9fd0abe6ea update dep 2018-04-12 15:21:03 +08:00
Baorong Li d06ee20c47 remove dep highcharts-more/highcharts-exporting 2018-04-12 12:02:59 +08:00
Baorong Li 2ef1fa0367 upgrade dep umi 2018-04-12 12:00:35 +08:00
Baorong Li 9d459106c1 Update README.md 2018-04-10 17:27:19 +08:00
Baorong Li cd5a52a8fc Merge pull request #793 from iversonwool/add_leehow
comfirmLoding
2018-04-10 09:09:40 +08:00
李浩 d89320f578 comfirmLoding 2018-04-10 08:59:16 +08:00
Baorong Li df5ce2991e improve by github.com/sorrycc/blog/issues/66 2018-03-31 15:36:26 +08:00
Baorong Li 668c9c7dfe upgrade umi@1.1.4 (support dll gzip & cache) 2018-03-30 15:25:39 +08:00
Baorong Li 9bd13055c0 5.0.0-beta coming 2018-03-29 11:26:30 +08:00
Baorong Li 9f3adda59d upgrade dependencies 2018-03-29 11:16:11 +08:00
Baorong Li bfa7aaecb8 Merge pull request #770 from umijs/refact/migrate-to-umi
Refact/migrate to umi
2018-03-29 10:17:07 +08:00
Baorong Li 9d4310d8e0 Merge branch 'develop' into refact/migrate-to-umi 2018-03-29 10:16:31 +08:00
Baorong Li b3555b01f3 Merge branch 'master' into develop 2018-03-29 10:08:50 +08:00
chencheng 74895fbb0d fix: uglifyjs problem, use query-string@5 2018-03-26 17:59:22 +08:00
chencheng 5f04d19d2d add lost dep query-string 2018-03-26 17:18:43 +08:00
chencheng 0fef06e0c6 use umi-plugin-dll to enable dll 2018-03-26 17:15:27 +08:00
chencheng 89d22451c5 fix: svg don't work 2018-03-24 18:08:16 +08:00
chencheng fb49056c73 make login work 2018-03-24 14:39:54 +08:00
chencheng a3071819c4 eslint 2018-03-24 09:07:36 +08:00
chencheng d4e10ad5c2 refact the directory structure 2018-03-23 23:31:09 +08:00
chencheng 59e9a1053e refact config files and package.json 2018-03-23 22:51:41 +08:00
Baorong Li 308fc09b33 Merge pull request #767 from iversonwool/add_leehow
refresh bug in router/user
2018-03-16 14:30:42 +08:00
李浩 99ec9facd3 refresh bug 2018-03-16 10:29:32 +08:00
Baorong Li 2a96d7a5f6 Merge pull request #749 from nazarlitvin/remove-async
remove unnecessary async functions
2018-03-10 11:43:00 +08:00
Baorong Li 195e1d17f8 Merge pull request #755 from LizPeng/patch-1
Update Echarts version
2018-03-09 14:00:03 +08:00
Baorong Li 580ff59b3d Create issue_template.md 2018-03-09 11:18:39 +08:00
Baorong Li cfa5aae5da fix #754 add set port guide 2018-03-09 10:58:54 +08:00
Baorong Li 761125735a fix #572, move cross-env to devDependencies 2018-03-08 17:53:12 +08:00
zuiidea d1b12ff0e1 Fix issue resulting User page showing wrong content when delete alll items in last page. 2018-03-01 17:45:34 +08:00
zuiidea a47176a4e5 fix user table 2018-02-27 19:17:59 +08:00
Dustin bc3d7fb39a Update Echarts version
require Echarts  ^4.0.0
2018-02-27 19:02:53 +08:00
zuiidea 458548150c fix popup position 2018-02-26 20:02:46 +08:00
zuiidea f6e11bb464 eslint fix 2018-02-26 19:35:58 +08:00
zuiidea 479fc647c3 Merge branch 'Maple-Ro-master' into develop 2018-02-26 19:19:56 +08:00
zuiidea 9a4c63390d locale example 2018-02-26 19:19:42 +08:00
zuiidea 42cd1221fa logo text fadeIn 2018-02-26 19:13:43 +08:00
zuiidea 98b773fdc3 logo text fadeIn 2018-02-26 19:13:12 +08:00
zuiidea cd54fcbf52 Merge branch 'hiooyUI-master' into develop 2018-02-26 10:58:30 +08:00
nazarlitvin bd68f8c631 remove unnecessary async functions 2018-02-19 22:16:33 +02:00
liutsing 3fde5aaa3c 1、本地化
2、解决侧边栏收起时菜单图标悬浮下无菜单文字显示的问题
2018-02-16 01:22:44 +08:00
Nelson Kuang 2f34de5602 修复左侧菜单合拢时mouseover提示空白视觉bug
当一级菜单没子菜单时,mouseover会弹出tooltips,但提示空白无内容
2018-02-07 17:25:16 +08:00
zuiidea 2de1e81661 Merge pull request #711 from zuiidea/develop
Develop
2017-12-27 15:41:00 +08:00
zuiidea cea60c5683 update Readme 2017-12-27 15:39:45 +08:00
zuiidea f16e104f73 fix all echarts example 2017-12-26 14:14:52 +08:00
zuiidea c397f552c3 fix some style 2017-12-26 11:31:05 +08:00
zuiidea 11c4ac803e fix users pagination 2017-12-25 20:39:48 +08:00
zuiidea 09b9a100de fix header style 2017-12-25 19:54:48 +08:00
zuiidea 0e59df39ee Compatibility upgrade 2017-12-25 18:08:25 +08:00
zuiidea 30254a2ec7 upgrade package 2017-12-25 10:51:36 +08:00
zuiidea cd796a6db9 fix Search style 2017-11-24 11:27:00 +08:00
zuiidea 6ba75de576 add backTop 2017-11-24 11:02:52 +08:00
zuiidea a3637b3a99 user search 2017-11-24 10:32:12 +08:00
zuiidea 85ec09ec9a Merge branch 'weishijun14-patch-1' into develop 2017-11-24 10:28:25 +08:00
zuiidea eb683b98e7 Merge branch 'patch-1' of https://github.com/weishijun14/antd-admin into weishijun14-patch-1 2017-11-24 10:28:17 +08:00
zuiidea 9221173309 Merge branch 'silentred-master' into develop 2017-11-24 10:26:15 +08:00
zuiidea 55a96f41c6 Merge branch 'master' of https://github.com/silentred/antd-admin into silentred-master 2017-11-24 10:25:42 +08:00
zuiidea ce510e79c7 Merge branch 'nazarlitvin-pagination' into develop 2017-11-24 10:24:56 +08:00
zuiidea 3d4f2a8814 Merge branch 'pagination' of https://github.com/nazarlitvin/antd-admin into nazarlitvin-pagination 2017-11-24 10:24:22 +08:00
nazarlitvin 38e24edd7b fix incorrect pagination property 2017-11-22 16:01:49 +02:00
Jason W 841c987a1a Update package.json
update package.json
2017-11-03 04:21:16 -05:00
shijun Wei dc26f7d25e update query to search
history 的 location 属性上不再包含 query。
2017-11-02 13:19:09 +08:00
zuiidea bc754e683e assets 2017-10-30 14:07:09 +08:00
zuiidea c7acc8db4b Merge pull request #649 from zuiidea/develop
Develop
2017-10-30 11:56:42 +08:00
zuiidea 057acc514f Merge branch 'smackgg-master' into develop 2017-10-30 11:52:52 +08:00
zuiidea 53ce7d08fb Merge branch 'xx1595140265-patch-1' into develop 2017-10-30 11:51:27 +08:00
zuiidea 8ffd68a4e2 Merge branch 'dkvirus-patch-1' into develop 2017-10-30 11:50:18 +08:00
zuiidea 766653ee7a merge #640 2017-10-30 11:49:27 +08:00
zuiidea 9dedcc68c3 Merge branch 'the-wang-master' into develop 2017-10-30 11:28:23 +08:00
zuiidea 5ea2b3c9b8 extend chart 2017-10-30 11:25:53 +08:00
汪亚辉 d2ac91839a 面包屑导航支持多级参数
例:
当前router为/:appkey/:packageId
父级router为/:appkey
当前pathname为/com.mock.ly/58

可以看出appkey=com.mock.ly, packageId=58
目前这种场景下,面包屑中父级连接直接展示为/:appkey,没有解析

本次commit支持根据当前多param去填充面包屑中父级页面连接
2017-10-24 18:55:06 +08:00
the-wang bfca2746d8 Merge pull request #1 from zuiidea/master
up
2017-10-24 18:54:10 +08:00
dkvirus b417065ac3 Update Menu.js
在 Slider.js 中调用 Menu 组件,并没有传入 handleClickNavMenu 属性的值,代码优化。
2017-10-12 16:27:52 +08:00
xuxue abdc97f087 Update index.js
取错值,修正
2017-10-10 04:23:34 -05:00
smackxu 07016c6c26 Fixed dark theme menu bug 2017-09-12 16:27:22 +08:00
zuiidea b8162060cd Merge pull request #581 from zuiidea/develop
Develop
2017-09-11 10:27:01 +08:00
zuiidea 36fb5d293c delete extra code 2017-09-11 10:19:43 +08:00
zuiidea 429280a97a Merge branch 'DiroKate-master' into develop 2017-09-11 10:18:37 +08:00
zuiidea 7ac36c779e merge #332 2017-09-11 10:18:20 +08:00
zuiidea d2e7b464e3 megre #563 2017-09-11 10:00:25 +08:00
zuiidea 25839ea99f Merge branch 'akliyiping-develop' into develop 2017-09-11 09:55:27 +08:00
zuiidea 9c99581aa6 Merge branch 'develop' of https://github.com/akliyiping/antd-admin into akliyiping-develop 2017-09-11 09:55:05 +08:00
zuiidea e42c21f0eb fix #574 2017-09-11 09:53:22 +08:00
zuiidea 782bf214e5 Merge branch 'dong894-master' into develop 2017-09-11 09:47:45 +08:00
zuiidea a8a4496c7a Merge branch 'master' of https://github.com/dong894/antd-admin into dong894-master 2017-09-11 09:47:29 +08:00
zuiidea f5f013ff23 Merge branch 'develop' 2017-09-11 09:35:39 +08:00
zuiidea 8cff3af897 Merge branch 'master' of https://github.com/zuiidea/antd-admin 2017-09-11 09:35:32 +08:00
zuiidea 322d5a6d0e merge #576 2017-09-11 09:35:09 +08:00
zuiidea 2ee26f51a7 Merge branch 'yangbin1994-bug575' into develop 2017-09-11 09:27:00 +08:00
zuiidea e670ed2f96 Merge branch 'bug575' of https://github.com/yangbin1994/antd-admin into yangbin1994-bug575 2017-09-11 09:26:36 +08:00
杨斌 601a03b5b4 fix bug#575 2017-09-10 02:26:27 +08:00
dongyulei 00582e70ff 修复 4.3.5 中用户画面翻页无效的问题 2017-09-10 00:02:10 +08:00
zuiidea fa4385055b Update README.md 2017-09-09 14:54:18 +08:00
zuiidea 01f4de55df Merge pull request #571 from zuiidea/develop
Develop
2017-09-09 14:52:50 +08:00
zuiidea dedd34e8e8 4.3.5 2017-09-09 14:50:47 +08:00
zuiidea d1b373201e fix some grammar and details 2017-09-09 14:20:51 +08:00
zuiidea dbcc90e7ad 出去吃烧烤,回来接着看 2017-09-08 16:41:05 +08:00
zuiidea 87fce74d5b Update app.js
fix mobile Header menu
2017-09-08 15:45:38 +08:00
zuiidea 5c51679ad7 Merge branch 'yangbin1994-dva2.0' into develop 2017-09-08 14:56:35 +08:00
zuiidea 6d17b5b876 Merge branch 'yangbin1994-dva2.0' 2017-09-08 14:51:51 +08:00
杨斌 1288853112 解决冲突 2017-09-08 14:19:40 +08:00
杨斌 d3e7e17789 query-string 2017-09-08 13:27:07 +08:00
eric 6077d74f10 .gitignore 增加排除项 2017-09-07 11:00:00 +08:00
杨斌 7bf031699a add LoadingComponent 2017-09-06 20:36:14 +08:00
杨斌 a6eb693636 dva@2.0 2017-09-06 11:13:26 +08:00
zuiidea 39c377e0e2 Merge pull request #552 from zuiidea/develop
add entry.ejs and add lte IE10 polyfill
2017-09-06 09:56:25 +08:00
zuiidea 67b90c4df0 add entry.ejs and add lte IE10 polyfill 2017-09-06 09:55:41 +08:00
zuiidea 0e2727f9c8 Merge pull request #542 from zuiidea/develop
4.3.4
2017-09-04 11:48:32 +08:00
zuiidea 0cf02e7324 4.3.4 2017-09-04 11:47:24 +08:00
zuiidea 68c9f2b65f Merge pull request #540 from zuiidea/develop
fix login success redirect;fix css load delay
2017-09-04 11:03:13 +08:00
zuiidea 587b1f6b9d fix login success redirect;fix css load delay 2017-09-04 11:01:31 +08:00
zuiidea d94580a253 Merge pull request #302 from jackple/patch-1
Update app.js
2017-09-04 09:58:42 +08:00
zuiidea 531e3c0fcc Merge pull request #532 from p2227/patch-1
fixes #529
2017-09-04 09:57:39 +08:00
zuiidea d68de7a30c Merge pull request #378 from chenkang084/remote
fixed:when click breadcrumb back to other page,the left menu displaye…
2017-09-04 09:57:24 +08:00
zuiidea 45cb70f006 Merge pull request #518 from quanpower/patch-1
Update roadhogrc.js
2017-09-04 09:56:18 +08:00
kuang af85384f11 fixes #529 2017-08-28 23:20:38 -05:00
William Zhang 208539134f Update roadhogrc.js
proxy加引号,我这报错了,去掉了正常运行
2017-08-19 18:06:16 +08:00
zuiidea a3f41e3d64 Merge pull request #496 from zuiidea/develop
fix weather
2017-08-13 17:20:42 +08:00
zuiidea 3855c402c9 fix weather 2017-08-13 17:18:46 +08:00
zuiidea 6a58d8434b Merge pull request #493 from zuiidea/develop
fix lint
2017-08-10 19:11:39 +08:00
zuiidea d26a92ce79 fix lint 2017-08-10 19:11:10 +08:00
zuiidea 0d20717c3c Merge pull request #488 from zuiidea/develop
update
2017-08-09 09:46:45 +08:00
zuiidea a0d81dcda9 update 2017-08-08 19:46:38 +08:00
zuiidea 4490af8553 Merge pull request #486 from zuiidea/develop
Develop
2017-08-07 14:43:08 +08:00
zuiidea 75cc86152d 4.3.2 2017-08-07 14:28:32 +08:00
zuiidea 3d9f263330 add Alias 2017-08-07 11:46:42 +08:00
zuiidea 70b5d05f1a format 2017-08-03 14:01:49 +08:00
zuiidea 4da23b9133 version.js 2017-08-03 13:50:43 +08:00
zuiidea da1c52e82b npm run build:new 2017-07-31 17:28:03 +08:00
zuiidea 6ae39bfd55 Merge pull request #453 from phproot/master
fix README.md
2017-07-31 11:51:42 +08:00
Code d86f0ebd78 fix README.md 2017-07-31 11:38:39 +08:00
zuiidea ecbd8bf51e fix little bug 2017-07-31 10:49:15 +08:00
zuiidea 0c9fabe2b4 Merge pull request #452 from zuiidea/develop
fix build:dll
2017-07-30 23:51:07 +08:00
zuiidea 0f27528d2f fix build:dll 2017-07-30 23:50:12 +08:00
zuiidea a36d44d402 Merge pull request #450 from zuiidea/develop
Develop
2017-07-30 14:54:15 +08:00
zuiidea 37deddc911 update 4.3.0 2017-07-30 14:51:02 +08:00
zuiidea 52ee780e40 fix build error 2017-07-30 14:25:04 +08:00
zuiidea 057853cfde fix ejs-loader 2017-07-29 22:30:39 +08:00
zuiidea c0222c3957 add version build 2017-07-28 19:26:05 +08:00
zuiidea 00d8fc5ea5 add build:dll 2017-07-27 20:02:20 +08:00
zuiidea 1e08d7adaa optimized code 2017-07-27 19:13:31 +08:00
zuiidea b2b0aa872f Merge pull request #431 from zuiidea/develop
pagenation style
2017-07-21 19:03:48 +08:00
zuiidea a2b4ee4047 Merge branch 'master' into develop 2017-07-21 19:03:42 +08:00
zuiidea c6b477c993 pagenation style 2017-07-21 19:02:11 +08:00
zuiidea 548d7a8ddb Merge pull request #427 from zuiidea/develop
fix webpack.resoleve.alias module import/no-unresolved
2017-07-19 10:33:14 +08:00
zuiidea 755c1250e5 fix webpack.resoleve.alias module import/no-unresolved 2017-07-19 10:32:39 +08:00
zuiidea c5ebb91980 Merge pull request #413 from afc163/patch-1
No need customzied card style
2017-07-17 10:50:26 +08:00
zuiidea ae12492887 Merge pull request #416 from zuiidea/develop
update package.json
2017-07-17 10:48:01 +08:00
zuiidea 28a5863701 update package.json 2017-07-17 10:47:31 +08:00
偏右 bf65aa5478 Don't need customzied card style
https://github.com/ant-design/ant-design/issues/6833
2017-07-14 13:49:28 +08:00
zuiidea acd3fe8337 Merge pull request #407 from zuiidea/develop
fix permission.visit is null
2017-07-12 19:41:58 +08:00
zuiidea 3ad5a6cfb6 fix permission.visit is null 2017-07-12 19:41:32 +08:00
zuiidea c278c8f6f8 Merge pull request #393 from zuiidea/develop
666
2017-07-10 10:08:26 +08:00
zuiidea 71c75e15ff 666 2017-07-10 10:07:22 +08:00
zuiidea ec8db0e0fb Merge pull request #389 from zuiidea/develop
Develop
2017-07-06 19:16:04 +08:00
zuiidea 2a3587bae5 fix user role and update package.json 2017-07-06 19:15:32 +08:00
zuiidea a33772cbbc Merge branch 'master' into develop 2017-07-06 19:08:06 +08:00
zuiidea 89c58b2f98 Merge pull request #385 from zuiidea/develop
Develop
2017-07-05 19:46:48 +08:00
zuiidea b31bd32ca2 roleType 2017-07-05 19:45:57 +08:00
zuiidea f113fbb238 revise menu property : router => route 2017-07-05 19:29:14 +08:00
rengised a320c77ecb Merge branch 'master' into remote 2017-07-05 15:08:43 +08:00
zuiidea ce1d957212 Merge pull request #382 from zuiidea/develop
Develop
2017-07-05 13:56:00 +08:00
zuiidea 7f40ac6a60 Page Permission 2017-07-05 13:54:57 +08:00
zuiidea 3a01626df9 Permissions Simple Version 2017-07-04 23:41:13 +08:00
zuiidea 6df97916fa webpack alias 2017-07-04 22:44:48 +08:00
chenkang1 7f091d7642 fixed:the error request should be capured in catch method 2017-07-03 14:06:28 +08:00
chenkang1 d8f222f312 fixed:when click breadcrumb back to other page,the left menu displayed the last select item 2017-07-01 16:08:03 +08:00
zuiidea 3378510166 Merge pull request #363 from kuanger/develop
fix logout menu block by show more button
2017-06-19 16:14:49 +08:00
hausir edf1158351 fix logout menu block by show more button 2017-06-19 13:51:03 +08:00
zuiidea e4bd4e9aa0 Merge pull request #355 from blackboyhc/master
Update app.js
2017-06-19 10:18:58 +08:00
zuiidea 5904eae0c9 Merge pull request #349 from zuiidea/develop
Develop
2017-06-19 10:18:42 +08:00
zuiidea 7f26153472 Merge pull request #358 from wuyao1994/dev
showModal return bug
2017-06-19 10:16:59 +08:00
elviswu 4b9e142aa8 showModal return bug 2017-06-16 16:09:22 +08:00
blackboyhc 2679361559 Update app.js
如果在config.js中添加了openPages,比如openPages: ['/login', '/home'],但是进入/home页面仍然要先登录,所以在app model中如果query不成功需要判断当前页面是否被设置成openPages,再决定是否跳转到/login
2017-06-15 17:31:24 +08:00
zuiidea 2d246655e0 add example 2017-06-13 20:36:47 +08:00
zuiidea 04b147d33f proxy example 2017-06-13 20:30:24 +08:00
zuiidea 81801983a6 fix request 2017-06-13 20:26:38 +08:00
zuiidea e484b89518 Merge pull request #340 from zuiidea/develop
add eslint-loader
2017-06-09 10:01:45 +08:00
zuiidea bfff28411d add eslint-loader 2017-06-09 10:00:59 +08:00
zuiidea ae97c9d18a Merge pull request #335 from zuiidea/develop
Develop
2017-06-08 11:22:54 +08:00
zuiidea a063d8be39 fix production className to hash 2017-06-08 11:22:10 +08:00
zuiidea 79eab09941 fix production className to hash 2017-06-08 10:52:05 +08:00
zuiidea 2e3cb5970d pre eslint 2017-06-07 20:16:15 +08:00
zuiidea 460a8c906b Merge pull request #334 from zuiidea/develop
Develop
2017-06-07 19:47:37 +08:00
zuiidea 05a86e2f56 Filename and Classname To Hash 2017-06-07 19:46:56 +08:00
zuiidea 0295da6326 add Posts Page 2017-06-07 14:24:26 +08:00
diro 38637ef167 Example for the ”custom className iconfont” 2017-06-06 21:10:45 +08:00
diro fe8527e72e enable the custom ClassName 2017-06-06 21:08:42 +08:00
diro da64cac414 fix the wrong iconName 2017-06-06 20:45:56 +08:00
zuiidea 85e12caf12 update 2017-06-06 19:31:12 +08:00
zuiidea b83c5e7819 user Multiple Option 2017-06-01 20:16:18 +08:00
zuiidea 9cff4e8dfe 666 2017-05-25 13:55:36 +08:00
jackple f6021cbaa4 Update app.js
先判断menu长度,解决当远程加载menu时刷新页面,当前位置不会选中
2017-05-21 20:32:50 +08:00
zuiidea 6ac7e5e815 Merge pull request #296 from darcygail/master
fix YQL bugs:the chat '&' doesn't encoded
2017-05-17 16:59:21 +08:00
darcy e63dfc9291 fix YQL bugs:the chat '&' doesn't encoded 2017-05-17 15:55:40 +08:00
zuiidea 81e7d2bdca Merge pull request #292 from i06/master
Search.js has a mistake var name
2017-05-15 18:59:57 +08:00
i06 1c46693246 Search.js has a mistake var name
the variable named 'handeleSelectChange' seems not right.
turn `handeleSelectChange` to `handleSelectChange`
Hope  accept my advice, thanks
2017-05-15 17:22:55 +08:00
zuiidea 4832a720e6 Merge pull request #288 from zuiidea/develop
Develop
2017-05-13 14:37:37 +08:00
zuiidea 54964fabfb Update README.md 2017-05-13 14:37:18 +08:00
zuiidea b60e593f09 Update README.md 2017-05-13 14:35:53 +08:00
zuiidea 5359efce36 Merge pull request #287 from zuiidea/develop
update 4.2.1
2017-05-12 18:07:53 +08:00
zuiidea 3decccc87d update 4.2.1 2017-05-12 18:06:43 +08:00
zuiidea d92eecb620 Merge pull request #285 from zuiidea/develop
local icon
2017-05-12 15:56:18 +08:00
zuiidea c3c8cf6f9b local icon 2017-05-12 15:55:42 +08:00
zuiidea b4699e75f1 Merge pull request #284 from zuiidea/develop
fix NProgress
2017-05-12 12:26:35 +08:00
zuiidea 47ae7517a8 fix NProgress 2017-05-12 12:25:57 +08:00
zuiidea 19e07aeb7a Merge pull request #277 from zuiidea/develop
favicon
2017-05-11 11:11:49 +08:00
zuiidea c7789f103e favicon 2017-05-11 11:11:21 +08:00
zuiidea 2c74295843 Merge pull request #266 from zuiidea/develop
default.less
2017-05-09 16:36:12 +08:00
zuiidea 44605c6311 default.less 2017-05-09 16:35:37 +08:00
zuiidea 55ef9dfc0e Merge pull request #263 from zuiidea/develop
Develop
2017-05-09 15:25:45 +08:00
zuiidea 664aeba133 fix qureyuser 2017-05-09 15:25:08 +08:00
zuiidea d2595271f8 iconfont 2017-05-09 15:21:50 +08:00
zuiidea 0f03e1aa1a ICONFONT 2017-05-09 11:28:49 +08:00
zuiidea 255b0a95a7 Merge pull request #258 from zuiidea/develop
add:nprogress,dva-loading
2017-05-08 15:34:15 +08:00
zuiidea 839a7c5e0d add:nprogress,dva-loading 2017-05-08 15:32:25 +08:00
zuiidea bf260db940 Update README.md 2017-05-03 17:30:44 +08:00
zuiidea 3e1e782617 Update package.json 2017-05-03 17:29:44 +08:00
zuiidea a1e8f2ed9b Update package.json 2017-05-03 17:15:35 +08:00
zuiidea 88d835cee4 Merge pull request #237 from zuiidea/4.2-dev
Update README.md
2017-05-02 10:45:05 +08:00
zuiidea 2434368b1f Update README.md 2017-05-02 10:44:46 +08:00
zuiidea 058407e442 Update 2017-05-02 10:41:58 +08:00
zuiidea d486fce33e Merge pull request #232 from zhangpenglin/master
fix typo
2017-04-30 19:06:37 +08:00
zuiidea abbcfb8c3c Merge pull request #233 from afc163/master
Fix devDeps
2017-04-30 19:04:01 +08:00
Zhang Penglin 78166e6a83 fix bug 2017-04-30 12:29:48 +08:00
afc163 ca59db9f04 Fix devDeps 2017-04-29 17:35:54 +08:00
Zhang Penglin 5c8286b5cb fix typo 2017-04-28 23:31:50 +08:00
zuiidea ed8555f15e Update README.md 2017-04-28 17:01:27 +08:00
zuiidea 33d4f1679e Merge branch '4.2-dev' 2017-04-28 16:42:59 +08:00
zuiidea 37dd7d011e merge 2017-04-28 16:42:31 +08:00
zuiidea 5641cc61c4 user mocj 2017-04-28 16:34:08 +08:00
zuiidea 30f14769f0 responsive 2017-04-27 20:40:47 +08:00
zuiidea 1b7c076057 filters 2017-04-27 20:26:30 +08:00
zuiidea fbd0fcb5c4 user detail 2017-04-27 17:59:39 +08:00
zuiidea 19ee8eacce user API restful 2017-04-27 17:29:50 +08:00
zuiidea 0b0c7c3f91 update some texts and configs 2017-04-27 14:40:36 +08:00
zuiidea 5d6abb67b6 Merge pull request #219 from HeChengjun/master
修正 arrayToTree 函数中 children 拼写错误
2017-04-26 16:55:17 +08:00
HeChengjun 1a58dcac95 修正 arrayToTree 函数中 children 拼写错误 2017-04-26 16:16:35 +08:00
zuiidea 3d2d524898 Update README.md 2017-04-25 16:17:25 +08:00
zuiidea 2869ead7bd Merge pull request #215 from zuiidea/4.2-dev
fix
2017-04-25 12:34:10 +08:00
zuiidea 25f7a65897 fix 2017-04-25 12:32:42 +08:00
zuiidea 75e6284873 Merge pull request #214 from zuiidea/4.2-dev
Menu defaultSelected
2017-04-25 12:19:03 +08:00
zuiidea 5fbb1b338a Menu defaultSelected 2017-04-25 12:09:20 +08:00
zuiidea ed2b0b25bd Merge pull request #212 from HeChengjun/patch-1
menu.js line 96 : lineChart -> barChart
2017-04-24 17:57:56 +08:00
HeChengjun a4922c7541 menu.js line 96 : lineChart -> barChart 2017-04-24 17:17:10 +08:00
zuiidea 4566171265 Merge pull request #209 from zuiidea/4.2-dev
hot update
2017-04-24 10:10:55 +08:00
zuiidea 6c48480031 hot update 2017-04-24 10:09:10 +08:00
zuiidea 3401215d41 Merge pull request #202 from zuiidea/4.2-dev
fix userInfo
2017-04-21 18:37:36 +08:00
zuiidea 7284cad8aa fix userInfo 2017-04-21 18:36:35 +08:00
zuiidea 53b8ee6e63 Update README.md 2017-04-21 11:06:23 +08:00
zuiidea b5423129f7 Merge pull request #198 from zuiidea/4.2-dev
4.2 dev
2017-04-21 10:49:31 +08:00
zuiidea 4c6deb49d3 fix menu open 2017-04-21 10:47:55 +08:00
zuiidea b6c3cb8a53 rebuild bread,menu,router 2017-04-20 19:26:17 +08:00
zuiidea a42e749c22 Update README.md 2017-04-19 19:27:23 +08:00
zuiidea cfd0172204 error message 2017-04-19 19:10:20 +08:00
zuiidea 4a694b6df8 fix prop-types 2017-04-18 09:56:15 +08:00
zuiidea 3d03fa0695 Merge pull request #184 from zlotus/remote_dev
fix mock error caused by invalid username
2017-04-15 18:45:25 +08:00
ZealotuS 69fbb4742e fix mock error caused by invalid username 2017-04-15 18:13:56 +08:00
zuiidea db8b283def Merge branch '4.1-dev' 2017-04-14 19:47:55 +08:00
zuiidea 4f673b6e3a merge 2017-04-14 19:47:33 +08:00
zuiidea 3fa7ee9e01 update README 2017-04-14 19:38:28 +08:00
zuiidea b0f790ffaf update theme 2017-04-14 18:55:19 +08:00
zuiidea 4cf25852da userlogin 2017-04-14 11:45:00 +08:00
zuiidea 688d411dc1 request demo 2017-04-14 10:16:37 +08:00
zuiidea d5e763febc underline 2017-04-13 19:06:00 +08:00
zuiidea b03f2ac89c users 2017-04-13 19:00:32 +08:00
zuiidea 28efa1a67b mock 2017-04-13 18:31:48 +08:00
zuiidea a9ff576958 login 2017-04-10 23:33:10 +08:00
zuiidea 63e4fea0ca update roadhog 2017-04-10 21:06:31 +08:00
zuiidea f7616d524b update request 2017-04-01 17:53:06 +08:00
zuiidea 45d7abfbf4 fix bug 2017-04-01 16:46:32 +08:00
zuiidea c2c0ce0267 adjust 2017-04-01 15:25:45 +08:00
zuiidea d25b1cb5dc mock login 2017-04-01 14:47:42 +08:00
zuiidea 83f71c7d3e roadhog first commit 2017-04-01 12:04:03 +08:00
zuiidea 08fdd0d04f Merge pull request #159 from zuiidea/4.0-dev
fix getUserInfo
2017-03-31 21:05:51 +08:00
zuiidea 847f003cd8 fix getUserInfo 2017-03-31 21:04:33 +08:00
zuiidea 0be85a93b9 Merge pull request #158 from zuiidea/4.0-dev
user permissions
2017-03-31 20:31:50 +08:00
zuiidea 6c4733ff82 user permissions 2017-03-31 20:28:34 +08:00
zuiidea 6c4e347299 Merge pull request #152 from pmg1989/master
fix modal form
2017-03-30 11:47:44 +08:00
zuiidea f121b8884c Update skin.less 2017-03-30 11:47:26 +08:00
zuiidea 42c536b958 Update package.json 2017-03-30 11:47:05 +08:00
pmg1989 73bcc3901a fix modal form bug 2017-03-29 15:52:14 +08:00
pmg1989 870efa0771 Merge branch 'master' of github.com:pmg1989/antd-admin 2017-03-29 15:47:00 +08:00
pmg1989 d5e2af2e46 fix package.json 2017-03-29 15:46:35 +08:00
pmg1989 a3429133c3 fix package.json 2017-03-29 15:46:07 +08:00
zuiidea 71065c3922 Merge pull request #151 from zuiidea/4.0-dev
fix some bugs
2017-03-29 10:11:58 +08:00
zuiidea a5cb3c6fce fix some bugs 2017-03-28 20:50:02 +08:00
zuiidea cb1a955723 Merge pull request #147 from zuiidea/4.0-dev
4.0 dev
2017-03-27 20:28:41 +08:00
zuiidea e1a6f41192 dashboard 2017-03-27 20:27:58 +08:00
zuiidea e23cd6726f adjust dasheboard 2017-03-27 15:25:41 +08:00
zuiidea a85277ea82 adjust components DataTable 2017-03-27 15:09:36 +08:00
zuiidea efdf65a1f9 Merge pull request #144 from zuiidea/4.0-dev
adjust request
2017-03-27 14:42:48 +08:00
zuiidea 47c1fdcaff adjust request 2017-03-27 14:41:01 +08:00
zuiidea f649247a0e Merge pull request #142 from zuiidea/4.0-dev
4.0 dev
2017-03-24 20:34:56 +08:00
zuiidea f595f04a53 modify request 2017-03-24 20:32:27 +08:00
zuiidea d3c4912df3 requestPage 2017-03-24 19:25:17 +08:00
zuiidea 22c6365129 update request 2017-03-24 14:49:23 +08:00
zuiidea e5a184a568 Merge pull request #141 from zuiidea/4.0-dev
4.0 dev
2017-03-24 12:09:33 +08:00
zuiidea 3474b35966 Merge pull request #140 from zuiidea/master
Merge pull request #139 from zuiidea/4.0-dev
2017-03-24 12:07:00 +08:00
zuiidea 8227e61b64 delete extra layout filefold 2017-03-24 12:04:40 +08:00
zuiidea 1a11abb2f3 handle fileName 2017-03-24 11:57:57 +08:00
zuiidea 930c8427e0 handle FileName 2017-03-24 11:56:26 +08:00
zuiidea 8d4762fd0c Merge pull request #139 from zuiidea/4.0-dev
4.0 dev
2017-03-24 11:25:42 +08:00
zuiidea f0f9deb89a Merge branch 'master' into 4.0-dev 2017-03-24 11:25:36 +08:00
zuiidea 76d0af964f fileName fist word toLocaleUpperCase 2017-03-24 11:20:27 +08:00
zuiidea 4425a289e7 switch requst form robe-ajax to axios 2017-03-24 11:14:49 +08:00
zuiidea de68881f32 adjust layout 2017-03-23 19:30:00 +08:00
zuiidea 5c790b4215 Merge pull request #138 from xland/patch-1
delete useless code
2017-03-23 15:45:25 +08:00
liulun 2b24bcecf1 这几行代码没什么用 2017-03-23 15:21:02 +08:00
zuiidea 82351e60a6 Merge pull request #137 from zuiidea/4.0-dev
4.0 dev
2017-03-23 15:17:17 +08:00
zuiidea d71d66c80a add recharts 2017-03-23 15:14:13 +08:00
zuiidea a88f230071 add pre-commit 2017-03-23 11:11:36 +08:00
zuiidea 10bb0098d4 add UI Components: charts 2017-03-23 10:44:26 +08:00
zuiidea 9d011b9c75 add components:Editor 2017-03-23 09:57:31 +08:00
zuiidea c6227ba583 add Helmet 2017-03-22 10:49:16 +08:00
zuiidea 56ca4407ed Merge pull request #134 from zuiidea/4.0-dev
sorry,rebuild folder structure,😂
2017-03-21 16:44:55 +08:00
zuiidea 3585852fff sorry,rebuild folder structure,cry.. 2017-03-21 16:43:14 +08:00
zuiidea 30141661c2 update components DataTable 2017-03-20 17:45:08 +08:00
zuiidea d8ca570348 fix dataTable other fetch params 2017-03-20 10:58:26 +08:00
zuiidea 19d5c3c4bd fix request.js 2017-03-20 10:09:17 +08:00
zuiidea ec8f808b4d add components DataTable 2017-03-17 19:30:39 +08:00
zuiidea 741ba9e67a add eslint style for mock-folder 2017-03-17 10:27:52 +08:00
zuiidea ac6fdc5fba fix react-countup version 2017-03-16 16:59:18 +08:00
zuiidea 4dbbce5de7 Merge pull request #126 from pmg1989/master
fix menu style
2017-03-16 15:00:53 +08:00
pmg1989 6ab878061d 修复左侧栏菜单在key相同时,会同时选中bug 2017-03-16 14:58:20 +08:00
pmg1989 df1b53130f fix menu style 2017-03-16 14:36:58 +08:00
zuiidea f8a7eadf33 Merge pull request #125 from zuiidea/4.0-dev
fix sider-menu style
2017-03-16 13:36:32 +08:00
zuiidea 03539b3cc5 fix sider-menu style 2017-03-16 13:09:42 +08:00
zuiidea 8b9690fc69 Merge pull request #122 from zuiidea/4.0-dev
4.0 dev
2017-03-15 17:46:33 +08:00
zuiidea 4847dcb335 Merge branch 'master' into 4.0-dev 2017-03-15 17:46:28 +08:00
zuiidea 73abfd7009 Merge pull request #120 from catest/patch-1
Update src/components/users/modal.js
2017-03-15 17:41:09 +08:00
zuiidea e1b543969d Merge pull request #121 from catest/patch-2
修改git clone
2017-03-15 17:40:59 +08:00
zuiidea 8c9e9179e0 add: standard.md 2017-03-15 17:40:45 +08:00
catest 7869326836 修改git clone
https://github.com/zuiidea/antd-admin.git
2017-03-15 17:24:36 +08:00
catest a3cf837e5c Update src/components/users/modal.js
<Form horizontal>已弃用,改成<Form layout="horizontal">
2017-03-15 17:20:24 +08:00
zuiidea 9a89b7f4cd For static build 2017-03-15 16:42:35 +08:00
zuiidea 8bb1e1f964 updateReademe 2017-03-15 16:36:45 +08:00
zuiidea a6f2a2a67a add: ui-component layer 2017-03-15 16:31:43 +08:00
zuiidea b715b72041 Ajust router.js 2017-03-14 20:14:58 +08:00
zuiidea c43910f235 add gitignore 2017-03-14 20:04:48 +08:00
zuiidea 47e7d580bb eslint apply all 2017-03-14 20:03:21 +08:00
zuiidea 23540e4394 add eslintrc and aplly to src/ui 2017-03-14 16:44:54 +08:00
zuiidea db5105e482 add:standard-js 2017-03-14 14:25:17 +08:00
zuiidea 66ee718374 Adjust theme font-family 2017-03-14 11:44:59 +08:00
zuiidea 9492aa6d86 add: dva-loading 2017-03-13 18:11:57 +08:00
zuiidea 0e8434e32b add: dva-loading 2017-03-13 18:03:28 +08:00
zuiidea cdc607ba07 add:ui-components 2017-03-13 16:15:28 +08:00
zuiidea 41184c549a 'add:babel-polyfill' 2017-03-12 22:32:13 +08:00
zuiidea ed5125a27b fix request data 2017-03-09 15:22:21 +08:00
zuiidea c0600658e5 add readme 2017-03-07 15:29:46 +08:00
zuiidea 1f796a9a23 add demo : local-image as background 2017-03-07 15:13:51 +08:00
zuiidea 48e343450f add ajax param 2017-03-07 15:01:59 +08:00
zuiidea 0d9127fda2 propTypes 2017-03-01 20:09:59 +08:00
zuiidea 60c046b200 fix build 2017-02-28 17:29:03 +08:00
zuiidea 85cf4af52c Merge pull request #91 from pmg1989/3.0
publicPath from webpack.config.js to package.json
2017-02-28 12:45:33 +08:00
pmg1989 cc77167efb publicPath from webpack.config.js to package.json 2017-02-28 12:09:15 +08:00
zuiidea 6466276d0b chunkName 2017-02-27 22:29:45 +08:00
zuiidea c5dc892300 add user-IsMotion 2017-02-27 22:15:13 +08:00
zuiidea f303d0ae3c fix 移动端模式下菜单不可见 2017-02-26 22:04:12 +08:00
zuiidea 86de7f1658 fix 侧边收展时跳白块 2017-02-26 21:11:23 +08:00
zuiidea ff6e601777 code style 2017-02-25 22:08:01 +08:00
zuiidea 9bc01e4170 Merge pull request #83 from pmg1989/3.0
列表动画提取TableBodyWrapper.js组件
2017-02-25 21:50:36 +08:00
pmg1989 547811ced9 列表动画提取TableBodyWrapper.js组件 2017-02-25 21:40:02 +08:00
zuiidea 3106b2488e Merge pull request #82 from pmg1989/3.0
hashHistory to browserHistory
2017-02-25 20:48:56 +08:00
pmg1989 e03316423f hashHistory to browserHistory 2017-02-25 15:19:27 +08:00
zuiidea a07b2a6b0e update antd 2017-02-23 14:02:12 +08:00
zuiidea 86f08fb914 option style 2017-02-20 22:15:34 +08:00
zuiidea 702b3cc196 js format 2017-02-14 21:45:55 +08:00
zuiidea b9f8912c86 i dont know 2017-02-14 21:06:33 +08:00
zuiidea b8d98947e6 fix:单行动画 2017-02-13 23:03:57 +08:00
zuiidea 7716b24933 Merge pull request #73 from pmg1989/3.0
users-motion rc-tween-one 优化
2017-02-13 11:21:58 +08:00
felixpmg 26bff8fbb7 users-motion rc-tween-one 优化 2017-02-12 14:49:47 +08:00
zuiidea 136b61e9e3 Merge branch '3.0' of github.com:zuiidea/antd-admin into 3.0 2017-02-12 09:45:05 +08:00
zuiidea 11977625d2 Merge pull request #71 from pmg1989/3.0
优化侧边栏导航刷新后依旧能展开选中当前地址的菜单项
2017-02-12 09:41:54 +08:00
felixpmg ceabac1a14 优化 users-motion 2017-02-12 00:26:38 +08:00
felixpmg d1ffb7e3e9 优化侧边栏导航刷新后依旧能展开选中当前地址的菜单项 2017-02-10 22:25:11 +08:00
zuiidea 64c152fb2d 修改操作样式 2017-02-10 16:20:39 +08:00
zuiidea 46ff98b8af add:users-motion 2017-02-10 15:27:31 +08:00
zuiidea c97cf3e4f5 add:user-motion 2017-02-09 23:37:23 +08:00
zuiidea 4def8c5d70 add:userMotion 2017-02-09 22:33:32 +08:00
zuiidea 803d8ac72c add:badge 2017-02-06 11:20:10 +08:00
zuiidea 2df2b36d33 fix:sider zIndex;fix:search repeat request data 2017-02-05 22:05:53 +08:00
zuiidea 0700bcd700 fix:Table's rowKey;antd upgrade 2017-02-05 22:00:06 +08:00
zuiidea 184613d003 menu overflow-x hidden 2017-02-03 19:47:28 +08:00
zuiidea a1642fa671 menu overflow-x hidden 2017-02-03 19:01:03 +08:00
zuiidea a2abe411c4 fix:sidebar scroll and fold overflow visible 2017-01-30 23:38:16 +08:00
zuiidea ff84e3df7d Merge branch '3.0' of github.com:zuiidea/antd-admin into 3.0 2017-01-24 19:33:46 +08:00
zuiidea 3b4040e481 browser row-key 2017-01-23 20:48:39 +08:00
zuiidea 570bc90d6a Merge pull request #47 from zhongjie-chen/3.0
users page modal title
2017-01-22 16:06:57 +08:00
Jason e440013cee 标题区分(新建用户 修改用户) 2017-01-22 15:45:04 +08:00
zuiidea 964e702b6d Merge branch '3.0' of github.com:zuiidea/antd-admin into 3.0 2017-01-22 10:04:32 +08:00
zuiidea e2b27696c8 Merge pull request #45 from pmg1989/3.0
新增了页面刷新后,首次请求数据可以同时带关键字搜索与页码过滤功能
2017-01-21 17:27:26 +08:00
zuiidea d6dbde5382 pagination 2017-01-21 17:26:22 +08:00
felixpan 91b86a3b6c 修复了带关键字搜索时分页跳转bug;新增了页面刷新后,首次请求数据可以同时带关键字搜索与页码过滤功能 2017-01-21 00:47:28 +08:00
felixpan 26fba238a0 修复嵌套路由注销失败bug 2017-01-21 00:13:15 +08:00
zuiidea eb78f6c226 request 2017-01-18 22:10:13 +08:00
zuiidea ff2005d262 fix upgrad dva@1.2 2017-01-17 22:00:30 +08:00
zuiidea 60ff1ec0bb fix:menu vertical 2017-01-13 22:42:54 +08:00
zuiidea f41f4bcf29 Merge branch '3.0' of github.com:zuiidea/antd-admin into 3.0 2017-01-12 21:57:02 +08:00
zuiidea 78eab2b15c add demo.gif 2017-01-12 21:54:44 +08:00
zuiidea 4a68e64e81 logout loading 2017-01-12 21:39:35 +08:00
zuiidea 5e5a8f86eb page 2017-01-12 13:38:45 +08:00
zuiidea bcf9307b22 Merge pull request #29 from 0neSe7en/dev
feat(Search): add "onPressEnter" callback to search input.
2017-01-11 21:26:23 +08:00
wsy 428bfcb3a5 feat(Search): add "onPressEnter" callback to search input. 2017-01-11 16:17:58 +08:00
zuiidea 142b059fc3 fix:#28登录后点击回车跳到登录页 2017-01-10 18:26:05 +08:00
zuiidea 9452df8e0e siderMenu scrollbar 2017-01-10 14:27:34 +08:00
zuiidea 4944844522 Merge branch '3.0' of github.com:zuiidea/antd-admin into 3.0 2017-01-10 14:14:12 +08:00
zuiidea 59b40a2286 Merge pull request #26 from paranoidjk/3.0
fix: 修复侧边栏菜单超长无法滚动的问题
2017-01-10 14:13:00 +08:00
zuiidea e2f0c9b5cb Merge branch '3.0' of github.com:zuiidea/antd-admin into 3.0 2017-01-10 14:12:08 +08:00
zuiidea 7a98a485ab Merge pull request #23 from YehanZhou/patch-1
Update app.js
2017-01-10 14:11:17 +08:00
paranoidjk c1f5384d41 fix: 修复侧边栏菜单超长无法滚动的问题 2017-01-10 12:17:15 +08:00
zuiidea e78a487984 table width 2017-01-09 23:14:43 +08:00
zuiidea 9963e753d4 Search Doc 2017-01-09 23:02:21 +08:00
zuiidea 41ed8233b7 switchMenuPopover 2017-01-09 22:19:41 +08:00
zuiidea bf9e720500 less styles 2017-01-09 21:57:01 +08:00
zuiidea d0974b22bd search components 2017-01-08 22:56:29 +08:00
zuiidea bb1b7e9d4b search 2017-01-07 21:30:48 +08:00
zuiidea 0e7c34a8d4 search 2017-01-05 18:45:52 +08:00
Yehan Zhou 03db3a3bcf Update app.js 2017-01-05 17:16:20 +08:00
zuiidea dd3b4a8a80 theme 2017-01-04 14:24:12 +08:00
zuiidea 44037be442 antd upgrad 2017-01-04 10:33:55 +08:00
zuiidea 27ac1b0583 login 2017-01-03 16:34:43 +08:00
zuiidea 87af30c4b6 😪 js-standard 2017-01-03 16:15:38 +08:00
zuiidea 49d700a5c8 table 2016-12-30 20:18:03 +08:00
zuiidea 960ab30a33 navbar 2016-12-29 23:38:25 +08:00
zuiidea 75884305a0 😪 2016-12-29 22:34:05 +08:00
zuiidea e4bda2c3ae letter 2016-12-29 22:18:03 +08:00
zuiidea 61861789da letter 2016-12-29 22:17:33 +08:00
zuiidea 85b0069199 readme 2016-12-28 19:18:32 +08:00
zuiidea 9c5b3fdc68 dy-router 2016-12-28 00:16:25 +08:00
zuiidea 6af4dc9303 dy-router 2016-12-28 00:10:24 +08:00
zuiidea 6b108497cc dy-router 2016-12-28 00:03:59 +08:00
zuiidea 5c0a9c0e08 disableNpmInstall 2016-12-27 22:57:28 +08:00
zuiidea 8e678bbae6 dva-loading 2016-12-27 22:06:08 +08:00
zuiidea 5aca96bde8 user 2016-12-26 19:40:00 +08:00
zuiidea cebb9c5180 cpu.less 2016-12-26 18:03:39 +08:00
zuiidea 586e716380 cpu 2016-12-26 17:56:52 +08:00
zuiidea 0a7bfcd478 props 2016-12-26 09:51:02 +08:00
zuiidea fdba67e613 ico 2016-12-25 18:57:57 +08:00
zuiidea a79139fbc9 ico 2016-12-25 18:15:07 +08:00
zuiidea 7e521d5f05 ico 2016-12-24 23:19:32 +08:00
zuiidea ffdde1815b readme 2016-12-24 22:30:34 +08:00
zuiidea 35dbf3772b config 2016-12-23 14:45:19 +08:00
zuiidea bd01b7e777 browser 2016-12-21 22:47:59 +08:00
zuiidea a9f3b3338d COMPLETED 2016-12-21 21:57:34 +08:00
zuiidea 4500218a1f commentd 2016-12-21 21:26:41 +08:00
zuiidea 8ce7a5d48b comments 2016-12-21 21:19:33 +08:00
zuiidea 2b267a086b add demo2.gif 2016-12-20 22:58:15 +08:00
zuiidea f325dfc79d recentsales 2016-12-20 22:46:15 +08:00
zuiidea 0e7c89c885 rencentsales 2016-12-20 22:04:48 +08:00
zuiidea e3b4ecc491 avatar 2016-12-15 23:02:34 +08:00
zuiidea 6c9fb19770 dashbord mockdata 2016-12-15 22:57:02 +08:00
zuiidea 7a1d157893 dashbord mock 2016-12-15 22:37:53 +08:00
zuiidea f49ed470bd weathe - [x] r 2016-12-15 00:07:18 +08:00
zuiidea 0e3dcb2c67 weather 2016-12-14 23:46:47 +08:00
zuiidea e9c361a8a9 weather 2016-12-14 23:11:56 +08:00
zuiidea 67dd886130 666 2016-12-14 14:05:36 +08:00
zuiidea 7fd8bcdcc6 mockStorge 2016-12-14 00:19:41 +08:00
zuiidea 5030c91f47 prefix 2016-12-13 23:37:48 +08:00
zuiidea 48894e63aa prefix 2016-12-13 23:34:04 +08:00
zuiidea ad0050ee54 mock storge 2016-12-13 09:31:29 +08:00
zuiidea ef61551341 get data 2016-12-12 23:36:59 +08:00
zuiidea f0ca3f172c Weather 2016-12-12 22:53:01 +08:00
zuiidea 83eebe75e5 weather 2016-12-12 22:27:02 +08:00
zuiidea 50ceb8c825 readme 2016-12-08 09:56:29 +08:00
zuiidea b2c675cc7a readme 2016-12-07 09:33:19 +08:00
zuiidea 79e1608ece readme 2016-12-06 23:34:11 +08:00
zuiidea 8021306124 Quote 2016-12-06 22:51:21 +08:00
zuiidea f27aca76b2 countup 2016-12-06 22:00:04 +08:00
zuiidea dd1dd9390a readme 2016-12-06 21:41:52 +08:00
zuiidea 5c196033d9 LICENSE 2016-12-06 10:30:26 +08:00
zuiidea f8f3b78aa1 delete dist 2016-12-05 22:37:44 +08:00
zuiidea 0c78dd3f96 ignore 2016-12-05 22:35:03 +08:00
zuiidea 9c2a906b58 dist 2016-12-05 22:17:08 +08:00
zuiidea c011849708 siderconfig 2016-12-05 21:18:45 +08:00
zuiidea a77817673e demo.gif 2016-12-04 00:13:41 +08:00
zuiidea f8e64d2dc6 logs 2016-12-03 23:59:50 +08:00
zuiidea 5258670e86 url active menu 2016-12-03 23:46:22 +08:00
zuiidea 3d8a952f5f enter login 2016-12-03 23:38:47 +08:00
zuiidea ff7c26ced6 update 2016-12-03 23:10:47 +08:00
zuiidea 63d214e45a light theme 2016-12-03 22:38:07 +08:00
zuiidea 186f19cb65 sider 2016-11-30 18:57:19 +08:00
zuiidea e5bdd3b986 header 2016-11-30 15:18:43 +08:00
zuiidea 9838392c43 sider fold 2016-11-30 10:30:58 +08:00
zuiidea 3178f2d864 side gold 2016-11-29 23:05:26 +08:00
zuiidea 82e98b5838 side fold 2016-11-29 23:04:01 +08:00
zuiidea 3fdeb2fa0b sider fold 2016-11-29 22:53:04 +08:00
zuiidea 56f8ffe389 side fold 2016-11-29 22:06:35 +08:00
zuiidea b781d9d4c8 switchSIder 2016-11-28 23:59:53 +08:00
zuiidea 6a54b616ec dashbord layout 2016-11-28 23:31:15 +08:00
zuiidea 7f0e81d8b9 sales charts 2016-11-28 22:46:16 +08:00
zuiidea 6c50086d92 dashbord chart 2016-11-25 23:02:13 +08:00
zuiidea 4b55dbccb9 theme 2016-11-24 23:58:27 +08:00
zuiidea 2320fe5af5 add theme 2016-11-24 23:08:58 +08:00
zuiidea ace8c2568f dashbord 2016-11-24 14:19:23 +08:00
zuiidea 5cf8923442 number card 2016-11-23 23:51:09 +08:00
zuiidea 7f1bd1c08a numbercard 2016-11-23 23:16:53 +08:00
zuiidea 5150f5f84b yarn and assets 2016-11-22 22:18:18 +08:00
zuiidea dce274a8a1 spin 2016-11-07 23:50:33 +08:00
zuiidea c45d6c969b update antd 2016-11-07 23:36:05 +08:00
zuiidea bdb6142776 readme 2016-11-04 21:07:19 +08:00
zuiidea ca92904714 loading 2016-11-03 23:39:27 +08:00
zuiidea f4a108cfc1 logout 2016-11-02 22:35:07 +08:00
zuiidea bf6724f7f1 loginOut 2016-11-02 22:27:39 +08:00
zuiidea 5e8c9875d0 getUserInfo 2016-11-01 00:44:03 +08:00
zuiidea 113c81a627 login 2016-10-31 23:52:30 +08:00
zuiidea 7332df42c5 login 2016-10-29 22:13:22 +08:00
zuiidea 8960d4666e login 2016-10-28 00:29:49 +08:00
zuiidea 4642ba700c login 2016-10-27 22:27:45 +08:00
zuiidea 3081a9d4b9 login.js 2016-10-25 21:09:50 +08:00
zuiidea d20c0ddb26 fixed data type 2016-10-24 14:05:01 +08:00
zuiidea e94c26f06f userdatalist 2016-10-23 21:56:39 +08:00
zuiidea 912eb205b7 666 2016-10-22 23:29:54 +08:00
zuiidea ee5e064573 README 2016-10-21 17:14:05 +08:00
zuiidea a8643a6e55 update README 2016-10-20 21:40:56 +08:00
zuiidea 00a28000e4 users 2016-10-20 21:33:30 +08:00
zuiidea 6307e31366 local mock data 2016-10-19 17:25:46 +08:00
zuiidea 1918e132e7 update packge.json 2016-10-19 15:07:42 +08:00
zuiidea 9bd3d71ea9 local mock data 2016-10-19 15:06:23 +08:00
zuiidea e50cd23c81 loacl mosk 2016-10-18 22:54:33 +08:00
zuiidea 7797bf1487 build 2016-10-17 23:23:20 +08:00
zuiidea 042b4c728e user datas 2016-10-17 20:40:36 +08:00
zuiidea 23b32b332e error page 2016-10-16 23:05:18 +08:00
zuiidea 0255f197f4 bread 2016-10-15 01:53:58 +08:00
zuiidea 8c12c1690d bread 2016-10-15 01:25:55 +08:00
zuiidea c95eb1c888 sider menu color 2016-10-14 22:03:30 +08:00
zuiidea 2a750ea65b sider menu 2016-10-14 21:21:24 +08:00
zuiidea 1a3ea0f244 main layout 2016-10-14 00:26:36 +08:00
zuiidea 0119dfdc2a layout 2016-10-14 00:02:33 +08:00
zuiidea 019074d42c remove ; 2016-10-13 01:12:44 +08:00
zuiidea f2176ba3a7 update pakge.json 2016-10-13 00:57:29 +08:00
zuiidea 8b158a29e3 users 2016-10-12 20:37:43 +08:00
zuiidea 24998e990f user-dashbord 2016-10-11 22:16:28 +08:00
zuiidea 34ccb19f4c user 2016-10-10 22:25:56 +08:00
zuiidea fda47b362c 66 2016-10-10 22:11:11 +08:00
zuiidea f4c670bb20 readme 2016-10-10 21:53:42 +08:00
zuiidea 4f666a6a6d dva-init 2016-10-08 22:42:16 +08:00
zuiidea 62cccd4154 dva 2016-10-08 22:31:19 +08:00
zuiidea ad92f03f2d repair breadcrumb and routers 2016-09-19 23:09:41 +08:00
zuiidea 62f37008d3 listdata 2016-09-19 19:58:17 +08:00
zuiidea edd028b1bb datalist 2016-09-17 23:36:15 +08:00
zuiidea c204c95bba rewrite ajax 2016-09-17 16:17:20 +08:00
zuiidea 0740f644a4 some clean 2016-09-17 14:45:49 +08:00
zuiidea c576487d22 add fetchjs 2016-09-16 23:37:43 +08:00
zuiidea a0c6554d46 production config 2016-09-16 18:33:04 +08:00
zuiidea eaa1f283ac list page 2016-09-13 23:57:20 +08:00
zuiidea 9889415034 list page 2016-09-13 23:50:47 +08:00
zuiidea 1d368d724d add login loading 2016-09-12 23:27:11 +08:00
zuiidea 4ded5dbf91 main layout 2016-09-12 00:24:41 +08:00
zuiidea 02babf74f7 some layout 2016-09-11 22:55:25 +08:00
zuiidea 8a4d961124 css-loder 2016-09-11 19:01:59 +08:00
zuiidea 85e350107d some config 2016-09-11 18:08:34 +08:00
zuiidea 0daeffe463 eslint view 2016-09-11 17:12:05 +08:00
zuiidea c64478239a add demo address 2016-09-11 16:32:47 +08:00
zuiidea da50a1ac70 signIn 2016-09-11 01:31:53 +08:00
zuiidea cbab25a4fe signIn 2016-09-11 00:30:35 +08:00
zuiidea 4ec30d9cd7 signIn 2016-09-10 23:42:56 +08:00
zuiidea da3a989b29 new App 2016-09-10 23:25:21 +08:00
zuiidea 6a03018ab5 readme 2016-09-09 22:56:40 +08:00
zuiidea 07ebd3d862 6666 2016-09-09 22:54:55 +08:00
zuiidea 9077b5ff30 reinit 2016-09-08 21:49:18 +08:00
zuiidea 9838869517 admin-demo 2016-01-27 16:56:51 +08:00
zuiidea c42024fbed ant-demo
ant-demo
2016-01-25 15:45:58 +08:00
241 changed files with 29516 additions and 372 deletions
+16
View File
@@ -0,0 +1,16 @@
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
+3
View File
@@ -0,0 +1,3 @@
BROWSER=none
HOST=0.0.0.0
PORT=7000
+7
View File
@@ -0,0 +1,7 @@
src/**/*-test.js
src/public
src/routes/chart/ECharts/theme
src/routes/chart/highCharts/mapdata
src/locales/_build/
src/locales/**/*.js
docs/**/*.js
+8
View File
@@ -0,0 +1,8 @@
{
"extends": "react-app",
"rules": {
"jsx-a11y/href-no-hash": "off",
"no-console": "warn",
"valid-jsdoc": "warn"
}
}
+8
View File
@@ -0,0 +1,8 @@
> 请酌情提供细节,并保持issue精简便于查阅
> 1. 功能需求 => 详细说明
> 2. Bug反馈
> 2.1 简单描述下报错
> 2.2 你期望什么结果
> 2.3 如何操作导致的
> 2.4 可提供运行环境信息
> 3. 代码求助 => 可以提,未必及时答复
+21 -5
View File
@@ -1,7 +1,23 @@
*.log
.cache
.DS_Store
.idea
build
coverage
dist
node_modules
npm-debug.log
yarn-error.log
yarn.lock
package-lock.json
# ide
.idea
# Mac General
.DS_Store
.AppleDouble
.LSOverride
# umi
.umi
.umi-production
# jslingui
src/locales/_build
src/locales/**/*.js
+6
View File
@@ -0,0 +1,6 @@
*.svg
*.ejs
.DS_Store
.umi
.umi-production
src/locales/**/*.json
+5
View File
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
}
+9
View File
@@ -0,0 +1,9 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-prettier"],
"rules": {
"declaration-empty-line-before": null,
"no-descending-specificity": null,
"selector-pseudo-class-no-unknown": null,
"selector-pseudo-element-colon-notation": null
}
}
+18
View File
@@ -0,0 +1,18 @@
language: node_js
node_js:
- node
script:
- npm run build
before_install:
- yarn global add now
after_script:
- |
if [[ $TRAVIS_BRANCH == 'master' ]]; then
echo $PROD_SITE_NOW_CONFIG >> dist/vercel.json && echo $PROD_DOC_NOW_CONFIG >> docs/vercel.json;
else
echo $DEV_SITE_NOW_CONFIG >> dist/vercel.json && echo $DEV_DOC_NOW_CONFIG >> docs/vercel.json;
fi
- cd ./dist
- now -A vercel.json -t $NOW_TOKEN --prod -c
- cd ../docs
- now -A vercel.json -t $NOW_TOKEN --prod -c
+132
View File
@@ -0,0 +1,132 @@
// https://umijs.org/config/
import { resolve } from 'path'
const fs = require('fs')
const path = require('path')
const lessToJs = require('less-vars-to-js')
const isDevelopment = process.env.NODE_ENV === 'development'
// how to speed compile: https://umijs.org/guide/boost-compile-speed
export default {
// IMPORTANT! change next line to yours or delete. And hide in dev
publicPath: isDevelopment ? '/' : 'https://cdn.antd-admin.zuiidea.com/',
alias: {
api: resolve(__dirname, './src/services/'),
components: resolve(__dirname, './src/components'),
config: resolve(__dirname, './src/utils/config'),
themes: resolve(__dirname, './src/themes'),
utils: resolve(__dirname, './src/utils'),
},
antd: {},
// a lower cost way to genereate sourcemap, default is cheap-module-source-map, could save 60% time in dev hotload
devtool: 'eval',
dva: { immer: true },
dynamicImport: {
loading: 'components/Loader/Loader',
},
extraBabelPresets: ['@lingui/babel-preset-react'],
extraBabelPlugins: [
[
'import',
{
libraryName: 'lodash',
libraryDirectory: '',
camel2DashComponentName: false,
},
'lodash',
],
[
'import',
{
libraryName: '@ant-design/icons',
libraryDirectory: 'es/icons',
camel2DashComponentName: false,
},
'ant-design-icons',
],
],
hash: true,
ignoreMomentLocale: true,
// umi3 comple node_modules by default, could be disable
nodeModulesTransform: {
type: 'none',
exclude: [],
},
// Webpack Configuration
proxy: {
'/api/v1/weather': {
target: 'https://api.seniverse.com/',
changeOrigin: true,
pathRewrite: { '^/api/v1/weather': '/v3/weather' },
},
},
targets: { ie: 9 },
// Theme for antd
// https://ant.design/docs/react/customize-theme
theme: lessToJs(
fs.readFileSync(path.join(__dirname, './src/themes/default.less'), 'utf8')
),
chainWebpack: function (config, { webpack }) {
config.merge({
optimization: {
minimize: true,
splitChunks: {
chunks: 'all',
minSize: 30000,
minChunks: 3,
automaticNameDelimiter: '.',
cacheGroups: {
react: {
name: 'react',
priority: 20,
test: /[\\/]node_modules[\\/](react|react-dom|react-dom-router)[\\/]/,
},
antd: {
name: 'antd',
priority: 20,
test: /[\\/]node_modules[\\/](antd|@ant-design\/icons)[\\/]/,
},
'echarts-gl': {
name: 'echarts-gl',
priority: 30,
test: /[\\/]node_modules[\\/]echarts-gl[\\/]/,
},
zrender: {
name: 'zrender',
priority: 30,
test: /[\\/]node_modules[\\/]zrender[\\/]/,
},
echarts: {
name: 'echarts',
priority: 20,
test: /[\\/]node_modules[\\/](echarts|echarts-for-react|echarts-liquidfill)[\\/]/,
},
highcharts: {
name: 'highcharts',
priority: 20,
test: /[\\/]node_modules[\\/]highcharts[\\/]/,
},
recharts: {
name: 'recharts',
priority: 20,
test: /[\\/]node_modules[\\/]recharts[\\/]/,
},
draftjs: {
name: 'draftjs',
priority: 30,
test: /[\\/]node_modules[\\/](draft-js|react-draft-wysiwyg|draftjs-to-html|draftjs-to-markdown)[\\/]/,
},
async: {
chunks: 'async',
minChunks: 2,
name: 'async',
maxInitialRequests: 1,
minSize: 0,
priority: 5,
reuseExistingChunk: true,
},
},
},
},
})
},
}
-1
View File
@@ -1 +0,0 @@
+22
View File
@@ -0,0 +1,22 @@
MIT LICENSE
Copyright (c) 2016 zuiidea (zuiiidea@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+87
View File
@@ -0,0 +1,87 @@
<p align="center">
<a href="http://github.com/zuiidea/antd-admin">
<img alt="antd-admin" height="64" src="./docs/_media/logo.svg">
</a>
</p>
<h1 align="center">AntD Admin</h1>
<div align="center">
一套优秀的中后台前端解决方案
[![antd](https://img.shields.io/badge/antd-^3.10.0-blue.svg?style=flat-square)](https://github.com/ant-design/ant-design)
[![umi](https://img.shields.io/badge/umi-^2.2.1-orange.svg?style=flat-square)](https://github.com/umijs/umi)
[![GitHub issues](https://img.shields.io/github/issues/zuiidea/antd-admin.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/issues)
[![MIT](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](http://opensource.org/licenses/MIT)
![Travis (.org)](https://img.shields.io/travis/zuiidea/antd-admin.svg)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/pulls)
[![Gitter](https://img.shields.io/gitter/room/antd-admin/antd-admin.svg)](https://gitter.im/antd-admin/antd-admin)
</div>
- 在线演示 - [https://antd-admin.zuiidea.com](https://antd-admin.zuiidea.com)
- 使用文档 - [https://doc.antd-admin.zuiidea.com/#/zh-cn/](https://doc.antd-admin.zuiidea.com/#/zh-cn/)
- 常见问题 - [https://doc.antd-admin.zuiidea.com/#/zh-cn/faq](https://doc.antd-admin.zuiidea.com/#/zh-cn/faq)
- 更新日志 - [https://doc.antd-admin.zuiidea.com/#/zh-cn/change-log](https://doc.antd-admin.zuiidea.com/#/zh-cn/change-log)
[English](./README.md) | 简体中文
## 特性
- 国际化,源码中抽离翻译字段,按需加载语言包
- 动态权限,不同权限对应不同菜单
- 优雅美观,Ant Design 设计体系
- Mock 数据,本地数据调试
## 使用
1. 下载项目代码。
```bash
git clone https://github.com/zuiidea/antd-admin.git my-project
cd my-project
```
2. 进入目录安装依赖,国内用户推荐使用 [cnpm](https://cnpmjs.org) 进行加速。
```bash
yarn install
```
或者
```bash
npm install
```
3. 启动本地服务器。
```bash
npm run start
```
4. 启动完成后打开浏览器访问 [http://localhost:7000](http://localhost:7000),如果需要更改启动端口,可在 `.env` 文件中配置。
> 更多信息请参考 [使用文档](https://doc.antd-admin.zuiidea.com/#/zh-cn/)。
## 支持环境
现代浏览器。
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
| --------- | --------- | --------- | --------- | --------- |
|IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
## 参与贡献
我们非常欢迎你的贡献,你可以通过以下方式和我们一起共建 :smiley:
- 在你的公司或个人项目中使用 AntD Admin。
- 通过 [Issue](http://github.com/zuiidea/antd-admin/issues) 报告 bug 或进行咨询。
- 提交 [Pull Request](http://github.com/zuiidea/antd-admin/pulls) 改进代码。
> 强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)、[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545) 和 [《如何有效地报告 Bug》](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html)、[《如何向开源项目提交无法解答的问题》](https://zhuanlan.zhihu.com/p/25795393),更好的问题更容易获得帮助。
+86
View File
@@ -0,0 +1,86 @@
<p align="center">
<a href="http://github.com/zuiidea/antd-admin">
<img alt="antd-admin" height="64" src="./docs/_media/logo.svg">
</a>
</p>
<h1 align="center">AntD Admin</h1>
<div align="center">
An excellent front-end solution for enterprise applications.
[![antd](https://img.shields.io/badge/antd-^4.0.0-blue.svg?style=flat-square)](https://github.com/ant-design/ant-design)
[![umi](https://img.shields.io/badge/umi-^2.2.1-orange.svg?style=flat-square)](https://github.com/umijs/umi)
[![GitHub issues](https://img.shields.io/github/issues/zuiidea/antd-admin.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/issues)
[![MIT](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](http://opensource.org/licenses/MIT)
![Travis (.org)](https://img.shields.io/travis/zuiidea/antd-admin.svg)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/pulls)
[![Gitter](https://img.shields.io/gitter/room/antd-admin/antd-admin.svg)](https://gitter.im/antd-admin/antd-admin)
</div>
- Preview - [https://antd-admin.zuiidea.com](https://antd-admin.zuiidea.com)
- Documentation - [https://doc.antd-admin.zuiidea.com](https://doc.antd-admin.zuiidea.com)
- FAQ - [https://doc.antd-admin.zuiidea.com/#/faq](https://doc.antd-admin.zuiidea.com/#/faq)
- ChangeLog - [https://doc.antd-admin.zuiidea.com/#/change-log](https://doc.antd-admin.zuiidea.com/#/change-log)
English | [简体中文](./README-zh_CN.md)
## Features
- Internationalization, extracting translation fields from source code, loading language packs on demand
- Dynamic permissions, different permissions for different menus
- Elegant and beautiful, Ant Design system
- Mock data, local data debugging
## Usage
1. Clone project code.
```bash
git clone https://github.com/zuiidea/antd-admin.git my-project
cd my-project
```
2. Installation dependence.
```bash
yarn install
```
Or
```bash
npm install
```
3. Start local server.
```bash
npm run start
```
4. After the startup is complete, open a browser and visit [http://localhost:7000](http://localhost:7000), If you need to change the startup port, you can configure it in the `.env` file.
> More instructions at [documentation](https://doc.antd-admin.zuiidea.com)。
## Browsers support
Modern browsers.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
| --------- | --------- | --------- | --------- | --------- |
|IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
## Contributing
We very much welcome your contribution, you can build together with us in the following ways :smiley:
- Use Ant Design Pro in your daily work.
- Submit [GitHub issues](http://github.com/zuiidea/antd-admin/issues)s to report bugs or ask questions.
- Propose [Pull Request](http://github.com/zuiidea/antd-admin/pulls) to improve our code.
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
webpackJsonp([10],{49:126,55:function(e,t,l){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=l(9),d=a(n),r=l(19),u=a(r),c=l(1),s=a(c),o=l(3),i=a(o),f=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&(l[a[n]]=e[a[n]]);return l};t["default"]=function(e){var t,l=e.prefixCls,a=void 0===l?"ant-card":l,n=e.className,r=e.extra,c=e.bodyStyle,o=e.title,m=e.loading,p=e.bordered,y=void 0===p||p,E=f(e,["prefixCls","className","extra","bodyStyle","title","loading","bordered"]),b=e.children,g=(0,i["default"])(a,n,(t={},(0,u["default"])(t,a+"-loading",m),(0,u["default"])(t,a+"-bordered",y),t));m&&(b=s["default"].createElement("div",null,s["default"].createElement("p",{className:a+"-loading-block",style:{width:"94%"}}),s["default"].createElement("p",null,s["default"].createElement("span",{className:a+"-loading-block",style:{width:"28%"}}),s["default"].createElement("span",{className:a+"-loading-block",style:{width:"62%"}})),s["default"].createElement("p",null,s["default"].createElement("span",{className:a+"-loading-block",style:{width:"22%"}}),s["default"].createElement("span",{className:a+"-loading-block",style:{width:"66%"}})),s["default"].createElement("p",null,s["default"].createElement("span",{className:a+"-loading-block",style:{width:"56%"}}),s["default"].createElement("span",{className:a+"-loading-block",style:{width:"39%"}})),s["default"].createElement("p",null,s["default"].createElement("span",{className:a+"-loading-block",style:{width:"21%"}}),s["default"].createElement("span",{className:a+"-loading-block",style:{width:"15%"}}),s["default"].createElement("span",{className:a+"-loading-block",style:{width:"40%"}}))));var k=void 0;return k=o?"string"==typeof o?s["default"].createElement("div",{className:a+"-head"},s["default"].createElement("h3",{className:a+"-head-title"},o)):s["default"].createElement("div",{className:a+"-head"},s["default"].createElement("div",{className:a+"-head-title"},o)):null,s["default"].createElement("div",(0,d["default"])({},E,{className:g}),k,r?s["default"].createElement("div",{className:a+"-extra"},r):null,s["default"].createElement("div",{className:a+"-body",style:c},b))},e.exports=t["default"]},56:[1570,63],63:20,1454:function(e,t,l){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=(l(196),l(195)),d=a(n),r=(l(126),l(115)),u=a(r),c=(l(753),l(752)),s=a(c),o=(l(49),l(125)),i=a(o),f=(l(56),l(55)),m=a(f),p=l(1),y=a(p),E=l(207),b=function(){return y["default"].createElement("div",{className:"content-inner"},y["default"].createElement(u["default"],{gutter:32},y["default"].createElement(i["default"],{lg:8,md:12},y["default"].createElement(m["default"],{title:"\u9ed8\u8ba4"},y["default"].createElement(E.DropOption,{menuOptions:[{key:"1",name:"\u7f16\u8f91"},{key:"2",name:"\u5220\u9664"}]}))),y["default"].createElement(i["default"],{lg:8,md:12},y["default"].createElement(m["default"],{title:"\u6837\u5f0f"},y["default"].createElement(E.DropOption,{menuOptions:[{key:"1",name:"\u7f16\u8f91"},{key:"2",name:"\u5220\u9664"}],buttonStyle:{border:"solid 1px #eee",width:60}}))),y["default"].createElement(i["default"],{lg:8,md:12},y["default"].createElement(m["default"],{title:"\u4e8b\u4ef6"},y["default"].createElement(E.DropOption,{menuOptions:[{key:"1",name:"\u7f16\u8f91"},{key:"2",name:"\u5220\u9664"}],buttonStyle:{border:"solid 1px #eee",width:60},onMenuClick:function(e){var t=e.key;switch(t){case"1":s["default"].success("\u70b9\u51fb\u4e86\u7f16\u8f91");break;case"2":s["default"].success("\u70b9\u51fb\u4e86\u5220\u9664")}}})))),y["default"].createElement("h2",{style:{margin:"16px 0"}},"Props"),y["default"].createElement(u["default"],null,y["default"].createElement(i["default"],{lg:18,md:24},y["default"].createElement(d["default"],{rowKey:function(e,t){return t},pagination:!1,bordered:!0,scroll:{x:800},columns:[{title:"\u53c2\u6570",dataIndex:"props"},{title:"\u8bf4\u660e",dataIndex:"desciption"},{title:"\u7c7b\u578b",dataIndex:"type"},{title:"\u9ed8\u8ba4\u503c",dataIndex:"default"}],dataSource:[{props:"menuOptions",desciption:"\u4e0b\u62c9\u64cd\u4f5c\u7684\u9009\u9879\uff0c\u683c\u5f0f\u4e3a[{name:string,key:string}]",type:"Array","default":"\u5fc5\u9009"},{props:"onMenuClick",desciption:"\u70b9\u51fb menuitem \u8c03\u7528\u6b64\u51fd\u6570\uff0c\u53c2\u6570\u4e3a {item, key, keyPath}",type:"Function","default":"-"},{props:"buttonStyle",desciption:"\u6309\u94ae\u7684\u6837\u5f0f",type:"Object","default":"-"},{props:"dropdownProps",desciption:"\u4e0b\u62c9\u83dc\u5355\u7684\u53c2\u6570\uff0c\u53ef\u53c2\u8003antd\u7684\u3010Dropdown\u3011\u7ec4\u4ef6",type:"Object","default":"-"}]}))))};t["default"]=b,e.exports=t["default"]}});
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
webpackJsonp([12],{49:126,928:function(e,t){e.exports={list:"list___NsVSt",name:"name___2l5wL"}},1456:function(e,t,a){"use strict";function l(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=(a(126),a(115)),d=l(n),r=(a(49),a(125)),u=l(r),c=(a(196),a(195)),s=l(c),f=a(1),o=l(f),i=a(207),p=a(928),m=l(p),_=["Cherry","Cheese","Bread","Beer","Beet","Bacon","Banana","Asparagus","Apple"],y=function(){return o["default"].createElement("div",{className:"content-inner"},o["default"].createElement("ul",{className:m["default"].list},_.map(function(e){return o["default"].createElement("li",{key:e},o["default"].createElement(i.Iconfont,{className:m["default"].icon,type:e}),o["default"].createElement("span",{className:m["default"].name},e))})),o["default"].createElement("h2",{style:{margin:"16px 0"}},"Props"),o["default"].createElement(d["default"],null,o["default"].createElement(u["default"],{lg:18,md:24},o["default"].createElement(s["default"],{rowKey:function(e,t){return t},pagination:!1,bordered:!0,scroll:{x:800},columns:[{title:"\u53c2\u6570",dataIndex:"props"},{title:"\u8bf4\u660e",dataIndex:"desciption"},{title:"\u7c7b\u578b",dataIndex:"type"},{title:"\u9ed8\u8ba4\u503c",dataIndex:"default"}],dataSource:[{props:"type",desciption:"\u56fe\u6807\u7c7b\u578b",type:"String","default":"-"}]}))))};t["default"]=y,e.exports=t["default"]}});
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
webpackJsonp([8],{49:126,55:function(e,t,l){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var d=l(9),n=a(d),r=l(19),c=a(r),s=l(1),u=a(s),o=l(3),i=a(o),f=function(e,t){var l={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(l[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var d=0,a=Object.getOwnPropertySymbols(e);d<a.length;d++)t.indexOf(a[d])<0&&(l[a[d]]=e[a[d]]);return l};t["default"]=function(e){var t,l=e.prefixCls,a=void 0===l?"ant-card":l,d=e.className,r=e.extra,s=e.bodyStyle,o=e.title,m=e.loading,p=e.bordered,E=void 0===p||p,y=f(e,["prefixCls","className","extra","bodyStyle","title","loading","bordered"]),g=e.children,b=(0,i["default"])(a,d,(t={},(0,c["default"])(t,a+"-loading",m),(0,c["default"])(t,a+"-bordered",E),t));m&&(g=u["default"].createElement("div",null,u["default"].createElement("p",{className:a+"-loading-block",style:{width:"94%"}}),u["default"].createElement("p",null,u["default"].createElement("span",{className:a+"-loading-block",style:{width:"28%"}}),u["default"].createElement("span",{className:a+"-loading-block",style:{width:"62%"}})),u["default"].createElement("p",null,u["default"].createElement("span",{className:a+"-loading-block",style:{width:"22%"}}),u["default"].createElement("span",{className:a+"-loading-block",style:{width:"66%"}})),u["default"].createElement("p",null,u["default"].createElement("span",{className:a+"-loading-block",style:{width:"56%"}}),u["default"].createElement("span",{className:a+"-loading-block",style:{width:"39%"}})),u["default"].createElement("p",null,u["default"].createElement("span",{className:a+"-loading-block",style:{width:"21%"}}),u["default"].createElement("span",{className:a+"-loading-block",style:{width:"15%"}}),u["default"].createElement("span",{className:a+"-loading-block",style:{width:"40%"}}))));var h=void 0;return h=o?"string"==typeof o?u["default"].createElement("div",{className:a+"-head"},u["default"].createElement("h3",{className:a+"-head-title"},o)):u["default"].createElement("div",{className:a+"-head"},u["default"].createElement("div",{className:a+"-head-title"},o)):null,u["default"].createElement("div",(0,n["default"])({},y,{className:b}),h,r?u["default"].createElement("div",{className:a+"-extra"},r):null,u["default"].createElement("div",{className:a+"-body",style:s},g))},e.exports=t["default"]},56:[1570,63],63:20,1458:function(e,t,l){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var d=(l(196),l(195)),n=a(d),r=(l(126),l(115)),c=a(r),s=(l(49),l(125)),u=a(s),o=(l(56),l(55)),i=a(o),f=l(1),m=a(f),p=l(207),E=function(){return m["default"].createElement("div",{className:"content-inner"},m["default"].createElement(c["default"],{gutter:32},m["default"].createElement(u["default"],{lg:8,md:12},m["default"].createElement(i["default"],{title:"\u9ed8\u8ba4"},m["default"].createElement(p.Search,null))),m["default"].createElement(u["default"],{lg:8,md:12},m["default"].createElement(i["default"],{title:"\u9644\u5e26\u9009\u62e9"},m["default"].createElement(p.Search,{select:!0,selectOptions:[{value:"components",name:"\u7ec4\u4ef6"},{value:"page",name:"\u9875\u9762"}],selectProps:{defaultValue:"components"}}))),m["default"].createElement(u["default"],{lg:8,md:12},m["default"].createElement(i["default"],{title:"\u5927\u5c0f"},m["default"].createElement(p.Search,{size:"large",style:{marginBottom:16}}),m["default"].createElement(p.Search,{size:"small"})))),m["default"].createElement("h2",{style:{margin:"16px 0"}},"Props"),m["default"].createElement(c["default"],null,m["default"].createElement(u["default"],{lg:18,md:24},m["default"].createElement(n["default"],{rowKey:function(e,t){return t},pagination:!1,bordered:!0,scroll:{x:800},columns:[{title:"\u53c2\u6570",dataIndex:"props"},{title:"\u8bf4\u660e",dataIndex:"desciption"},{title:"\u7c7b\u578b",dataIndex:"type"},{title:"\u9ed8\u8ba4\u503c",dataIndex:"default"}],dataSource:[{props:"size",desciption:"\u8bbe\u7f6eSearch\u5927\u5c0f\uff0c\u53ef\u9009\u503c\u4e3a \u3010small\u3011 \u3010large\u3011 \u6216\u8005\u4e0d\u8bbe",type:"String","default":"-"},{props:"select",desciption:"\u8bbe\u7f6e\u662f\u5426\u6709\u9009\u62e9\u5668",type:"Boolean","default":"false"},{props:"selectOptions",desciption:'\u9009\u62e9\u5668\u7684\u9009\u9879\uff0c\u683c\u5f0f\u4e3a[{name:"",value:""}]\u6216\u8005[{value:""}]',type:"Array","default":"-"},{props:"selectProps",desciption:"\u9009\u62e9\u5668\u7684\u5c5e\u6027\uff0c\u53ef\u53c2\u8003antd\u7684\u3010Select\u3011\u7ec4\u4ef6",type:"Object","default":"-"},{props:"onSearch",desciption:"\u70b9\u51fb\u641c\u7d22\u6309\u94ae, \u6309Enter\u952e\u6216\u8005\u70b9\u51fb\u6e05\u9664\u65f6\u7684\u56de\u8c03",type:"Function({keyword:string,field:string})","default":"-"}]}))))};t["default"]=E,e.exports=t["default"]}});
-20
View File
@@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="index.css" />
<!--[if lte IE 10]>
<script
src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,media-match/2.0.2/media.match.min.js"></script>
<![endif]-->
</head>
<body>
<div id="root"></div>
<script src="index.js"></script>
</body>
</html>
+35
View File
@@ -0,0 +1,35 @@
### 开发环境
- OS:Windows
- 编辑器:Atom
- cmd:Cmder
### Atom 插件
- [atom-beautify](https://atom.io/packages/atom-beautify)
#### Less
- [x] Beautify On Save
#### Javascript
- [ ] Disable Beautifying Language
#### Markdown
- [x] Beautify On Save
- [x] Default Beautifier:Remark
#### HTML
- [x] Beautify On Save
- [linter](https://atom.io/packages/linter)
- [ ] Lint on Change
- [linter-eslint](https://atom.io/packages/linter-eslint)
- [x] Fix errors on save
### Cmder 主题
- [Panda-Theme-Cmder](https://github.com/HamidFaraji/Panda-Theme-Cmder)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

File diff suppressed because one or more lines are too long
-14
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-15
View File
File diff suppressed because one or more lines are too long
View File
+86
View File
@@ -0,0 +1,86 @@
# API configuration
## Why
In the use of `redux` or `dva` projects, we often write functions like the following `service` layer to make the code structure clearer, but it is easy to see that we will write a lot of similar code in `antd -admin@5.0`, using the more concise configuration method to achieve the same function.
```javascript
Export async function login(data) {
  Return request({
    Url: '/api/v1/user/login',
    Method: 'post',
    Data,
  })
}
```
## Configuration and use
In the `src/services/api.js` file, you will see the following configuration object, the object's key is used to call the function name, the object's value is the requested `url`, the default request method is `GET`, The format of the value of the other request mode object is `'method url'`.
```javascript
Export default {
  ...
  queryUser: '/user/:id',
  queryUserList: '/users',
  updateUser: 'Patch /user/:id',
  createUser: 'POST /user/:id',
  removeUser: 'DELETE /user/:id',
  removeUserList: 'POST /users/delete',
  ...
}
```
Used in other files
```javascript
Import { queryUser } from 'api'
// in the general file
...
queryUser(option).then(data => console.log(data))
...
/ / Model file
...
Yield call(queryUser, option)
...
```
## Method to realize
Refer to the `src/services/index.js` file to traverse the api configuration. Each property returns the corresponding encapsulated request function.
```javascript
Import request from 'utils/request'
Import { apiPrefix } from 'utils/config'
Import api from './api'
Const gen = params => {
  Let url = apiPrefix + params
  Let method = 'GET'
  Const paramsArray = params.split(' ')
  If (paramsArray.length === 2) {
    Method = paramsArray[0]
    Url = apiPrefix + paramsArray[1]
  }
  Return function(data) {
    Return request({
      Url,
      Data,
      Method,
    })
  }
}
Const APIFunction = {}
For (const key in api) {
  APIFunction[key] = gen(api[key])
}
Module.exports = APIFunction
```
+83
View File
@@ -0,0 +1,83 @@
<p align="center">
<a href="http://github.com/zuiidea/antd-admin">
<img alt="antd-admin" height="64" src="./_media/logo.svg">
</a>
</p>
<h1 align="center">AntD Admin</h1>
<div align="center">
An excellent front-end solution for enterprise applications.
[![antd](https://img.shields.io/badge/antd-^3.10.0-blue.svg?style=flat-square)](https://github.com/ant-design/ant-design)
[![umi](https://img.shields.io/badge/umi-^2.2.1-orange.svg?style=flat-square)](https://github.com/umijs/umi)
[![GitHub issues](https://img.shields.io/github/issues/zuiidea/antd-admin.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/issues)
[![MIT](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](http://opensource.org/licenses/MIT)
![Travis (.org)](https://img.shields.io/travis/zuiidea/antd-admin.svg)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/pulls)
[![Gitter](https://img.shields.io/gitter/room/antd-admin/antd-admin.svg)](https://gitter.im/antd-admin/antd-admin)
</div>
- Preview - [https://antd-admin.zuiidea.com](https://antd-admin.zuiidea.com)
- Documentation - [https://doc.antd-admin.zuiidea.com](https://doc.antd-admin.zuiidea.com)
- FAQ - [https://doc.antd-admin.zuiidea.com/#/faq](https://doc.antd-admin.zuiidea.com/#/faq)
- ChangeLog - [https://doc.antd-admin.zuiidea.com/#/change-log](https://doc.antd-admin.zuiidea.com/#/change-log)
## Features
- Internationalization, extracting translation fields from source code, loading language packs on demand
- Dynamic permissions, different permissions for different menus
- Elegant and beautiful, Ant Design system
- Mock data, local data debugging
## Usage
1. Clone project code.
```bash
git clone https://github.com/zuiidea/antd-admin.git my-project
cd my-project
```
2. Installation dependence.
```bash
yarn install
```
Or
```bash
npm install
```
3. Start local server.
```bash
npm run start
```
4. After the startup is complete, open a browser and visit [http://localhost:7000](http://localhost:7000), If you need to change the startup port, you can configure it in the `.env` file.
> More instructions at [documentation](https://doc.antd-admin.zuiidea.com)。
## Browsers support
Modern browsers.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
| --------- | --------- | --------- | --------- | --------- |
|IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
## Contributing
We very much welcome your contribution, you can build together with us in the following ways :smiley:
- Use Ant Design Pro in your daily work.
- Submit [GitHub issues](http://github.com/zuiidea/antd-admin/issues)s to report bugs or ask questions.
- Propose [Pull Request](http://github.com/zuiidea/antd-admin/pulls) to improve our code.
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

+24
View File
@@ -0,0 +1,24 @@
<svg width="169px" height="141px" viewBox="0 0 169 141" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 51.3 (57544) - http://www.bohemiancoding.com/sketch -->
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="54.0428975%" y1="4.39752391%" x2="54.0428975%" y2="108.456714%" id="linearGradient-1">
<stop stop-color="#29CDFF" offset="0%"></stop>
<stop stop-color="#148EFF" offset="62.3089445%"></stop>
<stop stop-color="#0A60FF" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="14.2201464%" x2="50%" y2="113.263844%" id="linearGradient-2">
<stop stop-color="#FA816E" offset="0%"></stop>
<stop stop-color="#F74A5C" offset="65.9092442%"></stop>
<stop stop-color="#F51D2C" offset="100%"></stop>
</linearGradient>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" transform="translate(0.000000, -5.000000)">
<rect id="Rectangle" fill="url(#linearGradient-1)" transform="translate(83.718923, 75.312358) rotate(-24.000000) translate(-83.718923, -75.312358) " x="68.7189234" y="0.312357954" width="30" height="150" rx="15"></rect>
<rect id="Rectangle" fill="url(#linearGradient-1)" transform="translate(129.009910, 75.580213) rotate(-24.000000) translate(-129.009910, -75.580213) " x="114.00991" y="0.580212739" width="30" height="150" rx="15"></rect>
<circle id="Oval" fill="url(#linearGradient-2)" cx="25" cy="120" r="25"></circle>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 194 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 118 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 199 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 124 KiB

+12
View File
@@ -0,0 +1,12 @@
- Getting started
- [Quick Start](getting-started.md)
- Customization
- [Configuration](configuration.md)
- [API Configuration](API-configuration.md)
- [I18n](i18n.md)
- [Layout](layout.md)
- [Request](request.md)
- Guide
- [Deploy](deploy.md)
- [Change Log](change-log.md)
- [FAQ](faq.md)
+50
View File
@@ -0,0 +1,50 @@
## 5.0.0
#### Optimization
- Try to use decorators to simplify code writing and improve code readability.
- API configurization to simplify the way data is obtained.
- The files in `utils` are split and each has its own role.
- Simplify the `utils/request` file without special handling.
#### Specification
- Functions add comments, parameters, return values, etc., ambiguous code adds comments, canonical reference [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html#appendices-jsdoc-tag-reference).
  
- Semantic version number, specification participation [semantic version 2.0.0](https://semver.org/lang/zh-CN/).
- Static code checking, unified code style, will use `prettier`, `stylelint`, `eslint` specification code before code submission.
- Git submits information normalization, [git-commit-emoji-cn](https://github.com/liuchengxu/git-commit-emoji-cn).
- Based on the pre-defined routing of `Umi`, there is no need to write a routing configuration file.
- Use `React 16` new features such as `Fragment`, `Context`, `PureComponent`, etc.
#### Features
- Support internationalization, extract source fields from source code, load language packs on demand, and automatically translate online.
- Support for the introduction `lodash` functions on demand.
  
- Support multiple layouts, which rules can be used according to the rules.
- Support Antd Admin to automatically compile and deploy on Travis.
- Generate a documentation website using `Docsify`.
#### Style
- Added Antd Admin standalone Logo.
- Rewrite the overall layout component, optimize the menu, automatic breadcrumb navigation, menu auto-expansion and other logic.
- The mobile menu is changed to drawer.
#### Other
- Discard components such as `IconFont`, `Search`, `DataTable` because they are well supported and replaceable in `Antd`.
+102
View File
@@ -0,0 +1,102 @@
# Configuration
You can do some custom configuration in `/src/utils/config.js`:
## siteName
- Type `String`
Configure the site name, apply it to the login box, and display the title text at the top of the sidebar.
## copyright
- Type: `String`
Configure the copyright notice to apply to the login page, at the bottom of the `Primary` layout.
## logoPath
- Type: `String`
Configure the site logo to apply to the login box and the Logo display at the top of the sidebar.
## apiPrefix
- Type: `String`
Configure the prefix of the interface in the project. The interface related documents can be viewed [API configuration](API-configuration.md)
## fixedHeader
- Type: `String`
Under the `Primary` layout, whether the top of the page is fixed when scrolling。
## layouts
- Type: `Array`
Configuration? Which routes use which layout, unspecified route uses the default layout `Public`, the project currently has `Primary` and `Public` layouts,
     The default configuration is as follows:
```javascript
layouts: [
{
name: 'primary',
include: [/.*/],
exclude: [/(\/(en|zh))*\/login/],
},
],
```
The object properties for each layout are as follows:
- `name` - The name of the layout;
- `include` - Specifies a list of routing rules that use this layout, which can be a regular expression or a string;
- `exclude` - Specifies a list of routing rules that do not use this layout, which can be a regular expression or a string.
> Note: `exclude` takes precedence over `include`, and the layout previous it has a higher priority than the behind layout. The development process may need to be combined with the layout in the `src/layouts` directory. For details, see [Using Layout](./layout.md).
## i18n
- Type: `Object`
Configure internationalization, the default configuration is as follows:
```javascript
i18n: {
languages: [
{
key: 'en',
title: 'English',
flag: '/america.svg',
},
{
key: 'zh',
title: '中文',
flag: '/china.svg',
},
],
defaultLanguage: 'en',
}
```
### i18n.languages
- Type: `Array`
Specify which languages the app supports, and the object properties for each language are as follows:
- `key` - The `key` of the language is applied to the page url to distinguish the language, and also corresponds to the language package folder name in the `src/locales` directory;
- `title` - The name of the language, at the bottom of the login page, at the top of the `Primary` layout, the language switch is displayed;
- `flag` - The path of the flag icon of the language, the language switching display at the top of the `Primary` layout.
### i18n.defaultLanguage
- Type: `String`
Configure the default language.
+113
View File
@@ -0,0 +1,113 @@
# Deploy
After the development is completed and verified in the development environment, it needs to be deployed to our users.
![i18n](./_media/term_build.svg)
## Build
First execute the following command,
```bash
npm run build
```
After a few seconds, the output should look like this:
```bash
> antd-admin@5.0.0-beta build /Users/zuiidea/web/antd-admin
> umi build
[21:13:17] webpack compiled in 43s 868ms
DONE Compiled successfully in 43877ms 21:13:17
File sizes after gzip:
1.3 MB dist/vendors.async.js
308.21 KB dist/umi.js
45.49 KB dist/vendors.chunk.css
36.08 KB dist/p__chart__highCharts__index.async.js
33.53 KB dist/p__user__index.async.js
22.36 KB dist/p__chart__ECharts__index.async.js
4.21 KB dist/p__dashboard__index.async.js
4.06 KB dist/umi.css
...
```
The `build` command will package all resources, including JavaScript, CSS, web fonts, images, html, and more. You can find these files in the `dist/` directory.
> If you have requirements for using HashHistory , deploying html to non-root directories, statics, etc., check out [Umi Deployment] (https://umijs.org/en/guide/deploy.html).
## Local verification
Local verification can be done via `serve` before publishing.
```
$ yarn global add serve
$ serve ./dist
Serving!
- Local: http://localhost:5000
- On Your Network: http://{Your IP}:5000
Copied local address to clipboard!
```
Access [http://localhost:5000](http://localhost:5000), under normal circumstances, it should be consistent with `npm start` (The API may not get the correct data).
## Deploy
Next, we can upload the static file to the server. If you use Nginx as the Web server, you can configure it in `ngnix.conf`:
```
server
{
listen 80;
# Specify an accessible domain name
server_name antd-admin.zuiidea.com;
# The directory where the compiled files are stored
root /home/www/antd-admin/dist;
# Proxy server interface to avoid cross-domain
location /api {
proxy_pass http://localhost:7000/api;
}
Because the front end uses BrowserHistory, it will route backback to index.html
location / {
index index.html;
try_files $uri $uri/ /index.html;
}
}
```
Restart the web server and access [http://antd-admin.zuiidea.com](http://antd-admin.zuiidea.com) , You will see the correct page.
```bash
nginx -s reload
```
Similarly, if you use Caddy as a web server, you can do this in `Caddyfile`:
```
antd-admin.zuiidea.com {
gzip
root /home/www/antd-admin/dist
proxy /api http://localhost:7000
rewrite {
if {path} not_match ^/api
to {path} {path}/ /
}
}
antd-admin.zuiidea.com/public {
gzip
root /home/www/antd-admin/dist/static/public
}
```
+9
View File
@@ -0,0 +1,9 @@
# FAQ
Most asked
## create new page
1. just copy a page in /src/pages (route here auto generated by [umi](https://umijs.org/guide/router.html#basic-routing))
2. modify namespace/pathToRegexp in model.js
3. modify mock route.js to add a route
+73
View File
@@ -0,0 +1,73 @@
# Quick Start
> Before delving into Ant Design React, a good knowledge base of [React](http://facebook.github.io/react/) 、 [ES2015+](http://es6.ruanyifeng.com/) 、 [Antd Design](https://ant.design/docs/react/introduce-cn) . Learn about [UmiJS](https://umijs.org/) , [Dva](http://github.com/dvajs/dva) . And properly installed and configured [Node.js](https://nodejs.org/) v8 or above, [Git](https://git-scm.com/). It would be helpful if you have pre-existing knowledge on those.
## Installation
```bash
git clone https://github.com/zuiidea/antd-admin.git my-project
cd my-project
```
## Scaffolding
The project layout is as follows:
```bash
├── dist/ # Default build output directory
├── mock/ # Mock files
├── public/ # Static resource
├── src/ # Source code
│ ├── components/ # Components
│ ├── e2e/ # Integrated Test Case
│ ├── layouts/ # Common Layouts
│ ├── locales/ # i18n resources
│ ├── models/ # Global dva Model
│ ├── pages/ # Sub-pages and templates
│ ├── services/ # Backend Services
│ │ ├── api.js # API configuration
│ │ └── index.js # API export
│ ├── themes/ # Themes
│ │ ├── default.less # Less variable
│ │ ├── index.less # Global style
│ │ ├── mixin.less # Less mixin
│ │ └── vars.less # Less variable and mixin
│ ├── utils/ # Utility
│ │ ├── config.js # Application configuration
│ │ ├── constant.js # Static constant
│ │ ├── index.js # Utility methods
│ │ ├── request.js # Request function(axios)
│ │ └── theme.js # Style variables used in js
├── .editorconfig
├── .env
├── .eslintrc
├── .gitignore
├── .prettierignore
├── .prettierrc
├── .stylelintrc.json
├── .travis.yml
└── .umirc.js
└── package.json
```
## Development
1. Install Dependencies.
```bash
yarn install
```
Or
```bash
npm install
```
2. Start local server.
```bash
npm run start
```
3. After the startup is complete, open a browser and visit [http://localhost:7000](http://localhost:7000), If you need to change the startup port, you can configure it in the `.env` file.
+75
View File
@@ -0,0 +1,75 @@
# globalization
## Add language
Take Japanese as an example.
![i18n](../_media/term_i18n.svg)
1. Add a language pack local file, `ja` is the Japanese language code, and a list of languages ​​that support translation [有道智云](http://ai.youdao.com/docs/doc-trans-api.s#p05), the `src/locales/ja/messages.json` file will be generated after running the following command.
```bash 
npm run add-locale ja
```
2. Extract the fields in the code that need to be translated, ie `<Trans>?message</Trans>`, `` i18n.t`message `` in the `message` field, run the following command after `src/locales/ja /messages.json` will appear after the extracted field configuration.
```bash 
npm run extract
```
You will see the following information:
```bash
Catalog statistics:
┌─────────────┬─────────────┬─────────┐
│ Language │ Total count │ Missing │
├─────────────┼─────────────┼─────────┤
│ en (source) │ 52 │ - │
│ ja │ 52 │ 52 │
│ zh │ 52 │ 0 │
└─────────────┴─────────────┴─────────┘
```
3. At the same time, we have added the relevant configuration in `src/utils/config.js`.
```javascript
{
...
i18n: {
languages: [
...
{
key:'ja',
title: '日本語',
flag: '/japanese.svg',
},
],
},
}
```
> Routing related effects, after the configuration `npm run start` takes effect after restart.
4. Use the built-in commands for automatic translation. You will see the translated configuration in `src/locales/ja/messages.json`.
```bash
npm run trans:only
```
You will see the following information:
```bash
start: en -> ja
...
youdao: en -> ja: Unpublished -> 未発表
youdao: en -> ja: Update -> 更新
youdao: en -> ja: Update User -> ユーザーの更新
youdao: en -> ja: Username -> 名
...
All translations have been completed.
```
> `npm run trans` will execute `npm run extract` and `npm run trans:only` in order.
5. Finally, you can adjust the inaccurate fields in `src/locales/ja/messages.json`. Start the development mode `npm run start`, open [http://localhost:7000/ja/login](http://localhost:7000/ja/login) and you will see the Japanese version of the app.
+55
View File
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>antd-admin - An admin dashboard application demo built upon Ant Design and UmiJS</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="An admin dashboard application demo built upon Ant Design and UmiJS">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
<link rel="icon" href="/_media/favicon.ico" />
</head>
<body>
<nav data-cloak class="app-nav">
<a href="/">En</a>
<a href="#/zh-cn/">中文</a>
</nav>
<div id="app">Loading...</div>
<script>
window.$docsify = {
name: 'AntD Admin',
loadSidebar: true,
maxLevel: 3,
subMaxLevel: 3,
auto2top: true,
autoHeader: true,
repo: 'zuiidea/antd-admin',
themeColor: '#1890ff',
search: {
paths: 'auto',
placeholder: {
'/zh-cn/': '搜索',
'/': 'Type to search'
},
noData: {
'/zh-cn/': '找不到结果',
'/': 'No Results'
}
}
}
// if (typeof navigator.serviceWorker !== 'undefined') {
// navigator.serviceWorker.register('sw.js')
// }
</script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
<script src="//unpkg.com/docsify-copy-code"></script>
</body>
</html>
+60
View File
@@ -0,0 +1,60 @@
# Layout
## Add a new layout
Take a new layout named `secondary` as an example to make the route starting with `seconday` use this layout.
1. Add related configuration in `src/utils/config.js`. For details, please refer to [layouts](/configuration?id=layouts).
```javascript
   layouts: [
           {
               name: 'primary',
               include: [/.*/],
               exclude: [/(\/(en|zh))*\/login/, /(\/(en|zh))*\/seconday\/(.*)/],
           },
           {
               name: 'secondary',
               include: [/(\/(en|zh))*\/seconday\/(.*)/],
           },
   ],
```
2. Add the `secondary` layout component to the `src/layouts/BaseLayout.js` file.
```javascript
   import SecondaryLayout from './SecondaryLayout'
   const LayoutMap = {
     Primary: PrimaryLayout,
     Public: PublicLayout,
     Secondary: SecondaryLayout,
   }
```
3. Add the `SecondaryLayout.js` file to the `src/layouts/` directory.
```javascript
   import React from 'react'
   export default ({ children }) => {
     Return (
       <div>
         <h1>Seconday</h1>
         {children}
       </div>
     )
   }
```
4. Add a `seconday/index.js` file to the `src/pages/` directory.
```javascript
   import React from 'react'
   export default ({ children }) => {
     Return <div>Seconday page Content</div>
   }
```
5. Finally, start the development mode `npm run start`, open [http://localhost:7000/seconday/](http://localhost:7000/seconday/) and you will see the page for the `seconday` layout.
+22
View File
@@ -0,0 +1,22 @@
# HTTP request
this project use axios for http service, file located in src/utils/request.js
## Custom Header
As for privilege access or modify cookie, you could add header param by yourself
```
axios.defaults.headers.common['Authorization'] = 'token'
```
Or
```
axios.interceptors.request.use(function (config) {
config.headers.token = window.localStorage.getItem('token');
return config;
}, function (error) {
return Promise.reject(error);
});
```
+83
View File
@@ -0,0 +1,83 @@
/* ===========================================================
* docsify sw.js
* ===========================================================
* Copyright 2016 @huxpro
* Licensed under Apache 2.0
* Register service worker.
* ========================================================== */
const RUNTIME = 'docsify'
const HOSTNAME_WHITELIST = [
self.location.hostname,
'fonts.gstatic.com',
'fonts.googleapis.com',
'unpkg.com'
]
// The Util Function to hack URLs of intercepted requests
const getFixedUrl = (req) => {
var now = Date.now()
var url = new URL(req.url)
// 1. fixed http URL
// Just keep syncing with location.protocol
// fetch(httpURL) belongs to active mixed content.
// And fetch(httpRequest) is not supported yet.
url.protocol = self.location.protocol
// 2. add query for caching-busting.
// Github Pages served with Cache-Control: max-age=600
// max-age on mutable content is error-prone, with SW life of bugs can even extend.
// Until cache mode of Fetch API landed, we have to workaround cache-busting with query string.
// Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190
if (url.hostname === self.location.hostname) {
url.search += (url.search ? '&' : '?') + 'cache-bust=' + now
}
return url.href
}
/**
* @Lifecycle Activate
* New one activated when old isnt being used.
*
* waitUntil(): activating ====> activated
*/
self.addEventListener('activate', event => {
event.waitUntil(self.clients.claim())
})
/**
* @Functional Fetch
* All network requests are being intercepted here.
*
* void respondWith(Promise<Response> r)
*/
self.addEventListener('fetch', event => {
// Skip some of cross-origin requests, like those for Google Analytics.
if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) {
// Stale-while-revalidate
// similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale
// Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1
const cached = caches.match(event.request)
const fixedUrl = getFixedUrl(event.request)
const fetched = fetch(fixedUrl, { cache: 'no-store' })
const fetchedCopy = fetched.then(resp => resp.clone())
// Call respondWith() with whatever we get first.
// If the fetch fails (e.g disconnected), wait for the cache.
// If there’s nothing in cache, wait for the fetch.
// If neither yields a response, return offline pages.
event.respondWith(
Promise.race([fetched.catch(_ => cached), cached])
.then(resp => resp || fetched)
.catch(_ => { /* eat any errors */ })
)
// Update the cache with the version we fetched (only for ok status)
event.waitUntil(
Promise.all([fetchedCopy, caches.open(RUNTIME)])
.then(([response, cache]) => response.ok && cache.put(event.request, response))
.catch(_ => { /* eat any errors */ })
)
}
})
+86
View File
@@ -0,0 +1,86 @@
# 接口配置
## 为什么
在使用了`redux`或者`dva`项目中,我们经常会写类似下面的`service`层的函数,使代码结构更清晰,但是很容易看出,我们会写很多相似的代码,在`antd-admin@5.0`中,使用了更加简洁的配置方式实现了相同的功能。
```javascript
export async function login(data) {
return request({
url: '/api/v1/user/login',
method: 'post',
data,
})
}
```
## 配置和使用
在`src/services/api.js`文件中,你会看到如下配置对象,对象的键用于调用时的函数名称,对象的值为请求的`url`,默认请求方式为`GET`,如果是其他请求方式对象的值的格式则为`'method url'`。
```javascript
export default {
...
queryUser: '/user/:id',
queryUserList: '/users',
updateUser: 'Patch /user/:id',
createUser: 'POST /user/:id',
removeUser: 'DELETE /user/:id',
removeUserList: 'POST /users/delete',
...
}
```
在其他文件中使用
```javascript
import { queryUser } from 'api'
// 一般文件中
...
queryUser(option).then(data => console.log(data))
...
// model文件中
...
yield call(queryUser, option)
...
```
## 实现方式
参考`src/services/index.js`文件,对api配置进行遍历,每个属性都返回对应的封装后的request函数。
```javascript
import request from 'utils/request'
import { apiPrefix } from 'utils/config'
import api from './api'
const gen = params => {
let url = apiPrefix + params
let method = 'GET'
const paramsArray = params.split(' ')
if (paramsArray.length === 2) {
method = paramsArray[0]
url = apiPrefix + paramsArray[1]
}
return function(data) {
return request({
url,
data,
method,
})
}
}
const APIFunction = {}
for (const key in api) {
APIFunction[key] = gen(api[key])
}
module.exports = APIFunction
```
+84
View File
@@ -0,0 +1,84 @@
<p align="center">
<a href="http://github.com/zuiidea/antd-admin">
<img alt="antd-admin" height="64" src="../_media/logo.svg">
</a>
</p>
<h1 align="center">AntD Admin</h1>
<div align="center">
一套优秀的中后台前端解决方案
[![antd](https://img.shields.io/badge/antd-^3.10.0-blue.svg?style=flat-square)](https://github.com/ant-design/ant-design)
[![umi](https://img.shields.io/badge/umi-^2.2.1-orange.svg?style=flat-square)](https://github.com/umijs/umi)
[![GitHub issues](https://img.shields.io/github/issues/zuiidea/antd-admin.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/issues)
[![MIT](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](http://opensource.org/licenses/MIT)
![Travis (.org)](https://img.shields.io/travis/zuiidea/antd-admin.svg)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/pulls)
[![Gitter](https://img.shields.io/gitter/room/antd-admin/antd-admin.svg)](https://gitter.im/antd-admin/antd-admin)
</div>
- 在线演示 - [https://antd-admin.zuiidea.com](https://antd-admin.zuiidea.com)
- 使用文档 - [https://doc.antd-admin.zuiidea.com/#/zh-cn/](https://doc.antd-admin.zuiidea.com/#/zh-cn/)
- 常见问题 - [https://doc.antd-admin.zuiidea.com/#/zh-cn/faq](https://doc.antd-admin.zuiidea.com/#/zh-cn/faq)
- 更新日志 - [https://doc.antd-admin.zuiidea.com/#/zh-cn/change-log](https://doc.antd-admin.zuiidea.com/#/zh-cn/change-log)
## 特性
- 国际化,源码中抽离翻译字段,按需加载语言包
- 动态权限,不同权限对应不同菜单
- 优雅美观,Ant Design 设计体系
- Mock 数据,本地数据调试
## 使用
1. 下载项目代码。
```bash
git clone https://github.com/zuiidea/antd-admin.git my-project
cd my-project
```
2. 进入目录安装依赖,国内用户推荐使用 [cnpm](https://cnpmjs.org) 进行加速。
```bash
yarn install
```
或者
```bash
npm install
```
3. 启动本地服务器。
```bash
npm run start
```
4. 启动完成后打开浏览器访问 [http://localhost:7000](http://localhost:7000),如果需要更改启动端口,可在 `.env` 文件中配置。
> 更多信息请参考 [使用文档](https://doc.antd-admin.zuiidea.com/#/zh-cn/)。
## 支持环境
现代浏览器。
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
| --------- | --------- | --------- | --------- | --------- |
|IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
## 参与贡献
我们非常欢迎你的贡献,你可以通过以下方式和我们一起共建 :smiley:
- 在你的公司或个人项目中使用 AntD Admin。
- 通过 [Issue](http://github.com/zuiidea/antd-admin/issues) 报告 bug 或进行咨询。
- 提交 [Pull Request](http://github.com/zuiidea/antd-admin/pulls) 改进代码。
> 强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)、[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545) 和 [《如何有效地报告 Bug》](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html)、[《如何向开源项目提交无法解答的问题》](https://zhuanlan.zhihu.com/p/25795393),更好的问题更容易获得帮助。
+11
View File
@@ -0,0 +1,11 @@
- 入门
- [快速上手](zh-cn/getting-started.md)
- 定制化
- [配置项](zh-cn/configuration.md)
- [接口配置](zh-cn/API-configuration.md)
- [国际化](zh-cn/i18n.md)
- [布局](zh-cn/layout.md)
- [http 请求](zh-cn/request.md)
- 指南
- [部署](zh-cn/deploy.md)
- [更新日志](zh-cn/change-log.md)
+52
View File
@@ -0,0 +1,52 @@
## 5.0.0
#### 优化
- 尽量使用修饰器,简化代码编写,提高代码可读性。
- API 配置化,简化获取数据方式。
- `utils` 内文件拆分,各司其职。
- 简化`utils/request`文件,不做特殊处理。
#### 规范
- 函数添加描述、参数、返回值等注释,含糊不清的代码增加注释,规范参考 [Google JavaScript Style Guide](https://google.github.io/styleguide/jsguide.html#appendices-jsdoc-tag-reference)。
- 语义化版本号,规范参加 [语义化版本 2.0.0](https://semver.org/lang/zh-CN/)。
- 静态代码检查,统一代码风格,代码提交前将会使用 `prettier`、`stylelint`、`eslint` 规范代码。
- Git 提交信息规范化,[git-commit-emoji-cn](https://github.com/liuchengxu/git-commit-emoji-cn)。
- 基于 `Umi` 的约定式路由,无需再写路由配置文件。
- 使用 `React 16` 新特性,如 `Fragment`、`Context`、 `PureComponent`等。
#### 功能
- 支持国际化,源码中抽离翻译字段,按需加载语言包,自动在线翻译。
- 支持按需引入 `lodash` 函数。
- 支持多布局,可根据规则规定哪些路由使用哪种布局。
- 支持 Antd Admin 在 Travis 上自动编译和部署。
- 使用 `Docsify` 生成文档网站。
#### 样式
- 新增 Antd Admin 独立 Logo。
- 重写整体布局组件,优化菜单、面包屑导航自动高亮,菜单自动展开等逻辑。
- 移动端菜单更改为抽屉式。
#### 其他
- 废弃 `IconFont`、 `Search`、`DataTable`等组件,因为在 `Antd` 中有很好的支持和可替代的。
+102
View File
@@ -0,0 +1,102 @@
# 配置项
你可以在 `/src/utils/config.js` 里做一些自定义配置:
## siteName
- 类型: `String`
配置站点名称,应用到登录框,侧边栏顶部的标题文字显示。
## copyright
- 类型: `String`
配置版权声明,应用到登录页、`Primay`布局底部。
## logoPath
- 类型: `String`
配置站点 Logo,应用到登录框,侧边栏顶部的 Logo 显示。
## apiPrefix
- 类型: `String`
配置项目中接口的前缀,接口相关文档可查看 [接口配置](API-configuration.md)
## fixedHeader
- 类型: `String`
在`Primary`布局下,页面滚动时是否固定顶部。
## layouts
- 类型: `Array`
配置哪些路由使用哪种布局,未指定路由使用默认布局 `Public`,项目中目前有 `Primary` 和 `Public` 两种布局,
默认配置如下:
```javascript
layouts: [
{
name: 'primary',
include: [/.*/],
exclude: [/(\/(en|zh))*\/login/],
},
],
```
每种布局的对象属性如下:
- `name` - 布局的名称;
- `include` - 指定使用该布局的路由规则列表,规则可为正则表达式或者字符串;
- `exclude` - 指定不使用该布局的路由规则列表,规则可为正则表达式或者字符串。
> 注意:`exclude` 优先级高于 `include`,前面的布局优先级高于后面的布局。开发过程中可能需要结合`src/layouts`目录下的布局使用,具体方法可查看 [使用布局](./layout.md)。
## i18n
- 类型: `Object`
配置国际化,默认配置如下:
```javascript
i18n: {
languages: [
{
key: 'en',
title: 'English',
flag: '/america.svg',
},
{
key: 'zh',
title: '中文',
flag: '/china.svg',
},
],
defaultLanguage: 'en',
}
```
### i18n.languages
- 类型: `Array`
指定应用支持哪些语言,每种语言的对象属性如下:
- `key` - 语言的`key`,应用到页面 url 上以区分语言,也对应 `src/locales` 目录下的语言包文件夹名;
- `title` - 语言名称,在登录页底部、`Primay` 布局顶部语言切换显示;
- `flag` - 语言的国旗图标的路径,在 `Primay` 布局顶部语言切换显示。
### i18n.defaultLanguage
- 类型: `String`
配置默认语言。
+114
View File
@@ -0,0 +1,114 @@
# 部署
完成开发并且在开发环境验证之后,就需要部署给我们的用户了。
![i18n](../_media/term_build.svg)
## 构建
先执行下面的命令,
```bash
npm run build
```
几秒后,输出应该如下:
```bash
> antd-admin@5.0.0-beta build /Users/zuiidea/web/antd-admin
> umi build
[21:13:17] webpack compiled in 43s 868ms
DONE Compiled successfully in 43877ms 21:13:17
File sizes after gzip:
1.3 MB dist/vendors.async.js
308.21 KB dist/umi.js
45.49 KB dist/vendors.chunk.css
36.08 KB dist/p__chart__highCharts__index.async.js
33.53 KB dist/p__user__index.async.js
22.36 KB dist/p__chart__ECharts__index.async.js
4.21 KB dist/p__dashboard__index.async.js
4.06 KB dist/umi.css
...
```
`build` 命令会打包所有的资源,包含 JavaScript, CSS, web fonts, images, html 等。你可以在 `dist/` 目录下找到这些文件。
> 如果有使用 HashHistory 、 部署 html 到非根目录、静态化等需求,请查看[Umi 部署](https://umijs.org/zh/guide/deploy.html)。
## 本地验证
发布之前,可以通过 `serve` 做本地验证,
```
$ yarn global add serve
$ serve ./dist
Serving!
- Local: http://localhost:5000
- On Your Network: http://{Your IP}:5000
Copied local address to clipboard!
```
访问 [http://localhost:5000](http://localhost:5000),正常情况下法应该是和 `npm start` 一致的(接口可能无法获取到正确数据)。
## 部署
接下来,我们可以把静态文件上传到服务器,如果使用 Nginx 作为 Web server,你可以在 `ngnix.conf` 中这样配置:
```
server
{
listen 80;
# 指定可访问的域名
server_name antd-admin.zuiidea.com;
# 编译后的文件存放的目录
root /home/www/antd-admin/dist;
# 代理服务端接口,避免跨域
location /api {
proxy_pass http://localhost:7000/api;
}
# 因为前端使用了BrowserHistory,所以将路由 fallback 到 index.html
location / {
index index.html;
try_files $uri $uri/ /index.html;
}
}
```
重启 Web server,访问 [http://antd-admin.zuiidea.com](http://antd-admin.zuiidea.com) ,你将看到正确的页面。
```bash
nginx -s reload
```
类似的,如果你使用 Caddy 作为 Web server,你可以在 `Caddyfile` 中这样配置:
```
antd-admin.zuiidea.com {
gzip
root /home/www/antd-admin/dist
proxy /api http://localhost:7000
rewrite {
if {path} not_match ^/api
to {path} {path}/ /
}
}
antd-admin.zuiidea.com/public {
gzip
root /home/www/antd-admin/dist/static/public
}
```
+7
View File
@@ -0,0 +1,7 @@
# 问题集锦
## 新建页面
1. 直接从/src/pages复制一个page (会自动创建路由[umi](https://umijs.org/zh/guide/router.html#%E7%BA%A6%E5%AE%9A%E5%BC%8F%E8%B7%AF%E7%94%B1))
2. 修改 namespace/pathToRegexp 在 model.js
3. 修改 mock中route.js增加一条route
+73
View File
@@ -0,0 +1,73 @@
# 快速上手
> 在开始之前,推荐先学习 [React](http://facebook.github.io/react/) 、 [ES2015+](http://es6.ruanyifeng.com/) 、 [Antd Design](https://ant.design/docs/react/introduce-cn) , 了解 [UmiJS](https://umijs.org/) 、[Dva](http://github.com/dvajs/dva) ,并正确安装和配置了 [Node.js](https://nodejs.org/) v8 或以上 、[Git](https://git-scm.com/)。提前了解和学习这些知识会非常有帮助。
## 安装
```bash
git clone https://github.com/zuiidea/antd-admin.git my-project
cd my-project
```
## 目录结构
应用的目录结构如下
```bash
├── dist/ # 默认build输出目录
├── mock/ # Mock文件目录
├── public/ # 静态资源文件目录
├── src/ # 源码目录
│ ├── components/ # 组件目录
│ ├── e2e/ # e2e目录
│ ├── layouts/ # 布局目录
│ ├── locales/ # 国际化文件目录
│ ├── models/ # 数据模型目录
│ ├── pages/ # 页面组件目录
│ ├── services/ # 数据接口目录
│ │ ├── api.js # 接口配置
│ │ └── index.js # 接口输出
│ ├── themes/ # 项目样式目录
│ │ ├── default.less # 样式变量
│ │ ├── index.less # 全局样式
│ │ ├── mixin.less # 样式函数
│ │ └── vars.less # 样式变量及函数
│ ├── utils/ # 工具函数目录
│ │ ├── config.js # 项目配置
│ │ ├── constant.js # 静态常量
│ │ ├── index.js # 工具函数
│ │ ├── request.js # 异步请求函数(axios)
│ │ └── theme.js # 项目需要在js中使用到样式变量
├── .editorconfig # 编辑器配置
├── .env # 环境变量
├── .eslintrc # ESlint配置
├── .gitignore # Git忽略文件配置
├── .prettierignore # Prettier忽略文件配置
├── .prettierrc # Prettier配置
├── .stylelintrc.json # Stylelint配置
├── .travis.yml # Travis配置
└── .umirc.js # Umi配置
└── package.json # 项目信息
```
## 本地开发
1. 进入目录安装依赖,国内用户推荐使用 [cnpm](https://cnpmjs.org) 进行加速
```bash
yarn install
```
或者
```bash
npm install
```
2. 启动本地服务器
```bash
npm run start
```
3. 启动完成后打开浏览器访问 [http://localhost:7000](http://localhost:7000),如果需要更改启动端口,可在 `.env` 文件中配置。
+75
View File
@@ -0,0 +1,75 @@
# 国际化
## 新增应用语言
以新增日语为例。
![i18n](../_media/term_i18n.svg)
1. 添加语言包本地文件,`ja` 为日语的语言代码,支持翻译的语言列表参考 [有道智云](http://ai.youdao.com/docs/doc-trans-api.s#p05),运行下面命令后会生成 `src/locales/ja/messages.json` 文件。
```bash
npm run add-locale ja
```
2. 提取代码中需要翻译的字段,即 `<Trans>message</Trans>`、`` intl.formatMessage({ id: 'message `` 中 `message` 字段,运行下面命令后 `src/locales/ja/messages.json' }) 将会出现提取后的字段配置。
```bash
npm run extract
```
你将看到如下信息:
```bash
Catalog statistics:
┌─────────────┬─────────────┬─────────┐
│ Language │ Total count │ Missing │
├─────────────┼─────────────┼─────────┤
│ en (source) │ 52 │ - │
│ ja │ 52 │ 52 │
│ zh │ 52 │ 0 │
└─────────────┴─────────────┴─────────┘
```
3. 与此同时,我们在 `src/utils/config.js` 新增相关配置。
```javascript
{
...
i18n: {
languages: [
...
{
key:'ja',
title: '日本語',
flag: '/japanese.svg',
},
],
},
}
```
>  路由相关效果,配置后 `npm run start` 重启后生效。
4. 使用内置的命令进行自动翻译,在 `src/locales/ja/messages.json` 中将会看到翻译后的配置。
```bash
npm run trans:only
```
你将看到如下信息:
```bash
start: en -> ja
...
youdao: en -> ja: Unpublished -> 未発表
youdao: en -> ja: Update -> 更新
youdao: en -> ja: Update User -> ユーザーの更新
youdao: en -> ja: Username -> 名
...
All translations have been completed.
```
> `npm run trans` 将会依次执行 `npm run extract` 和 `npm run trans:only`
5. 最后,可以在 `src/locales/ja/messages.json` 中对翻译不准确的的字段进行调整。启动开发模式 `npm run start`,打开 [http://localhost:7000/ja/login](http://localhost:7000/ja/login),你将看到日语版本的应用。
+60
View File
@@ -0,0 +1,60 @@
# 布局
## 新增布局
以新增名为 `secondary` 的布局为例,使以 `seconday` 开头的路由都使用该布局。
1. 在 `src/utils/config.js` 新增相关配置,参数详细请查看 [layouts](/zh-cn/configuration?id=layouts)。
```javascript
layouts: [
{
name: 'primary',
include: [/.*/],
exclude: [/(\/(en|zh))*\/login/, /(\/(en|zh))*\/seconday\/(.*)/],
},
{
name: 'secondary',
include: [/(\/(en|zh))*\/seconday\/(.*)/],
},
],
```
2. 在`src/layouts/BaseLayout.js` 文件中新增 `secondary` 布局组件。
```javascript
import SecondaryLayout from './SecondaryLayout'
const LayoutMap = {
primary: PrimaryLayout,
public: PublicLayout,
secondary: SecondaryLayout,
}
```
3. 在`src/layouts/` 目录中新增 `SecondaryLayout.js` 文件。
```javascript
import React from 'react'
export default ({ children }) => {
return (
<div>
<h1>Seconday</h1>
{children}
</div>
)
}
```
4. 在`src/pages/` 目录中新增 `seconday/index.js` 文件。
```javascript
import React from 'react'
export default ({ children }) => {
return <div>Seconday page Content</div>
}
```
5. 最后,启动开发模式 `npm run start`,打开 [http://localhost:7000/seconday/](http://localhost:7000/seconday/),你将看到 `seconday` 布局的页面。
+24
View File
@@ -0,0 +1,24 @@
# HTTP请求
本项目使用了axios提供http请求服务,文件在src/utils/request.js
## 自定义Header
为了提供鉴权、修改cookie等服务,可以手动修改Header
```
axios.defaults.headers.common['Authorization'] = 'token'
```
或者
```
// 添加请求拦截器
axios.interceptors.request.use(function (config) {
// 在发送请求之前做些什么
config.headers.token = window.localStorage.getItem('token');
return config;
}, function (error) {
return Promise.reject(error);
});
```
+5
View File
@@ -0,0 +1,5 @@
# 路由
本项目中采用约定式路由
参考[umi 路由](https://umijs.org/zh/guide/router.html)
-1
View File
@@ -1 +0,0 @@
webpackJsonp([13],{940:function(e,t){e.exports={error:"error___2u_Y6"}},1474:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var u=(r(213),r(80)),a=n(u),l=r(1),o=n(l),d=r(940),f=n(d),c=function(){return o["default"].createElement("div",{className:"content-inner"},o["default"].createElement("div",{className:f["default"].error},o["default"].createElement(a["default"],{type:"frown-o"}),o["default"].createElement("h1",null,"404 Not Found")))};t["default"]=c,e.exports=t["default"]}});
-1
View File
File diff suppressed because one or more lines are too long
-12
View File
@@ -1,12 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Ant Design Admin</title>
<script language="javascript" type="text/javascript">
window.location.href="http://47.92.30.98:8000";
</script>
</head>
</html>
-123
View File
File diff suppressed because one or more lines are too long
+3
View File
@@ -0,0 +1,3 @@
module.exports = {
testURL: 'http://localhost:8000',
}
+36
View File
@@ -0,0 +1,36 @@
{
"name": "Antd-Admin",
"start_url": ".",
"display": "standalone",
"background_color": "#fff",
"description": "A front-end solution for enterprise applications built upon Ant Design and UmiJS",
"icons": [{
"src": "logo/logo@96.png",
"sizes": "72x72"
},
{
"src": "logo/logo@128.png",
"sizes": "128x128"
},
{
"src": "logo/logo@144.png",
"sizes": "144x144"
},
{
"src": "logo/logo@152.png",
"sizes": "152x152"
},
{
"src": "logo/logo@192.png",
"sizes": "192x192"
},
{
"src": "logo/logo@384.png",
"sizes": "384x384"
},
{
"src": "logo/logo@512.png",
"sizes": "512x512"
}
]
}
+59
View File
@@ -0,0 +1,59 @@
/**
* Query objects that specify keys and values in an array where all values are objects.
* @param {array} array An array where all values are objects, like [{key:1},{key:2}].
* @param {string} key The key of the object that needs to be queried.
* @param {string} value The value of the object that needs to be queried.
* @return {object|undefined} Return frist object when query success.
*/
export function queryArray(array, key, value) {
if (!Array.isArray(array)) {
return
}
return array.filter(_ => _[key] === value)
}
export function randomNumber(min, max) {
return Math.floor(Math.random() * (max - min) + min)
}
export function randomAvatar() {
const avatarList = [
'photo-1549492864-2ec7d66ffb04.jpeg',
'photo-1480535339474-e083439a320d.jpeg',
'photo-1523419409543-a5e549c1faa8.jpeg',
'photo-1519648023493-d82b5f8d7b8a.jpeg',
'photo-1523307730650-594bc63f9d67.jpeg',
'photo-1522962506050-a2f0267e4895.jpeg',
'photo-1489779162738-f81aed9b0a25.jpeg',
'photo-1534308143481-c55f00be8bd7.jpeg',
'photo-1519336555923-59661f41bb45.jpeg',
'photo-1551438632-e8c7d9a5d1b7.jpeg',
'photo-1525879000488-bff3b1c387cf.jpeg',
'photo-1487412720507-e7ab37603c6f.jpeg',
'photo-1510227272981-87123e259b17.jpeg'
]
return `//image.zuiidea.com/${avatarList[randomNumber(0, avatarList.length - 1)]}?imageView2/1/w/200/h/200/format/webp/q/75|imageslim`
}
export const Constant = {
ApiPrefix: '/api/v1',
NotFound: {
message: 'Not Found',
documentation_url: '',
},
Color: {
green: '#64ea91',
blue: '#8fc9fb',
purple: '#d897eb',
red: '#f69899',
yellow: '#f8c82e',
peach: '#f797d6',
borderBase: '#e5e5e5',
borderSplit: '#f4f4f4',
grass: '#d6fbb5',
sky: '#c1e0fc',
},
}
export Mock from 'mockjs'
export qs from 'qs'
+142
View File
@@ -0,0 +1,142 @@
import { Mock, Constant } from './_utils'
const { ApiPrefix, Color } = Constant
const Dashboard = Mock.mock({
'sales|8': [
{
'name|+1': 2008,
'Clothes|200-500': 1,
'Food|180-400': 1,
'Electronics|300-550': 1,
},
],
cpu: {
'usage|50-600': 1,
space: 825,
'cpu|40-90': 1,
'data|20': [
{
'cpu|20-80': 1,
},
],
},
browser: [
{
name: 'Google Chrome',
percent: 43.3,
status: 1,
},
{
name: 'Mozilla Firefox',
percent: 33.4,
status: 2,
},
{
name: 'Apple Safari',
percent: 34.6,
status: 3,
},
{
name: 'Internet Explorer',
percent: 12.3,
status: 4,
},
{
name: 'Opera Mini',
percent: 3.3,
status: 1,
},
{
name: 'Chromium',
percent: 2.53,
status: 1,
},
],
user: {
name: 'github',
sales: 3241,
sold: 3556,
},
'completed|12': [
{
'name|+1': 2008,
'Task complete|200-1000': 1,
'Cards Complete|200-1000': 1,
},
],
'comments|5': [
{
name: '@last',
'status|1-3': 1,
content: '@sentence',
avatar() {
return Mock.Random.image(
'48x48',
Mock.Random.color(),
'#757575',
'png',
this.name.substr(0, 1)
)
},
date() {
return `2016-${Mock.Random.date('MM-dd')} ${Mock.Random.time(
'HH:mm:ss'
)}`
},
},
],
'recentSales|36': [
{
'id|+1': 1,
name: '@last',
'status|1-4': 1,
date() {
return `${Mock.Random.integer(2015, 2016)}-${Mock.Random.date(
'MM-dd'
)} ${Mock.Random.time('HH:mm:ss')}`
},
'price|10-200.1-2': 1,
},
],
quote: {
name: 'Joho Doe',
title: 'Graphic Designer',
content:
"I'm selfish, impatient and a little insecure. I make mistakes, I am out of control and at times hard to handle. But if you can't handle me at my worst, then you sure as hell don't deserve me at my best.",
avatar:
'//cdn.antd-admin.zuiidea.com/bc442cf0cc6f7940dcc567e465048d1a8d634493198c4-sPx5BR_fw236',
},
numbers: [
{
icon: 'pay-circle-o',
color: Color.green,
title: 'Online Review',
number: 2781,
},
{
icon: 'team',
color: Color.blue,
title: 'New Customers',
number: 3241,
},
{
icon: 'message',
color: Color.purple,
title: 'Active Projects',
number: 253,
},
{
icon: 'shopping-cart',
color: Color.red,
title: 'Referrals',
number: 4324,
},
],
})
module.exports = {
[`GET ${ApiPrefix}/dashboard`](req, res) {
res.json(Dashboard)
},
}
+67
View File
@@ -0,0 +1,67 @@
import { Mock, Constant } from './_utils'
const { ApiPrefix } = Constant
let postId = 0
const database = Mock.mock({
'data|100': [
{
id() {
postId += 1
return postId + 10000
},
'status|1-2': 1,
title: '@title',
author: '@last',
categories: '@word',
tags: '@word',
'views|10-200': 1,
'comments|10-200': 1,
visibility: () => {
return Mock.mock(
'@pick(["Public",' + '"Password protected", ' + '"Private"])'
)
},
date: '@dateTime',
image() {
return Mock.Random.image(
'100x100',
Mock.Random.color(),
'#757575',
'png',
this.author.substr(0, 1)
)
},
},
],
}).data
module.exports = {
[`GET ${ApiPrefix}/posts`](req, res) {
const { query } = req
let { pageSize, page, ...other } = query
pageSize = pageSize || 10
page = page || 1
let newData = database
for (let key in other) {
if ({}.hasOwnProperty.call(other, key)) {
newData = newData.filter(item => {
if ({}.hasOwnProperty.call(item, key)) {
return (
String(item[key])
.trim()
.indexOf(decodeURI(other[key]).trim()) > -1
)
}
return true
})
}
}
res.status(200).json({
data: newData.slice((page - 1) * pageSize, page * pageSize),
total: newData.length,
})
},
}
+155
View File
@@ -0,0 +1,155 @@
import { Constant } from './_utils'
const { ApiPrefix } = Constant
const database = [
{
id: '1',
icon: 'dashboard',
name: 'Dashboard',
zh: {
name: '仪表盘'
},
'pt-br': {
name: 'Dashboard'
},
route: '/dashboard',
},
{
id: '2',
breadcrumbParentId: '1',
name: 'Users',
zh: {
name: '用户管理'
},
'pt-br': {
name: 'Usuário'
},
icon: 'user',
route: '/user',
},
{
id: '7',
breadcrumbParentId: '1',
name: 'Posts',
zh: {
name: '用户管理'
},
'pt-br': {
name: 'Posts'
},
icon: 'shopping-cart',
route: '/post',
},
{
id: '21',
menuParentId: '-1',
breadcrumbParentId: '2',
name: 'User Detail',
zh: {
name: '用户详情'
},
'pt-br': {
name: 'Detalhes do usuário'
},
route: '/user/:id',
},
{
id: '3',
breadcrumbParentId: '1',
name: 'Request',
zh: {
name: 'Request'
},
'pt-br': {
name: 'Requisição'
},
icon: 'api',
route: '/request',
},
{
id: '4',
breadcrumbParentId: '1',
name: 'UI Element',
zh: {
name: 'UI组件'
},
'pt-br': {
name: 'Elementos UI'
},
icon: 'camera-o',
},
{
id: '45',
breadcrumbParentId: '4',
menuParentId: '4',
name: 'Editor',
zh: {
name: 'Editor'
},
'pt-br': {
name: 'Editor'
},
icon: 'edit',
route: '/editor',
},
{
id: '5',
breadcrumbParentId: '1',
name: 'Charts',
zh: {
name: 'Charts'
},
'pt-br': {
name: 'Graficos'
},
icon: 'code-o',
},
{
id: '51',
breadcrumbParentId: '5',
menuParentId: '5',
name: 'ECharts',
zh: {
name: 'ECharts'
},
'pt-br': {
name: 'ECharts'
},
icon: 'line-chart',
route: '/chart/ECharts',
},
{
id: '52',
breadcrumbParentId: '5',
menuParentId: '5',
name: 'HighCharts',
zh: {
name: 'HighCharts'
},
'pt-br': {
name: 'HighCharts'
},
icon: 'bar-chart',
route: '/chart/highCharts',
},
{
id: '53',
breadcrumbParentId: '5',
menuParentId: '5',
name: 'Rechartst',
zh: {
name: 'Rechartst'
},
'pt-br': {
name: 'Rechartst'
},
icon: 'area-chart',
route: '/chart/Recharts',
},
]
module.exports = {
[`GET ${ApiPrefix}/routes`](req, res) {
res.status(200).json(database)
},
}
+250
View File
@@ -0,0 +1,250 @@
import { Mock, Constant, randomAvatar } from './_utils'
import qs from 'qs'
const { ApiPrefix } = Constant
let usersListData = Mock.mock({
'data|80-100': [
{
id: '@id',
name: '@name',
nickName: '@last',
phone: /^1[34578]\d{9}$/,
'age|11-99': 1,
address: '@county(true)',
isMale: '@boolean',
email: '@email',
createTime: '@datetime',
avatar() {
return randomAvatar()
},
},
],
})
let database = usersListData.data
const EnumRoleType = {
ADMIN: 'admin',
DEFAULT: 'guest',
DEVELOPER: 'developer',
}
const userPermission = {
DEFAULT: {
visit: ['1', '2', '21', '7', '5', '51', '52', '53'],
role: EnumRoleType.DEFAULT,
},
ADMIN: {
role: EnumRoleType.ADMIN,
},
DEVELOPER: {
role: EnumRoleType.DEVELOPER,
},
}
const adminUsers = [
{
id: 0,
username: 'admin',
password: 'admin',
permissions: userPermission.ADMIN,
avatar: randomAvatar(),
},
{
id: 1,
username: 'guest',
password: 'guest',
permissions: userPermission.DEFAULT,
avatar: randomAvatar(),
},
{
id: 2,
username: '吴彦祖',
password: '123456',
permissions: userPermission.DEVELOPER,
avatar: randomAvatar(),
},
]
const queryArray = (array, key, keyAlias = 'key') => {
if (!(array instanceof Array)) {
return null
}
let data
for (let item of array) {
if (item[keyAlias] === key) {
data = item
break
}
}
if (data) {
return data
}
return null
}
const NOTFOUND = {
message: 'Not Found',
documentation_url: 'http://localhost:8000/request',
}
module.exports = {
[`POST ${ApiPrefix}/user/login`](req, res) {
const { username, password } = req.body
const user = adminUsers.filter(item => item.username === username)
if (user.length > 0 && user[0].password === password) {
const now = new Date()
now.setDate(now.getDate() + 1)
res.cookie(
'token',
JSON.stringify({ id: user[0].id, deadline: now.getTime() }),
{
maxAge: 900000,
httpOnly: true,
}
)
res.json({ success: true, message: 'Ok' })
} else {
res.status(400).end()
}
},
[`GET ${ApiPrefix}/user/logout`](req, res) {
res.clearCookie('token')
res.status(200).end()
},
[`GET ${ApiPrefix}/user`](req, res) {
const cookie = req.headers.cookie || ''
const cookies = qs.parse(cookie.replace(/\s/g, ''), { delimiter: ';' })
const response = {}
let user = {}
if (!cookies.token) {
res.status(200).send({ message: 'Not Login' })
return
}
const token = JSON.parse(cookies.token)
if (token) {
response.success = token.deadline > new Date().getTime()
}
if (response.success) {
const userItem = adminUsers.find(_ => _.id === token.id)
if (userItem) {
const { password, ...other } = userItem
user = other
}
}
response.user = user
res.json(response)
},
[`GET ${ApiPrefix}/users`](req, res) {
const { query } = req
let { pageSize, page, ...other } = query
pageSize = pageSize || 10
page = page || 1
let newData = database
for (let key in other) {
if ({}.hasOwnProperty.call(other, key)) {
newData = newData.filter(item => {
if ({}.hasOwnProperty.call(item, key)) {
if (key === 'address') {
return other[key].every(iitem => item[key].indexOf(iitem) > -1)
} else if (key === 'createTime') {
const start = new Date(other[key][0]).getTime()
const end = new Date(other[key][1]).getTime()
const now = new Date(item[key]).getTime()
if (start && end) {
return now >= start && now <= end
}
return true
}
return (
String(item[key])
.trim()
.indexOf(decodeURI(other[key]).trim()) > -1
)
}
return true
})
}
}
res.status(200).json({
data: newData.slice((page - 1) * pageSize, page * pageSize),
total: newData.length,
})
},
[`POST ${ApiPrefix}/users/delete`](req, res) {
const { ids=[] } = req.body
database = database.filter(item => !ids.some(_ => _ === item.id))
res.status(204).end()
},
[`POST ${ApiPrefix}/user`](req, res) {
const newData = req.body
newData.createTime = Mock.mock('@now')
newData.avatar =
newData.avatar ||
Mock.Random.image(
'100x100',
Mock.Random.color(),
'#757575',
'png',
newData.nickName.substr(0, 1)
)
newData.id = Mock.mock('@id')
database.unshift(newData)
res.status(200).end()
},
[`GET ${ApiPrefix}/user/:id`](req, res) {
const { id } = req.params
const data = queryArray(database, id, 'id')
if (data) {
res.status(200).json(data)
} else {
res.status(200).json(NOTFOUND)
}
},
[`DELETE ${ApiPrefix}/user/:id`](req, res) {
const { id } = req.params
const data = queryArray(database, id, 'id')
if (data) {
database = database.filter(item => item.id !== id)
res.status(204).end()
} else {
res.status(200).json(NOTFOUND)
}
},
[`PATCH ${ApiPrefix}/user/:id`](req, res) {
const { id } = req.params
const editItem = req.body
let isExist = false
database = database.map(item => {
if (item.id === id) {
isExist = true
return Object.assign({}, item, editItem)
}
return item
})
if (isExist) {
res.status(201).end()
} else {
res.status(200).json(NOTFOUND)
}
},
}
+115
View File
@@ -0,0 +1,115 @@
{
"name": "antd-admin",
"version": "5.3.0",
"license": "MIT",
"description": "An admin dashboard application demo built upon Ant Design and UmiJS",
"dependencies": {
"@ant-design/icons": "^4.2.2",
"@lingui/react": "^2.8.0",
"antd": "^4.0.0",
"axios": "^0.19.0",
"classnames": "^2.2.6",
"d3-shape": "^1.3.0",
"draft-js": "^0.11.7",
"draftjs-to-html": "^0.9.0",
"draftjs-to-markdown": "^0.6.0",
"dva-model-extend": "^0.1.2",
"echarts": "^4.4.0",
"echarts-for-react": "^2.0.15-beta.1",
"echarts-gl": "^1.1.1",
"echarts-liquidfill": "^2.0.2",
"enquire-js": "^0.2.1",
"highcharts-exporting": "^0.1.7",
"highcharts-more": "^0.1.7",
"json-format": "^1.0.1",
"lodash": "^4.17.11",
"md5": "^2.2.1",
"nprogress": "^0.2.0",
"path-to-regexp": "^6.1.0",
"prop-types": "^15.7.0",
"qs": "^6.9.0",
"react-adsense": "^0.1.0",
"react-countup": "^4.2.0",
"react-draft-wysiwyg": "^1.13.0",
"react-helmet": "^6.0.0",
"react-highcharts": "^16.1.0",
"react-perfect-scrollbar": "^1.5.0",
"recharts": "^2.0.0-beta.3",
"store": "^2.0.0"
},
"devDependencies": {
"@lingui/babel-preset-react": "^2.9.0",
"@lingui/cli": "^2.9.0",
"@lingui/loader": "^2.9.0",
"@umijs/preset-react": "^1.4.0",
"babel-eslint": "^10.0.1",
"babel-plugin-dev-expression": "^0.2.1",
"babel-plugin-module-resolver": "^4.0.0",
"cross-env": "^7.0.0",
"eslint": "^7.0.0",
"eslint-config-react-app": "^5.0.0",
"eslint-plugin-flowtype": "^5.1.0",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.14.0",
"eslint-plugin-react-hooks": "^4.0.0",
"husky": "^4.2.0",
"less-vars-to-js": "^1.3.0",
"lint-staged": "^10.0.0",
"mockjs": "^1.1.0",
"module": "^1.2.5",
"prettier": "^2.0.0",
"stylelint": "^13.2.0",
"stylelint-config-prettier": "^8.0.0",
"stylelint-config-standard": "^20.0.0",
"typescript": "^3.8.3",
"umi": "^3.2.0"
},
"engines": {
"node": ">= 10.0.0"
},
"lint-staged": {
"src/**/*.js": [
"eslint --ext .js --fix",
"npm run prettier",
"git add"
],
"**/*.less": [
"stylelint --syntax less",
"npm run prettier",
"git add"
]
},
"lingui": {
"fallbackLocale": "en",
"sourceLocale": "en",
"localeDir": "src/locales",
"srcPathDirs": [
"src/pages",
"src/layouts",
"src/components",
"src/layouts"
],
"format": "minimal",
"extractBabelOptions": {
"presets": [
"@umijs/babel-preset-umi"
]
}
},
"scripts": {
"analyze": "cross-env ANALYZE=1 umi build",
"build": "umi build",
"check:model": "umi dva list model",
"lint:js": "eslint --ext .js src",
"lint:style": "stylelint \"src/**/*.less\" --syntax less",
"start": "umi dev",
"test": "cross-env BABELRC=none umi test",
"prettier": "prettier --write 'src/**/*.{js,less}'",
"precommit": "lint-staged",
"add-locale": "lingui add-locale",
"extract": "lingui extract",
"trans": "lingui extract --clean && node ./scripts/translate.js",
"doc": "docsify serve docs"
}
}
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<rect style="fill:#F0F0F0;" width="512" height="512"/>
<g>
<rect y="64" style="fill:#D80027;" width="512" height="64"/>
<rect y="192" style="fill:#D80027;" width="512" height="64"/>
<rect y="320" style="fill:#D80027;" width="512" height="64"/>
<rect y="448" style="fill:#D80027;" width="512" height="64"/>
</g>
<rect style="fill:#2E52B2;" width="256" height="275.69"/>
<g>
<polygon style="fill:#F0F0F0;" points="51.518,115.318 45.924,132.529 27.826,132.529 42.469,143.163 36.875,160.375
51.518,149.741 66.155,160.375 60.56,143.163 75.203,132.529 57.106,132.529 "/>
<polygon style="fill:#F0F0F0;" points="57.106,194.645 51.518,177.434 45.924,194.645 27.826,194.645 42.469,205.279
36.875,222.49 51.518,211.857 66.155,222.49 60.56,205.279 75.203,194.645 "/>
<polygon style="fill:#F0F0F0;" points="51.518,53.202 45.924,70.414 27.826,70.414 42.469,81.047 36.875,98.259 51.518,87.625
66.155,98.259 60.56,81.047 75.203,70.414 57.106,70.414 "/>
<polygon style="fill:#F0F0F0;" points="128.003,115.318 122.409,132.529 104.311,132.529 118.954,143.163 113.36,160.375
128.003,149.741 142.64,160.375 137.045,143.163 151.689,132.529 133.591,132.529 "/>
<polygon style="fill:#F0F0F0;" points="133.591,194.645 128.003,177.434 122.409,194.645 104.311,194.645 118.954,205.279
113.36,222.49 128.003,211.857 142.64,222.49 137.045,205.279 151.689,194.645 "/>
<polygon style="fill:#F0F0F0;" points="210.076,194.645 204.489,177.434 198.894,194.645 180.797,194.645 195.44,205.279
189.845,222.49 204.489,211.857 219.125,222.49 213.531,205.279 228.174,194.645 "/>
<polygon style="fill:#F0F0F0;" points="204.489,115.318 198.894,132.529 180.797,132.529 195.44,143.163 189.845,160.375
204.489,149.741 219.125,160.375 213.531,143.163 228.174,132.529 210.076,132.529 "/>
<polygon style="fill:#F0F0F0;" points="128.003,53.202 122.409,70.414 104.311,70.414 118.954,81.047 113.36,98.259
128.003,87.625 142.64,98.259 137.045,81.047 151.689,70.414 133.591,70.414 "/>
<polygon style="fill:#F0F0F0;" points="204.489,53.202 198.894,70.414 180.797,70.414 195.44,81.047 189.845,98.259
204.489,87.625 219.125,98.259 213.531,81.047 228.174,70.414 210.076,70.414 "/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-49 141 512 512" style="enable-background:new -49 141 512 512;" xml:space="preserve">
<style type="text/css">
.st0{fill:#D80027;}
.st1{fill:#FFDA44;}
</style>
<rect x="-49" y="141" class="st0" width="512" height="512"/>
<g>
<polygon class="st1" points="91.1,296.8 113.2,364.8 184.7,364.8 126.9,406.9 149,474.9 91.1,432.9 33.2,474.9 55.4,406.9
-2.5,364.8 69,364.8 "/>
<polygon class="st1" points="254.5,537.5 237.6,516.7 212.6,526.4 227.1,503.9 210.2,483 236.1,489.9 250.7,467.4 252.1,494.2
278.1,501.1 253,510.7 "/>
<polygon class="st1" points="288.1,476.5 296.1,450.9 274.2,435.4 301,435 308.9,409.4 317.6,434.8 344.4,434.5 322.9,450.5
331.5,475.9 309.6,460.4 "/>
<polygon class="st1" points="333.4,328.9 321.6,353 340.8,371.7 314.3,367.9 302.5,391.9 297.9,365.5 271.3,361.7 295.1,349.2
290.5,322.7 309.7,341.4 "/>
<polygon class="st1" points="255.2,255.9 253.2,282.6 278.1,292.7 252,299.1 250.1,325.9 236,303.1 209.9,309.5 227.2,289
213,266.3 237.9,276.4 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

+24
View File
@@ -0,0 +1,24 @@
<svg width="169px" height="141px" viewBox="0 0 169 141" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 51.3 (57544) - http://www.bohemiancoding.com/sketch -->
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="54.0428975%" y1="4.39752391%" x2="54.0428975%" y2="108.456714%" id="linearGradient-1">
<stop stop-color="#29CDFF" offset="0%"></stop>
<stop stop-color="#148EFF" offset="62.3089445%"></stop>
<stop stop-color="#0A60FF" offset="100%"></stop>
</linearGradient>
<linearGradient x1="50%" y1="14.2201464%" x2="50%" y2="113.263844%" id="linearGradient-2">
<stop stop-color="#FA816E" offset="0%"></stop>
<stop stop-color="#F74A5C" offset="65.9092442%"></stop>
<stop stop-color="#F51D2C" offset="100%"></stop>
</linearGradient>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group" transform="translate(0.000000, -5.000000)">
<rect id="Rectangle" fill="url(#linearGradient-1)" transform="translate(83.718923, 75.312358) rotate(-24.000000) translate(-83.718923, -75.312358) " x="68.7189234" y="0.312357954" width="30" height="150" rx="15"></rect>
<rect id="Rectangle" fill="url(#linearGradient-1)" transform="translate(129.009910, 75.580213) rotate(-24.000000) translate(-129.009910, -75.580213) " x="114.00991" y="0.580212739" width="30" height="150" rx="15"></rect>
<circle id="Oval" fill="url(#linearGradient-2)" cx="25" cy="120" r="25"></circle>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

+40
View File
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<rect style="fill:#D80027;" width="512" height="512"/>
<polygon style="fill:#6DA544;" points="196.641,0 196.641,264.348 196.641,512 0,512 0,0 "/>
<circle style="fill:#FFDA44;" cx="196.641" cy="256" r="96"/>
<path style="fill:#D80027;" d="M142.638,208v60c0,29.823,24.178,54,54,54s54-24.178,54-54v-60H142.638z"/>
<path style="fill:#F0F0F0;" d="M196.638,286c-9.925,0-18-8.075-18-18v-24.001h36V268C214.638,277.925,206.563,286,196.638,286z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 973 B

-1
View File
File diff suppressed because one or more lines are too long
+114
View File
@@ -0,0 +1,114 @@
/**
* Youdao Translate, My private account is for testing purposes only.
* Please go to the official account to apply for an account. Thank you for your cooperation.
* APP ID:055c2d71f9a05214
* Secret key:ZcpuQxQW3NkQeKVkqrXIKQYXH57g2KuN
*/
/* eslint-disable */
const md5 = require('md5')
const qs = require('qs')
const fs = require('fs')
const path = require('path')
const axios = require('axios')
const jsonFormat = require('json-format')
const { i18n } = require('../src/utils/config')
const { languages, defaultLanguage } = i18n
const locales = {}
languages.forEach(item => {
locales[item.key] = require(`../src/locales/${item.key}/messages.json`)
})
const youdao = ({ q, from, to }) =>
new Promise((resolve, reject) => {
{
const appid = '055c2d71f9a05214'
const appse = 'ZcpuQxQW3NkQeKVkqrXIKQYXH57g2KuN'
const salt = Date.now()
const sign = md5(appid + q + salt + appse)
const query = qs.stringify({
q,
from,
to,
appKey: appid,
salt,
sign,
})
axios.get(`http://openapi.youdao.com/api?${query}`).then(({ data }) => {
if (data.query && data.translation[0]) {
resolve(data.translation[0])
} else {
resolve(q)
}
})
}
})
const transform = async ({ from, to, locales, outputPath }) => {
for (const key in locales[from]) {
if (locales[to][key]) {
console.log(`add to skip: ${key}`)
} else {
let res = key
let way = 'youdao'
if (key.indexOf('/') !== 0) {
const reg = '{([^{}]*)}'
const tasks = key
.match(new RegExp(`${reg}|((?<=(${reg}|^)).*?(?=(${reg}|$)))`, 'g'))
.map(item => {
if (new RegExp(reg).test(item)) {
return Promise.resolve(item)
}
return youdao({
q: item,
from,
to,
})
})
res = (await Promise.all(tasks)).join('')
} else {
res = `/${to + key}`
way = 'link'
}
if (res !== key) {
locales[to][key] = res
console.log(`${way}: ${from} -> ${to}: ${key} -> ${res}`)
} else {
console.log(`same: ${from} -> ${to}: ${key}`)
}
}
}
await fs.writeFileSync(
path.resolve(__dirname, outputPath),
jsonFormat(locales[to], {
type: 'space',
size: 2,
})
)
}
;(async () => {
const tasks = languages
.map(item => ({
from: defaultLanguage,
to: item.key,
}))
.filter(item => item.from !== item.to)
for (const item of tasks) {
console.log(`start: ${item.from} -> ${item.to}`)
await transform({
from: item.from,
to: item.to,
locales,
outputPath: `../src/locales/${item.to}/messages.json`,
})
console.log(`completed: ${item.from} -> ${item.to}`)
}
console.log('All translations have been completed.')
})()
+35
View File
@@ -0,0 +1,35 @@
import React from 'react'
import PropTypes from 'prop-types'
import { BarsOutlined, DownOutlined } from '@ant-design/icons'
import { Dropdown, Button, Menu } from 'antd'
const DropOption = ({
onMenuClick,
menuOptions = [],
buttonStyle,
dropdownProps,
}) => {
const menu = menuOptions.map(item => (
<Menu.Item key={item.key}>{item.name}</Menu.Item>
))
return (
<Dropdown
overlay={<Menu onClick={onMenuClick}>{menu}</Menu>}
{...dropdownProps}
>
<Button style={{ border: 'none', ...buttonStyle }}>
<BarsOutlined style={{ marginRight: 2 }} />
<DownOutlined />
</Button>
</Dropdown>
)
}
DropOption.propTypes = {
onMenuClick: PropTypes.func,
menuOptions: PropTypes.array.isRequired,
buttonStyle: PropTypes.object,
dropdownProps: PropTypes.object,
}
export default DropOption
+6
View File
@@ -0,0 +1,6 @@
{
"name": "DropOption",
"version": "0.0.0",
"private": true,
"main": "./DropOption.js"
}
+17
View File
@@ -0,0 +1,17 @@
import React from 'react'
import { Editor } from 'react-draft-wysiwyg'
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'
import styles from './Editor.less'
const DraftEditor = props => {
return (
<Editor
toolbarClassName={styles.toolbar}
wrapperClassName={styles.wrapper}
editorClassName={styles.editor}
{...props}
/>
)
}
export default DraftEditor
+106
View File
@@ -0,0 +1,106 @@
.wrapper {
height: 500px;
:global {
.rdw-dropdownoption-default {
padding: 6px;
}
.rdw-dropdown-optionwrapper {
box-sizing: content-box;
width: 100%;
border-radius: 0 0 2px 2px;
&:hover {
box-shadow: none;
}
}
.rdw-inline-wrapper {
flex-wrap: wrap;
margin-bottom: 0;
.rdw-option-wrapper {
margin-bottom: 6px;
}
}
.rdw-option-active {
box-shadow: 1px 1px 0 #e8e8e8 inset;
}
.rdw-colorpicker-option {
box-shadow: none;
}
.rdw-colorpicker-modal,
.rdw-embedded-modal,
.rdw-emoji-modal,
.rdw-image-modal,
.rdw-link-modal {
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
}
.rdw-colorpicker-modal,
.rdw-embedded-modal,
.rdw-link-modal {
height: auto;
}
.rdw-emoji-modal {
width: 214px;
}
.rdw-colorpicker-modal {
width: auto;
}
.rdw-embedded-modal-btn,
.rdw-image-modal-btn,
.rdw-link-modal-btn {
height: 32px;
margin-top: 12px;
}
.rdw-embedded-modal-input,
.rdw-embedded-modal-size-input,
.rdw-link-modal-input {
padding: 2px 6px;
height: 32px;
}
.rdw-dropdown-selectedtext {
color: #000;
}
.rdw-dropdown-wrapper,
.rdw-option-wrapper {
min-width: 36px;
transition: all 0.2s ease;
height: 30px;
&:active {
box-shadow: 1px 1px 0 #e8e8e8 inset;
}
&:hover {
box-shadow: 1px 1px 0 #e8e8e8;
}
}
.rdw-dropdown-wrapper {
min-width: 60px;
}
.rdw-editor-main {
box-sizing: border-box;
}
}
.editor {
border: 1px solid #f1f1f1;
padding: 5px;
border-radius: 2px;
height: auto;
min-height: 200px;
}
}
+6
View File
@@ -0,0 +1,6 @@
{
"name": "Editor",
"version": "0.0.0",
"private": true,
"main": "./Editor.js"
}
+21
View File
@@ -0,0 +1,21 @@
import React from 'react';
import { TooltipProps } from 'antd/lib/tooltip';
export interface EllipsisTooltipProps extends TooltipProps {
title?: undefined;
overlayStyle?: undefined;
}
export interface EllipsisProps {
tooltip?: boolean | EllipsisTooltipProps;
length?: number;
lines?: number;
style?: React.CSSProperties;
className?: string;
fullWidthRecognition?: boolean;
}
export function getStrFullLength(str: string): number;
export function cutStrByFullLength(str: string, maxLength: number): string;
export default class Ellipsis extends React.Component<EllipsisProps, any> {}
+270
View File
@@ -0,0 +1,270 @@
import React, { Component } from 'react';
import { Tooltip } from 'antd';
import classNames from 'classnames';
import styles from './index.less';
/* eslint react/no-did-mount-set-state: 0 */
/* eslint no-param-reassign: 0 */
const isSupportLineClamp = document.body.style.webkitLineClamp !== undefined;
const TooltipOverlayStyle = {
overflowWrap: 'break-word',
wordWrap: 'break-word',
};
export const getStrFullLength = (str = '') =>
str.split('').reduce((pre, cur) => {
const charCode = cur.charCodeAt(0);
if (charCode >= 0 && charCode <= 128) {
return pre + 1;
}
return pre + 2;
}, 0);
export const cutStrByFullLength = (str = '', maxLength) => {
let showLength = 0;
return str.split('').reduce((pre, cur) => {
const charCode = cur.charCodeAt(0);
if (charCode >= 0 && charCode <= 128) {
showLength += 1;
} else {
showLength += 2;
}
if (showLength <= maxLength) {
return pre + cur;
}
return pre;
}, '');
};
const getTooltip = ({ tooltip, overlayStyle, title, children }) => {
if (tooltip) {
const props = tooltip === true ? { overlayStyle, title } : { ...tooltip, overlayStyle, title };
return <Tooltip {...props}>{children}</Tooltip>;
}
return children;
};
const EllipsisText = ({ text, length, tooltip, fullWidthRecognition, ...other }) => {
if (typeof text !== 'string') {
throw new Error('Ellipsis children must be string.');
}
const textLength = fullWidthRecognition ? getStrFullLength(text) : text.length;
if (textLength <= length || length < 0) {
return <span {...other}>{text}</span>;
}
const tail = '...';
let displayText;
if (length - tail.length <= 0) {
displayText = '';
} else {
displayText = fullWidthRecognition ? cutStrByFullLength(text, length) : text.slice(0, length);
}
const spanAttrs = tooltip ? {} : { ...other };
return getTooltip({
tooltip,
overlayStyle: TooltipOverlayStyle,
title: text,
children: (
<span {...spanAttrs}>
{displayText}
{tail}
</span>
),
});
};
export default class Ellipsis extends Component {
state = {
text: '',
targetCount: 0,
};
componentDidMount() {
if (this.node) {
this.computeLine();
}
}
componentDidUpdate(perProps) {
const { lines } = this.props;
if (lines !== perProps.lines) {
this.computeLine();
}
}
computeLine = () => {
const { lines } = this.props;
if (lines && !isSupportLineClamp) {
const text = this.shadowChildren.innerText || this.shadowChildren.textContent;
const lineHeight = parseInt(getComputedStyle(this.root).lineHeight, 10);
const targetHeight = lines * lineHeight;
this.content.style.height = `${targetHeight}px`;
const totalHeight = this.shadowChildren.offsetHeight;
const shadowNode = this.shadow.firstChild;
if (totalHeight <= targetHeight) {
this.setState({
text,
targetCount: text.length,
});
return;
}
// bisection
const len = text.length;
const mid = Math.ceil(len / 2);
const count = this.bisection(targetHeight, mid, 0, len, text, shadowNode);
this.setState({
text,
targetCount: count,
});
}
};
bisection = (th, m, b, e, text, shadowNode) => {
const suffix = '...';
let mid = m;
let end = e;
let begin = b;
shadowNode.innerHTML = text.substring(0, mid) + suffix;
let sh = shadowNode.offsetHeight;
if (sh <= th) {
shadowNode.innerHTML = text.substring(0, mid + 1) + suffix;
sh = shadowNode.offsetHeight;
if (sh > th || mid === begin) {
return mid;
}
begin = mid;
if (end - begin === 1) {
mid = 1 + begin;
} else {
mid = Math.floor((end - begin) / 2) + begin;
}
return this.bisection(th, mid, begin, end, text, shadowNode);
}
if (mid - 1 < 0) {
return mid;
}
shadowNode.innerHTML = text.substring(0, mid - 1) + suffix;
sh = shadowNode.offsetHeight;
if (sh <= th) {
return mid - 1;
}
end = mid;
mid = Math.floor((end - begin) / 2) + begin;
return this.bisection(th, mid, begin, end, text, shadowNode);
};
handleRoot = n => {
this.root = n;
};
handleContent = n => {
this.content = n;
};
handleNode = n => {
this.node = n;
};
handleShadow = n => {
this.shadow = n;
};
handleShadowChildren = n => {
this.shadowChildren = n;
};
render() {
const { text, targetCount } = this.state;
const {
children,
lines,
length,
className,
tooltip,
fullWidthRecognition,
...restProps
} = this.props;
const cls = classNames(styles.ellipsis, className, {
[styles.lines]: lines && !isSupportLineClamp,
[styles.lineClamp]: lines && isSupportLineClamp,
});
if (!lines && !length) {
return (
<span className={cls} {...restProps}>
{children}
</span>
);
}
// length
if (!lines) {
return (
<EllipsisText
className={cls}
length={length}
text={children || ''}
tooltip={tooltip}
fullWidthRecognition={fullWidthRecognition}
{...restProps}
/>
);
}
const id = `antd-pro-ellipsis-${`${new Date().getTime()}${Math.floor(Math.random() * 100)}`}`;
// support document.body.style.webkitLineClamp
if (isSupportLineClamp) {
const style = `#${id}{-webkit-line-clamp:${lines};-webkit-box-orient: vertical;}`;
const node = (
<div id={id} className={cls} {...restProps}>
<style>{style}</style>
{children}
</div>
);
return getTooltip({
tooltip,
overlayStyle: TooltipOverlayStyle,
title: children,
children: node,
});
}
const childNode = (
<span ref={this.handleNode}>
{targetCount > 0 && text.substring(0, targetCount)}
{targetCount > 0 && targetCount < text.length && '...'}
</span>
);
return (
<div {...restProps} ref={this.handleRoot} className={cls}>
<div ref={this.handleContent}>
{getTooltip({
tooltip,
overlayStyle: TooltipOverlayStyle,
title: text,
children: childNode,
})}
<div className={styles.shadow} ref={this.handleShadowChildren}>
{children}
</div>
<div className={styles.shadow} ref={this.handleShadow}>
<span>{text}</span>
</div>
</div>
</div>
);
}
}
+24
View File
@@ -0,0 +1,24 @@
.ellipsis {
display: inline-block;
width: 100%;
overflow: hidden;
word-break: break-all;
}
.lines {
position: relative;
.shadow {
position: absolute;
z-index: -999;
display: block;
color: transparent;
opacity: 0;
}
}
.lineClamp {
position: relative;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
}
+17
View File
@@ -0,0 +1,17 @@
---
title: Ellipsis
subtitle: 文本自动省略号
cols: 1
order: 10
---
文本过长自动处理省略号,支持按照文本长度和最大行数两种方式截取。
## API
| 参数 | 说明 | 类型 | 默认值 |
| -------------------- | ------------------------------------------------ | ------- | ------ |
| tooltip | 移动到文本展示完整内容的提示 | boolean | - |
| length | 在按照长度截取下的文本最大字符数,超过则截取省略 | number | - |
| lines | 在按照行数截取下最大的行数,超过则截取省略 | number | `1` |
| fullWidthRecognition | 是否将全角字符的长度视为 2 来计算字符串长度 | boolean | - |
+13
View File
@@ -0,0 +1,13 @@
import { getStrFullLength, cutStrByFullLength } from './index';
describe('test calculateShowLength', () => {
it('get full length', () => {
expect(getStrFullLength('一二,a,')).toEqual(8);
});
it('cut str by full length', () => {
expect(cutStrByFullLength('一二,a,', 7)).toEqual('一二,a');
});
it('cut str when length small', () => {
expect(cutStrByFullLength('一22三', 5)).toEqual('一22');
});
});
+28
View File
@@ -0,0 +1,28 @@
import React from 'react'
import PropTypes from 'prop-types'
import styles from './FilterItem.less'
const FilterItem = ({ label = '', children }) => {
const labelArray = label.split('')
return (
<div className={styles.filterItem}>
{labelArray.length > 0 && (
<div className={styles.labelWrap}>
{labelArray.map((item, index) => (
<span className="labelText" key={index}>
{item}
</span>
))}
</div>
)}
<div className={styles.item}>{children}</div>
</div>
)
}
FilterItem.propTypes = {
label: PropTypes.string,
children: PropTypes.element.isRequired,
}
export default FilterItem
+17
View File
@@ -0,0 +1,17 @@
.filterItem {
display: flex;
justify-content: space-between;
.labelWrap {
width: 64px;
line-height: 28px;
margin-right: 12px;
justify-content: space-between;
display: flex;
overflow: hidden;
}
.item {
flex: 1;
}
}
+6
View File
@@ -0,0 +1,6 @@
{
"name": "FilterItem",
"version": "0.0.0",
"private": true,
"main": "./FilterItem.js"
}

Some files were not shown because too many files have changed in this diff Show More