2023-12-22 22:48:42 +08:00
|
|
|
|
# v1.0.0
|
|
|
|
|
|
|
|
|
|
已自动去除CSS默认样式,和一些自带图片,默认安装`husky`
|
|
|
|
|
|
|
|
|
|
包含vue和react
|
|
|
|
|
|
|
|
|
|
## vue
|
|
|
|
|
|
|
|
|
|
包含路由,可以选择`vuex`和`pinia`
|
|
|
|
|
|
|
|
|
|
## ract
|
|
|
|
|
|
|
|
|
|
react默认安装`@reduxjs/toolkit`,在环境中已经搭建
|
|
|
|
|
|
|
|
|
|
react可以选择是否有路由,有`useRoutes`和`RouterProvider `
|
|
|
|
|
|
|
|
|
|
### useRoutes
|
|
|
|
|
|
|
|
|
|
```tsx
|
|
|
|
|
import React, { Suspense } from 'react';
|
|
|
|
|
import { useRoutes } from 'react-router-dom';
|
|
|
|
|
import routes from './router';
|
|
|
|
|
|
|
|
|
|
function App() {
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<Suspense fallback={<h1>loading...</h1>}>{useRoutes(routes)}</Suspense>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### RouterProvider
|
|
|
|
|
|
|
|
|
|
```tsx
|
|
|
|
|
import { Suspense } from 'react';
|
|
|
|
|
import { RouterProvider } from 'react-router-dom';
|
|
|
|
|
import router from './router';
|
|
|
|
|
|
|
|
|
|
function App() {
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<Suspense fallback={<h1>loading...</h1>}>
|
|
|
|
|
<RouterProvider router={router} />
|
|
|
|
|
</Suspense>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
> 修复没有文件夹安装自动跳过
|
2024-01-14 22:33:38 +08:00
|
|
|
|
|
|
|
|
|
# v1.0.2
|
|
|
|
|
|
|
|
|
|
添加react创建zustand,包含ts和js
|