愚道 7 лет назад
Родитель
Сommit
5732c5bf96
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      config/config.js
  2. 1 1
      src/pages/Welcome.js

+ 2 - 2
config/config.js

@@ -43,8 +43,8 @@ export default {
   routes: [
     {
       path: '/user',
-      components: ['../layouts/UserLayout'],
-      routes: [],
+      component: '../layouts/UserLayout',
+      routes: [{ path: '/user', component: './Welcome' }],
     },
     {
       path: '/',

+ 1 - 1
src/pages/Welcome.js

@@ -1,7 +1,7 @@
 import React from 'react';
 
 export default () => (
-  <p>
+  <p style={{ textAlign: 'center' }}>
     想要添加更多页面?请参考{' '}
     <a href="https://umijs.org/guide/block.html" target="_blank" rel="noopener noreferrer">
       umi 区块