0
点赞
收藏
分享

微信扫一扫

前端项目实战叁佰柒拾伍react-admin和material ui-利用router路由覆盖默认行为

河南妞 2023-11-22 阅读 42

import React from 'react'
import { Link, Route, Routes } from 'react-router-dom'
import OrderCreate from './ordercreate'
import OrderList from './orderlist'
import { Paper } from '@mui/material'

const OrderPool = () => {

  return (
    <div style = {{display: 'flex', flexDirection: 'row'}}>
      <Paper style = {{marginRight: '16px', minWidth: '160px', width: '20%', minHeight: '240px'}}>
        <Link to = 'orderlist'>订单列表</Link>
      </Paper>
      <div style = {{width: '70%'}}>
        <Routes>
            <Route path = 'orderlist' element = {<OrderList />} />
            <Route path = 'ordercreate' element = {<OrderCreate/>} />
        </Routes>
      </div>  
    </div>
  )
}

export default OrderPool



举报

相关推荐

0 条评论