Giter Site home page Giter Site logo

ychengcloud / react-vite-admin Goto Github PK

View Code? Open in Web Editor NEW
233.0 6.0 71.0 593 KB

This Starter utilizes React, Recoil, React Query, React Hooks, Typescript, Axios And Vite. 全新技术栈的后台管理系统

License: MIT License

HTML 0.33% TypeScript 93.33% Less 6.00% CSS 0.34%
react recoil react-query react-hooks vite typescript axios antd antd-design antd-design-pro

react-vite-admin's People

Contributors

decker502 avatar lemonapplemo avatar ychengcloud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-vite-admin's Issues

🙋

您好,看了下您的项目有几个问题想请教下
1 看你在请求拦截那里跳转登陆用的是 window.location.href = '/login'; 然后我看您也引入了 const history = createBrowserHistory(); 是原本打算用history跳转然后不生效嘛?
2 我看 react-router-dom V6 中 unstable_HistoryRouter这个路由可以实现在js|ts下跳转路由
3 react-router-dom中也增加了很多特别好用的 方法 createBrowserRouter 和 RouterProvider 以及Route也增加了很多属性 像loader 可以登陆拦截 errorElement可以做到errorboundary等功能
4 但是上述第三点只能通过createBrowserRouter方法实现,和我第二点又冲突了~~
5 所以我现在的问题是 如何通过 createBrowserRouter 和 RouterProvider创建路由,又能在js|ts文件下跳转路由而不是用window.location.href~~

项目编译报错

renderz@renderzdeMacBook-Pro react-vite-admin % yarn build
yarn run v1.22.0
$ tsc && vite build
node_modules/@ant-design/pro-form/lib/components/ColorPicker/index.d.ts:2:40 - error TS7016: Could not find a declaration file for module 'react-color'. '/Users/renderz/github/react-vite-admin/node_modules/react-color/lib/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/react-color if it exists or add a new declaration (.d.ts) file containing declare module 'react-color';

2 import type { SketchPickerProps } from 'react-color';
~~~~~~~~~~~~~

node_modules/@ant-design/pro-layout/lib/typings.d.ts:2:15 - error TS2305: Module '"react-router-dom"' has no exported member 'RouteComponentProps'.

2 import type { RouteComponentProps as BasicRouteProps, match } from 'react-router-dom';
~~~~~~~~~~~~~~~~~~~

node_modules/@ant-design/pro-layout/lib/typings.d.ts:2:55 - error TS2305: Module '"react-router-dom"' has no exported member 'match'.

2 import type { RouteComponentProps as BasicRouteProps, match } from 'react-router-dom';
~~~~~

node_modules/@ant-design/pro-layout/lib/typings.d.ts:5:11 - error TS2694: Namespace '"/Users/renderz/github/react-vite-admin/node_modules/history/index"' has no exported member 'LocationDescriptor'.

5 to: H.LocationDescriptor;
~~~~~~~~~~~~~~~~~~

node_modules/@antv/g6-core/lib/index.d.ts:1:23 - error TS2688: Cannot find type definition file for '_gl-matrix@3.3.0@gl-matrix'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.