From 7954726c0c7d8114f0c474670f110f2a0f082ac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=84=9A=E9=81=93?= Date: Fri, 21 Dec 2018 14:30:21 +0800 Subject: [PATCH] fix menu bug --- config/config.js | 14 ++++++++++---- src/pages/BasicDemo.js | 3 --- src/pages/Welcome.js | 11 +++++++++++ 3 files changed, 21 insertions(+), 7 deletions(-) delete mode 100644 src/pages/BasicDemo.js create mode 100644 src/pages/Welcome.js diff --git a/config/config.js b/config/config.js index 38b51758..18288405 100644 --- a/config/config.js +++ b/config/config.js @@ -50,12 +50,18 @@ export default { path: '/', component: '../layouts/BasicLayout', routes: [ + { path: '/', redirect: '/welcome' }, // dashboard { - path: '/', - name: 'dashboard', - icon: 'dashboard', - component: './BasicDemo', + path: '/welcome', + name: 'welcome', + icon: 'smile', + component: './Welcome', + }, + { + path: 'https://github.com/umijs/umi-blocks/tree/master/ant-design-pro', + name: '更多页面', + icon: 'block', }, ], }, diff --git a/src/pages/BasicDemo.js b/src/pages/BasicDemo.js deleted file mode 100644 index 045b7364..00000000 --- a/src/pages/BasicDemo.js +++ /dev/null @@ -1,3 +0,0 @@ -import React from 'react'; - -export default () =>

hello pro!

; diff --git a/src/pages/Welcome.js b/src/pages/Welcome.js new file mode 100644 index 00000000..9b8fe2ee --- /dev/null +++ b/src/pages/Welcome.js @@ -0,0 +1,11 @@ +import React from 'react'; + +export default () => ( +

+ 想要添加更多页面?请参考{' '} + + umi 区块 + + 。 +

+); -- GitLab