feat: 基础搭建框架完成
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import {useNavigate} from 'react-router-dom';
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
export default () => {
|
||||
const navigate = useNavigate();
|
||||
const navigate = useNavigate()
|
||||
const goBack = () => {
|
||||
navigate(-1);
|
||||
};
|
||||
navigate(-1)
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<h1>About Page</h1>
|
||||
<button onClick={goBack}>返回</button>
|
||||
</>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
@@ -1,14 +1,14 @@
|
||||
import {useNavigate} from 'react-router-dom';
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
export default () => {
|
||||
const navigate = useNavigate();
|
||||
const navigate = useNavigate()
|
||||
const goBack = () => {
|
||||
navigate(-1);
|
||||
};
|
||||
navigate(-1)
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<h1>About Page</h1>
|
||||
<button onClick={goBack}>返回</button>
|
||||
</>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
@@ -1,10 +1,16 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { Link } from 'react-router-dom'
|
||||
import { Button, Card, Image } from 'antd'
|
||||
import SvgIcon from '@/components/SvgIcon/SvgIcon.tsx'
|
||||
import wallhaven from '@/assets/images/wallhaven.jpg'
|
||||
export default () => {
|
||||
return (
|
||||
<>
|
||||
<h1>Home Page</h1>
|
||||
<Link to="/about">页面跳转</Link>
|
||||
<Link to='/about'>页面跳转</Link>
|
||||
<Button>测试</Button>
|
||||
<Card>测试</Card>
|
||||
<SvgIcon name='schisandra' size={200} />
|
||||
<Image src={wallhaven}></Image>
|
||||
</>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user