Browse Source

fe-37 修改侧边栏条目

master
Chunxian Zhang 2 years ago
parent
commit
3f0c3cc6b7
4 changed files with 36 additions and 21 deletions
  1. +1
    -1
      lazy-timer-fe/src/App.js
  2. +1
    -1
      lazy-timer-fe/src/components/Footer.jsx
  3. +2
    -2
      lazy-timer-fe/src/components/Sidebar.jsx
  4. +32
    -17
      lazy-timer-fe/src/data/dummy.js

+ 1
- 1
lazy-timer-fe/src/App.js View File

@ -66,7 +66,7 @@ const App = () => {
<Routes> <Routes>
{/* dashboard */} {/* dashboard */}
<Route path="/" element={(<Ecommerce />)} /> <Route path="/" element={(<Ecommerce />)} />
<Route path="/ecommerce" element={(<Ecommerce />)} />
<Route path="/overview" element={(<Ecommerce />)} />
{/* pages */} {/* pages */}
<Route path="/orders" element={<Orders />} /> <Route path="/orders" element={<Orders />} />

+ 1
- 1
lazy-timer-fe/src/components/Footer.jsx View File

@ -3,7 +3,7 @@ import React from 'react';
const Footer = () => ( const Footer = () => (
<div className="mt-24"> <div className="mt-24">
<p className="dark:text-gray-200 text-gray-700 text-center m-20"> <p className="dark:text-gray-200 text-gray-700 text-center m-20">
© 2022 All rights reserved by Shoppy.com
© 2022 All rights reserved by 1836891291@qq.com
</p> </p>
</div> </div>
); );

+ 2
- 2
lazy-timer-fe/src/components/Sidebar.jsx View File

@ -46,8 +46,8 @@ const Sidebar = () => {
</p> </p>
{item.links.map((link) => ( {item.links.map((link) => (
<NavLink <NavLink
to={`/${link.name}`}
key={link.name}
to={`/${link.englishName}`}
key={link.englishName}
onClick={handleCloseSideBar} onClick={handleCloseSideBar}
style={({ isActive }) => ({ style={({ isActive }) => ({
backgroundColor: isActive ? currentColor : '', backgroundColor: isActive ? currentColor : '',

+ 32
- 17
lazy-timer-fe/src/data/dummy.js View File

@ -471,87 +471,102 @@ export const employeesGrid = [
export const links = [ export const links = [
{ {
title: 'Dashboard',
title: '数据面板',
links: [ links: [
{ {
name: 'ecommerce',
name: '总览',
englishName: 'overview',
icon: <FiShoppingBag />, icon: <FiShoppingBag />,
}, },
],
},
{
title: 'Pages',
links: [
{ {
name: 'orders',
name: '表格',
englishName: 'customers',
icon: <RiContactsLine />,
},
{
name: '屏幕使用时间',
englishName: 'orders',
icon: <AiOutlineShoppingCart />, icon: <AiOutlineShoppingCart />,
}, },
{ {
name: 'employees',
name: '第一次屏幕使用',
englishName: 'employees',
icon: <IoMdContacts />, icon: <IoMdContacts />,
}, },
{ {
name: 'customers',
name: '最后一次屏幕使用',
englishName: 'customers',
icon: <RiContactsLine />, icon: <RiContactsLine />,
}, },
], ],
}, },
{ {
title: 'Apps',
title: '标签',
links: [ links: [
{ {
name: 'calendar',
name: '学习',
englishName: 'calendar',
icon: <AiOutlineCalendar />, icon: <AiOutlineCalendar />,
}, },
{ {
name: 'kanban',
name: '工作',
englishName: 'kanban',
icon: <BsKanban />, icon: <BsKanban />,
}, },
{ {
name: 'editor',
name: '娱乐',
englishName: 'editor',
icon: <FiEdit />, icon: <FiEdit />,
}, },
{ {
name: 'color-picker',
name: '生活',
englishName: 'color-picker',
icon: <BiColorFill />, icon: <BiColorFill />,
}, },
], ],
}, },
{ {
title: 'Charts',
title: '单项',
links: [ links: [
{ {
name: 'line', name: 'line',
englishName: 'line',
icon: <AiOutlineStock />, icon: <AiOutlineStock />,
}, },
{ {
name: 'area', name: 'area',
englishName: 'area',
icon: <AiOutlineAreaChart />, icon: <AiOutlineAreaChart />,
}, },
{ {
name: 'bar', name: 'bar',
englishName: 'bar',
icon: <AiOutlineBarChart />, icon: <AiOutlineBarChart />,
}, },
{ {
name: 'pie', name: 'pie',
englishName: 'pie',
icon: <FiPieChart />, icon: <FiPieChart />,
}, },
{ {
name: 'financial', name: 'financial',
englishName: 'financial',
icon: <RiStockLine />, icon: <RiStockLine />,
}, },
{ {
name: 'color-mapping', name: 'color-mapping',
englishName: 'color-mapping',
icon: <BsBarChart />, icon: <BsBarChart />,
}, },
{ {
name: 'pyramid', name: 'pyramid',
englishName: 'pyramid',
icon: <GiLouvrePyramid />, icon: <GiLouvrePyramid />,
}, },
{ {
name: 'stacked', name: 'stacked',
englishName: 'stacked',
icon: <AiOutlineBarChart />, icon: <AiOutlineBarChart />,
}, },
], ],

Loading…
Cancel
Save