张涛 1 vuosi sitten
vanhempi
commit
f6ce6a65ff

+ 2
- 2
src/layouts/AuthLayout/components/Menus.jsx Näytä tiedosto

@@ -17,13 +17,13 @@ export default (props) => {
17 17
 
18 18
   //   return keys;
19 19
   // }, [location.pathname]);
20
-
20
+console.log(theme)
21 21
   const selectedKeys = [location.pathname]
22 22
   return (
23 23
     <Menu
24 24
       mode="inline"
25 25
       style={menuStyle}
26
-      theme="light"
26
+      theme={theme}
27 27
       items={items}
28 28
       selectedKeys={selectedKeys}
29 29
     />

+ 2
- 2
src/layouts/AuthLayout/components/SiderBar.jsx Näytä tiedosto

@@ -13,8 +13,8 @@ export default (props) => {
13 13
   }, [])
14 14
 
15 15
   return (
16
-    <Sider className="layout-sidebar" theme="light" collapsible width={width}>
17
-      <Menus items={menus} location={location} />
16
+    <Sider className="layout-sidebar" theme={theme}  collapsible width={width}>
17
+      <Menus theme={theme} items={menus} location={location} />
18 18
     </Sider>
19 19
   )
20 20
 }

+ 3
- 2
src/layouts/AuthLayout/index.jsx Näytä tiedosto

@@ -37,6 +37,7 @@ export default (props) => {
37 37
   // });
38 38
   // console.log('menus', menus);
39 39
   // console.log(user);
40
+  console.log(theme)
40 41
   return (
41 42
     <Spin spinning={!user} size="large">
42 43
       <HtmlTitle />
@@ -44,8 +45,8 @@ export default (props) => {
44 45
       <RequireLogin>
45 46
         <Layout className={theme} style={{ height: '100vh' }}>
46 47
           <Header theme={theme} user={user} />
47
-          <Layout style={{ height: 'calc(100vh - var(--header-height))' }}>
48
-            <SiderBar menus={menus} location={location} />
48
+          <Layout  style={{ height: 'calc(100vh - var(--header-height))' }}>
49
+            <SiderBar theme="light" menus={menus} location={location} />
49 50
             <Container location={location} />
50 51
           </Layout>
51 52
         </Layout>