Skip to content

Commit b3e382c

Browse files
committed
refactor: 更改路由类型
1 parent c817b2e commit b3e382c

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

build/plugins/router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RouteKey } from '@elegant-router/types';
1+
import type { RouteKey } from '@soybean-react/vite-plugin-react-router';
22
import ElegantReactRouter from '@soybean-react/vite-plugin-react-router';
33

44
// eslint-disable-next-line @typescript-eslint/no-empty-object-type

src/types/api.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ declare namespace Api {
7272
* backend api module: "route"
7373
*/
7474
namespace Route {
75-
type ElegantConstRoute = import('@elegant-router/types').ElegantConstRoute;
75+
type ElegantConstRoute = import('@soybean-react/vite-plugin-react-router').ElegantConstRoute;
7676

7777
interface MenuRoute extends ElegantConstRoute {
7878
id: string;
7979
}
8080

8181
interface UserRoute {
82-
home: import('@elegant-router/types').LastLevelRouteKey;
82+
home: import('@soybean-react/vite-plugin-react-router').LastLevelRouteKey;
8383
routes: MenuRoute[];
8484
}
8585
}

src/types/app.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ declare namespace App {
161161

162162
/** Global namespace */
163163
namespace Global {
164-
type RouteKey = import('@elegant-router/types').RouteKey;
165-
type RouteMap = import('@elegant-router/types').RouteMap;
166-
type RoutePath = import('@elegant-router/types').RoutePath;
167-
type LastLevelRouteKey = import('@elegant-router/types').LastLevelRouteKey;
164+
type RouteKey = import('@soybean-react/vite-plugin-react-router').RouteKey;
165+
type RouteMap = import('@soybean-react/vite-plugin-react-router').RouteMap;
166+
type RoutePath = import('@soybean-react/vite-plugin-react-router').RoutePath;
167+
type LastLevelRouteKey = import('@soybean-react/vite-plugin-react-router').LastLevelRouteKey;
168168

169169
/** The global header props */
170170
interface HeaderProps {
@@ -267,7 +267,7 @@ declare namespace App {
267267
* Locales type
268268
*/
269269
namespace I18n {
270-
type RouteKey = import('@elegant-router/types').RouteKey;
270+
type RouteKey = import('@soybean-react/vite-plugin-react-router').RouteKey;
271271

272272
type LangType = 'en-US' | 'zh-CN';
273273

src/types/env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ declare namespace Env {
6565
* It only has effect when the auth route mode is static, if the route mode is dynamic, the home route key is
6666
* defined in the back-end
6767
*/
68-
readonly VITE_ROUTE_HOME: import('@elegant-router/types').LastLevelRouteKey;
68+
readonly VITE_ROUTE_HOME: import('@soybean-react/vite-plugin-react-router').LastLevelRouteKey;
6969
/** The router history mode */
7070
readonly VITE_ROUTER_HISTORY_MODE?: RouterHistoryMode;
7171
/** backend service base url */

src/types/router.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ declare namespace Router {
1010
* @example
1111
* the route is "user_detail", if it is set to "user_list", the menu "user_list" will be activated
1212
*/
13-
activeMenu?: import('@elegant-router/types').RouteKey | null;
13+
activeMenu?: import('@soybean-react/vite-plugin-react-router').RouteKey | null;
1414
/**
1515
* Is constant route
1616
*

0 commit comments

Comments
 (0)