- userStore.setShowChangePassword(true)}>
+ setShowChangePassword(true)}>
diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx
index cd3b6bd..257bd1d 100644
--- a/src/pages/user/index.tsx
+++ b/src/pages/user/index.tsx
@@ -1,22 +1,7 @@
-import { Route, Routes } from 'react-router-dom';
-import { List } from './edit/List';
import { Main } from './layouts';
-import { Login } from './login/Login';
-import { Login as WxLogin } from './wx/Login';
-import { Profile } from './edit/Profile';
-import { Redirect } from '@/modules/Redirect';
+
export const App = () => {
- return (
-
- }>
- }>
- } />
- } />
-
- } />
- } />
-
- );
+ return
;
};
export default App;
\ No newline at end of file
diff --git a/src/pages/user/login/Login.tsx b/src/pages/user/login/Login.tsx
index ead2e54..e3f98c9 100644
--- a/src/pages/user/login/Login.tsx
+++ b/src/pages/user/login/Login.tsx
@@ -1,5 +1,4 @@
import { useLoginStore } from '../store/login';
-import { useShallow } from 'zustand/react/shallow';
import LockOutlined from '@ant-design/icons/LockOutlined';
import UserOutlined from '@ant-design/icons/UserOutlined';
import { Button } from '@mui/material';
@@ -9,19 +8,12 @@ import { useForm, Controller } from 'react-hook-form';
export const Login = () => {
const { t } = useTranslation();
const { control, handleSubmit } = useForm();
- const loginStore = useLoginStore(
- useShallow((state) => {
- return {
- login: state.login,
- formData: state.formData,
- setFormData: state.setFormData,
- };
- }),
- );
+ const loginStore = useLoginStore();
+ const { login, formData, setFormData } = loginStore;
const onFinish = (values: any) => {
- loginStore.setFormData(values);
- loginStore.login();
+ setFormData(values);
+ login();
};
return (
diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts
new file mode 100644
index 0000000..7264acd
--- /dev/null
+++ b/src/routeTree.gen.ts
@@ -0,0 +1,728 @@
+/* eslint-disable */
+
+// @ts-nocheck
+
+// noinspection JSUnusedGlobalSymbols
+
+// This file was automatically generated by TanStack Router.
+// You should NOT make any changes in this file as it will be overwritten.
+// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
+
+import { Route as rootRouteImport } from './routes/__root'
+import { Route as UserRouteImport } from './routes/user'
+import { Route as OrgRouteImport } from './routes/org'
+import { Route as MapRouteImport } from './routes/map'
+import { Route as HomeRouteImport } from './routes/home'
+import { Route as FileRouteImport } from './routes/file'
+import { Route as DomainRouteImport } from './routes/domain'
+import { Route as ContainerRouteImport } from './routes/container'
+import { Route as ConfigRouteImport } from './routes/config'
+import { Route as AppRouteImport } from './routes/app'
+import { Route as IndexRouteImport } from './routes/index'
+import { Route as UserLoginRouteImport } from './routes/user.login'
+import { Route as UserIndexRouteImport } from './routes/user._index'
+import { Route as OrgIndexRouteImport } from './routes/org._index'
+import { Route as FileIndexRouteImport } from './routes/file._index'
+import { Route as DomainIndexRouteImport } from './routes/domain._index'
+import { Route as ContainerIndexRouteImport } from './routes/container._index'
+import { Route as ConfigIndexRouteImport } from './routes/config._index'
+import { Route as AppIndexRouteImport } from './routes/app._index'
+import { Route as UserWxLoginRouteImport } from './routes/user.wx.login'
+import { Route as UserEditProfileRouteImport } from './routes/user.edit.profile'
+import { Route as UserEditListRouteImport } from './routes/user.edit.list'
+import { Route as OrgEditListRouteImport } from './routes/org.edit.list'
+import { Route as FileEditListRouteImport } from './routes/file.edit.list'
+import { Route as DomainEditListRouteImport } from './routes/domain.edit.list'
+import { Route as ContainerPreviewIdRouteImport } from './routes/container.preview.$id'
+import { Route as ContainerEditListRouteImport } from './routes/container.edit.list'
+import { Route as ConfigEditListRouteImport } from './routes/config.edit.list'
+import { Route as AppEditListRouteImport } from './routes/app.edit.list'
+import { Route as OrgEditUserIdRouteImport } from './routes/org.edit.user.$id'
+import { Route as ContainerPreviewIdWrapperRouteImport } from './routes/container.preview.$id.wrapper'
+import { Route as AppAppKeyVersionListRouteImport } from './routes/app.$appKey.version.list'
+
+const UserRoute = UserRouteImport.update({
+ id: '/user',
+ path: '/user',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const OrgRoute = OrgRouteImport.update({
+ id: '/org',
+ path: '/org',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const MapRoute = MapRouteImport.update({
+ id: '/map',
+ path: '/map',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const HomeRoute = HomeRouteImport.update({
+ id: '/home',
+ path: '/home',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const FileRoute = FileRouteImport.update({
+ id: '/file',
+ path: '/file',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const DomainRoute = DomainRouteImport.update({
+ id: '/domain',
+ path: '/domain',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const ContainerRoute = ContainerRouteImport.update({
+ id: '/container',
+ path: '/container',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const ConfigRoute = ConfigRouteImport.update({
+ id: '/config',
+ path: '/config',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const AppRoute = AppRouteImport.update({
+ id: '/app',
+ path: '/app',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const IndexRoute = IndexRouteImport.update({
+ id: '/',
+ path: '/',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const UserLoginRoute = UserLoginRouteImport.update({
+ id: '/login',
+ path: '/login',
+ getParentRoute: () => UserRoute,
+} as any)
+const UserIndexRoute = UserIndexRouteImport.update({
+ id: '/_index',
+ getParentRoute: () => UserRoute,
+} as any)
+const OrgIndexRoute = OrgIndexRouteImport.update({
+ id: '/_index',
+ getParentRoute: () => OrgRoute,
+} as any)
+const FileIndexRoute = FileIndexRouteImport.update({
+ id: '/_index',
+ getParentRoute: () => FileRoute,
+} as any)
+const DomainIndexRoute = DomainIndexRouteImport.update({
+ id: '/_index',
+ getParentRoute: () => DomainRoute,
+} as any)
+const ContainerIndexRoute = ContainerIndexRouteImport.update({
+ id: '/_index',
+ getParentRoute: () => ContainerRoute,
+} as any)
+const ConfigIndexRoute = ConfigIndexRouteImport.update({
+ id: '/_index',
+ getParentRoute: () => ConfigRoute,
+} as any)
+const AppIndexRoute = AppIndexRouteImport.update({
+ id: '/_index',
+ getParentRoute: () => AppRoute,
+} as any)
+const UserWxLoginRoute = UserWxLoginRouteImport.update({
+ id: '/wx/login',
+ path: '/wx/login',
+ getParentRoute: () => UserRoute,
+} as any)
+const UserEditProfileRoute = UserEditProfileRouteImport.update({
+ id: '/edit/profile',
+ path: '/edit/profile',
+ getParentRoute: () => UserRoute,
+} as any)
+const UserEditListRoute = UserEditListRouteImport.update({
+ id: '/edit/list',
+ path: '/edit/list',
+ getParentRoute: () => UserRoute,
+} as any)
+const OrgEditListRoute = OrgEditListRouteImport.update({
+ id: '/edit/list',
+ path: '/edit/list',
+ getParentRoute: () => OrgRoute,
+} as any)
+const FileEditListRoute = FileEditListRouteImport.update({
+ id: '/edit/list',
+ path: '/edit/list',
+ getParentRoute: () => FileRoute,
+} as any)
+const DomainEditListRoute = DomainEditListRouteImport.update({
+ id: '/edit/list',
+ path: '/edit/list',
+ getParentRoute: () => DomainRoute,
+} as any)
+const ContainerPreviewIdRoute = ContainerPreviewIdRouteImport.update({
+ id: '/preview/$id',
+ path: '/preview/$id',
+ getParentRoute: () => ContainerRoute,
+} as any)
+const ContainerEditListRoute = ContainerEditListRouteImport.update({
+ id: '/edit/list',
+ path: '/edit/list',
+ getParentRoute: () => ContainerRoute,
+} as any)
+const ConfigEditListRoute = ConfigEditListRouteImport.update({
+ id: '/edit/list',
+ path: '/edit/list',
+ getParentRoute: () => ConfigRoute,
+} as any)
+const AppEditListRoute = AppEditListRouteImport.update({
+ id: '/edit/list',
+ path: '/edit/list',
+ getParentRoute: () => AppRoute,
+} as any)
+const OrgEditUserIdRoute = OrgEditUserIdRouteImport.update({
+ id: '/edit/user/$id',
+ path: '/edit/user/$id',
+ getParentRoute: () => OrgRoute,
+} as any)
+const ContainerPreviewIdWrapperRoute =
+ ContainerPreviewIdWrapperRouteImport.update({
+ id: '/wrapper',
+ path: '/wrapper',
+ getParentRoute: () => ContainerPreviewIdRoute,
+ } as any)
+const AppAppKeyVersionListRoute = AppAppKeyVersionListRouteImport.update({
+ id: '/$appKey/version/list',
+ path: '/$appKey/version/list',
+ getParentRoute: () => AppRoute,
+} as any)
+
+export interface FileRoutesByFullPath {
+ '/': typeof IndexRoute
+ '/app': typeof AppIndexRoute
+ '/config': typeof ConfigIndexRoute
+ '/container': typeof ContainerIndexRoute
+ '/domain': typeof DomainIndexRoute
+ '/file': typeof FileIndexRoute
+ '/home': typeof HomeRoute
+ '/map': typeof MapRoute
+ '/org': typeof OrgIndexRoute
+ '/user': typeof UserIndexRoute
+ '/user/login': typeof UserLoginRoute
+ '/app/edit/list': typeof AppEditListRoute
+ '/config/edit/list': typeof ConfigEditListRoute
+ '/container/edit/list': typeof ContainerEditListRoute
+ '/container/preview/$id': typeof ContainerPreviewIdRouteWithChildren
+ '/domain/edit/list': typeof DomainEditListRoute
+ '/file/edit/list': typeof FileEditListRoute
+ '/org/edit/list': typeof OrgEditListRoute
+ '/user/edit/list': typeof UserEditListRoute
+ '/user/edit/profile': typeof UserEditProfileRoute
+ '/user/wx/login': typeof UserWxLoginRoute
+ '/app/$appKey/version/list': typeof AppAppKeyVersionListRoute
+ '/container/preview/$id/wrapper': typeof ContainerPreviewIdWrapperRoute
+ '/org/edit/user/$id': typeof OrgEditUserIdRoute
+}
+export interface FileRoutesByTo {
+ '/': typeof IndexRoute
+ '/app': typeof AppIndexRoute
+ '/config': typeof ConfigIndexRoute
+ '/container': typeof ContainerIndexRoute
+ '/domain': typeof DomainIndexRoute
+ '/file': typeof FileIndexRoute
+ '/home': typeof HomeRoute
+ '/map': typeof MapRoute
+ '/org': typeof OrgIndexRoute
+ '/user': typeof UserIndexRoute
+ '/user/login': typeof UserLoginRoute
+ '/app/edit/list': typeof AppEditListRoute
+ '/config/edit/list': typeof ConfigEditListRoute
+ '/container/edit/list': typeof ContainerEditListRoute
+ '/container/preview/$id': typeof ContainerPreviewIdRouteWithChildren
+ '/domain/edit/list': typeof DomainEditListRoute
+ '/file/edit/list': typeof FileEditListRoute
+ '/org/edit/list': typeof OrgEditListRoute
+ '/user/edit/list': typeof UserEditListRoute
+ '/user/edit/profile': typeof UserEditProfileRoute
+ '/user/wx/login': typeof UserWxLoginRoute
+ '/app/$appKey/version/list': typeof AppAppKeyVersionListRoute
+ '/container/preview/$id/wrapper': typeof ContainerPreviewIdWrapperRoute
+ '/org/edit/user/$id': typeof OrgEditUserIdRoute
+}
+export interface FileRoutesById {
+ __root__: typeof rootRouteImport
+ '/': typeof IndexRoute
+ '/app': typeof AppRouteWithChildren
+ '/config': typeof ConfigRouteWithChildren
+ '/container': typeof ContainerRouteWithChildren
+ '/domain': typeof DomainRouteWithChildren
+ '/file': typeof FileRouteWithChildren
+ '/home': typeof HomeRoute
+ '/map': typeof MapRoute
+ '/org': typeof OrgRouteWithChildren
+ '/user': typeof UserRouteWithChildren
+ '/app/_index': typeof AppIndexRoute
+ '/config/_index': typeof ConfigIndexRoute
+ '/container/_index': typeof ContainerIndexRoute
+ '/domain/_index': typeof DomainIndexRoute
+ '/file/_index': typeof FileIndexRoute
+ '/org/_index': typeof OrgIndexRoute
+ '/user/_index': typeof UserIndexRoute
+ '/user/login': typeof UserLoginRoute
+ '/app/edit/list': typeof AppEditListRoute
+ '/config/edit/list': typeof ConfigEditListRoute
+ '/container/edit/list': typeof ContainerEditListRoute
+ '/container/preview/$id': typeof ContainerPreviewIdRouteWithChildren
+ '/domain/edit/list': typeof DomainEditListRoute
+ '/file/edit/list': typeof FileEditListRoute
+ '/org/edit/list': typeof OrgEditListRoute
+ '/user/edit/list': typeof UserEditListRoute
+ '/user/edit/profile': typeof UserEditProfileRoute
+ '/user/wx/login': typeof UserWxLoginRoute
+ '/app/$appKey/version/list': typeof AppAppKeyVersionListRoute
+ '/container/preview/$id/wrapper': typeof ContainerPreviewIdWrapperRoute
+ '/org/edit/user/$id': typeof OrgEditUserIdRoute
+}
+export interface FileRouteTypes {
+ fileRoutesByFullPath: FileRoutesByFullPath
+ fullPaths:
+ | '/'
+ | '/app'
+ | '/config'
+ | '/container'
+ | '/domain'
+ | '/file'
+ | '/home'
+ | '/map'
+ | '/org'
+ | '/user'
+ | '/user/login'
+ | '/app/edit/list'
+ | '/config/edit/list'
+ | '/container/edit/list'
+ | '/container/preview/$id'
+ | '/domain/edit/list'
+ | '/file/edit/list'
+ | '/org/edit/list'
+ | '/user/edit/list'
+ | '/user/edit/profile'
+ | '/user/wx/login'
+ | '/app/$appKey/version/list'
+ | '/container/preview/$id/wrapper'
+ | '/org/edit/user/$id'
+ fileRoutesByTo: FileRoutesByTo
+ to:
+ | '/'
+ | '/app'
+ | '/config'
+ | '/container'
+ | '/domain'
+ | '/file'
+ | '/home'
+ | '/map'
+ | '/org'
+ | '/user'
+ | '/user/login'
+ | '/app/edit/list'
+ | '/config/edit/list'
+ | '/container/edit/list'
+ | '/container/preview/$id'
+ | '/domain/edit/list'
+ | '/file/edit/list'
+ | '/org/edit/list'
+ | '/user/edit/list'
+ | '/user/edit/profile'
+ | '/user/wx/login'
+ | '/app/$appKey/version/list'
+ | '/container/preview/$id/wrapper'
+ | '/org/edit/user/$id'
+ id:
+ | '__root__'
+ | '/'
+ | '/app'
+ | '/config'
+ | '/container'
+ | '/domain'
+ | '/file'
+ | '/home'
+ | '/map'
+ | '/org'
+ | '/user'
+ | '/app/_index'
+ | '/config/_index'
+ | '/container/_index'
+ | '/domain/_index'
+ | '/file/_index'
+ | '/org/_index'
+ | '/user/_index'
+ | '/user/login'
+ | '/app/edit/list'
+ | '/config/edit/list'
+ | '/container/edit/list'
+ | '/container/preview/$id'
+ | '/domain/edit/list'
+ | '/file/edit/list'
+ | '/org/edit/list'
+ | '/user/edit/list'
+ | '/user/edit/profile'
+ | '/user/wx/login'
+ | '/app/$appKey/version/list'
+ | '/container/preview/$id/wrapper'
+ | '/org/edit/user/$id'
+ fileRoutesById: FileRoutesById
+}
+export interface RootRouteChildren {
+ IndexRoute: typeof IndexRoute
+ AppRoute: typeof AppRouteWithChildren
+ ConfigRoute: typeof ConfigRouteWithChildren
+ ContainerRoute: typeof ContainerRouteWithChildren
+ DomainRoute: typeof DomainRouteWithChildren
+ FileRoute: typeof FileRouteWithChildren
+ HomeRoute: typeof HomeRoute
+ MapRoute: typeof MapRoute
+ OrgRoute: typeof OrgRouteWithChildren
+ UserRoute: typeof UserRouteWithChildren
+}
+
+declare module '@tanstack/react-router' {
+ interface FileRoutesByPath {
+ '/user': {
+ id: '/user'
+ path: '/user'
+ fullPath: '/user'
+ preLoaderRoute: typeof UserRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/org': {
+ id: '/org'
+ path: '/org'
+ fullPath: '/org'
+ preLoaderRoute: typeof OrgRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/map': {
+ id: '/map'
+ path: '/map'
+ fullPath: '/map'
+ preLoaderRoute: typeof MapRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/home': {
+ id: '/home'
+ path: '/home'
+ fullPath: '/home'
+ preLoaderRoute: typeof HomeRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/file': {
+ id: '/file'
+ path: '/file'
+ fullPath: '/file'
+ preLoaderRoute: typeof FileRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/domain': {
+ id: '/domain'
+ path: '/domain'
+ fullPath: '/domain'
+ preLoaderRoute: typeof DomainRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/container': {
+ id: '/container'
+ path: '/container'
+ fullPath: '/container'
+ preLoaderRoute: typeof ContainerRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/config': {
+ id: '/config'
+ path: '/config'
+ fullPath: '/config'
+ preLoaderRoute: typeof ConfigRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/app': {
+ id: '/app'
+ path: '/app'
+ fullPath: '/app'
+ preLoaderRoute: typeof AppRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/': {
+ id: '/'
+ path: '/'
+ fullPath: '/'
+ preLoaderRoute: typeof IndexRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/user/login': {
+ id: '/user/login'
+ path: '/login'
+ fullPath: '/user/login'
+ preLoaderRoute: typeof UserLoginRouteImport
+ parentRoute: typeof UserRoute
+ }
+ '/user/_index': {
+ id: '/user/_index'
+ path: ''
+ fullPath: '/user'
+ preLoaderRoute: typeof UserIndexRouteImport
+ parentRoute: typeof UserRoute
+ }
+ '/org/_index': {
+ id: '/org/_index'
+ path: ''
+ fullPath: '/org'
+ preLoaderRoute: typeof OrgIndexRouteImport
+ parentRoute: typeof OrgRoute
+ }
+ '/file/_index': {
+ id: '/file/_index'
+ path: ''
+ fullPath: '/file'
+ preLoaderRoute: typeof FileIndexRouteImport
+ parentRoute: typeof FileRoute
+ }
+ '/domain/_index': {
+ id: '/domain/_index'
+ path: ''
+ fullPath: '/domain'
+ preLoaderRoute: typeof DomainIndexRouteImport
+ parentRoute: typeof DomainRoute
+ }
+ '/container/_index': {
+ id: '/container/_index'
+ path: ''
+ fullPath: '/container'
+ preLoaderRoute: typeof ContainerIndexRouteImport
+ parentRoute: typeof ContainerRoute
+ }
+ '/config/_index': {
+ id: '/config/_index'
+ path: ''
+ fullPath: '/config'
+ preLoaderRoute: typeof ConfigIndexRouteImport
+ parentRoute: typeof ConfigRoute
+ }
+ '/app/_index': {
+ id: '/app/_index'
+ path: ''
+ fullPath: '/app'
+ preLoaderRoute: typeof AppIndexRouteImport
+ parentRoute: typeof AppRoute
+ }
+ '/user/wx/login': {
+ id: '/user/wx/login'
+ path: '/wx/login'
+ fullPath: '/user/wx/login'
+ preLoaderRoute: typeof UserWxLoginRouteImport
+ parentRoute: typeof UserRoute
+ }
+ '/user/edit/profile': {
+ id: '/user/edit/profile'
+ path: '/edit/profile'
+ fullPath: '/user/edit/profile'
+ preLoaderRoute: typeof UserEditProfileRouteImport
+ parentRoute: typeof UserRoute
+ }
+ '/user/edit/list': {
+ id: '/user/edit/list'
+ path: '/edit/list'
+ fullPath: '/user/edit/list'
+ preLoaderRoute: typeof UserEditListRouteImport
+ parentRoute: typeof UserRoute
+ }
+ '/org/edit/list': {
+ id: '/org/edit/list'
+ path: '/edit/list'
+ fullPath: '/org/edit/list'
+ preLoaderRoute: typeof OrgEditListRouteImport
+ parentRoute: typeof OrgRoute
+ }
+ '/file/edit/list': {
+ id: '/file/edit/list'
+ path: '/edit/list'
+ fullPath: '/file/edit/list'
+ preLoaderRoute: typeof FileEditListRouteImport
+ parentRoute: typeof FileRoute
+ }
+ '/domain/edit/list': {
+ id: '/domain/edit/list'
+ path: '/edit/list'
+ fullPath: '/domain/edit/list'
+ preLoaderRoute: typeof DomainEditListRouteImport
+ parentRoute: typeof DomainRoute
+ }
+ '/container/preview/$id': {
+ id: '/container/preview/$id'
+ path: '/preview/$id'
+ fullPath: '/container/preview/$id'
+ preLoaderRoute: typeof ContainerPreviewIdRouteImport
+ parentRoute: typeof ContainerRoute
+ }
+ '/container/edit/list': {
+ id: '/container/edit/list'
+ path: '/edit/list'
+ fullPath: '/container/edit/list'
+ preLoaderRoute: typeof ContainerEditListRouteImport
+ parentRoute: typeof ContainerRoute
+ }
+ '/config/edit/list': {
+ id: '/config/edit/list'
+ path: '/edit/list'
+ fullPath: '/config/edit/list'
+ preLoaderRoute: typeof ConfigEditListRouteImport
+ parentRoute: typeof ConfigRoute
+ }
+ '/app/edit/list': {
+ id: '/app/edit/list'
+ path: '/edit/list'
+ fullPath: '/app/edit/list'
+ preLoaderRoute: typeof AppEditListRouteImport
+ parentRoute: typeof AppRoute
+ }
+ '/org/edit/user/$id': {
+ id: '/org/edit/user/$id'
+ path: '/edit/user/$id'
+ fullPath: '/org/edit/user/$id'
+ preLoaderRoute: typeof OrgEditUserIdRouteImport
+ parentRoute: typeof OrgRoute
+ }
+ '/container/preview/$id/wrapper': {
+ id: '/container/preview/$id/wrapper'
+ path: '/wrapper'
+ fullPath: '/container/preview/$id/wrapper'
+ preLoaderRoute: typeof ContainerPreviewIdWrapperRouteImport
+ parentRoute: typeof ContainerPreviewIdRoute
+ }
+ '/app/$appKey/version/list': {
+ id: '/app/$appKey/version/list'
+ path: '/$appKey/version/list'
+ fullPath: '/app/$appKey/version/list'
+ preLoaderRoute: typeof AppAppKeyVersionListRouteImport
+ parentRoute: typeof AppRoute
+ }
+ }
+}
+
+interface AppRouteChildren {
+ AppIndexRoute: typeof AppIndexRoute
+ AppEditListRoute: typeof AppEditListRoute
+ AppAppKeyVersionListRoute: typeof AppAppKeyVersionListRoute
+}
+
+const AppRouteChildren: AppRouteChildren = {
+ AppIndexRoute: AppIndexRoute,
+ AppEditListRoute: AppEditListRoute,
+ AppAppKeyVersionListRoute: AppAppKeyVersionListRoute,
+}
+
+const AppRouteWithChildren = AppRoute._addFileChildren(AppRouteChildren)
+
+interface ConfigRouteChildren {
+ ConfigIndexRoute: typeof ConfigIndexRoute
+ ConfigEditListRoute: typeof ConfigEditListRoute
+}
+
+const ConfigRouteChildren: ConfigRouteChildren = {
+ ConfigIndexRoute: ConfigIndexRoute,
+ ConfigEditListRoute: ConfigEditListRoute,
+}
+
+const ConfigRouteWithChildren =
+ ConfigRoute._addFileChildren(ConfigRouteChildren)
+
+interface ContainerPreviewIdRouteChildren {
+ ContainerPreviewIdWrapperRoute: typeof ContainerPreviewIdWrapperRoute
+}
+
+const ContainerPreviewIdRouteChildren: ContainerPreviewIdRouteChildren = {
+ ContainerPreviewIdWrapperRoute: ContainerPreviewIdWrapperRoute,
+}
+
+const ContainerPreviewIdRouteWithChildren =
+ ContainerPreviewIdRoute._addFileChildren(ContainerPreviewIdRouteChildren)
+
+interface ContainerRouteChildren {
+ ContainerIndexRoute: typeof ContainerIndexRoute
+ ContainerEditListRoute: typeof ContainerEditListRoute
+ ContainerPreviewIdRoute: typeof ContainerPreviewIdRouteWithChildren
+}
+
+const ContainerRouteChildren: ContainerRouteChildren = {
+ ContainerIndexRoute: ContainerIndexRoute,
+ ContainerEditListRoute: ContainerEditListRoute,
+ ContainerPreviewIdRoute: ContainerPreviewIdRouteWithChildren,
+}
+
+const ContainerRouteWithChildren = ContainerRoute._addFileChildren(
+ ContainerRouteChildren,
+)
+
+interface DomainRouteChildren {
+ DomainIndexRoute: typeof DomainIndexRoute
+ DomainEditListRoute: typeof DomainEditListRoute
+}
+
+const DomainRouteChildren: DomainRouteChildren = {
+ DomainIndexRoute: DomainIndexRoute,
+ DomainEditListRoute: DomainEditListRoute,
+}
+
+const DomainRouteWithChildren =
+ DomainRoute._addFileChildren(DomainRouteChildren)
+
+interface FileRouteChildren {
+ FileIndexRoute: typeof FileIndexRoute
+ FileEditListRoute: typeof FileEditListRoute
+}
+
+const FileRouteChildren: FileRouteChildren = {
+ FileIndexRoute: FileIndexRoute,
+ FileEditListRoute: FileEditListRoute,
+}
+
+const FileRouteWithChildren = FileRoute._addFileChildren(FileRouteChildren)
+
+interface OrgRouteChildren {
+ OrgIndexRoute: typeof OrgIndexRoute
+ OrgEditListRoute: typeof OrgEditListRoute
+ OrgEditUserIdRoute: typeof OrgEditUserIdRoute
+}
+
+const OrgRouteChildren: OrgRouteChildren = {
+ OrgIndexRoute: OrgIndexRoute,
+ OrgEditListRoute: OrgEditListRoute,
+ OrgEditUserIdRoute: OrgEditUserIdRoute,
+}
+
+const OrgRouteWithChildren = OrgRoute._addFileChildren(OrgRouteChildren)
+
+interface UserRouteChildren {
+ UserIndexRoute: typeof UserIndexRoute
+ UserLoginRoute: typeof UserLoginRoute
+ UserEditListRoute: typeof UserEditListRoute
+ UserEditProfileRoute: typeof UserEditProfileRoute
+ UserWxLoginRoute: typeof UserWxLoginRoute
+}
+
+const UserRouteChildren: UserRouteChildren = {
+ UserIndexRoute: UserIndexRoute,
+ UserLoginRoute: UserLoginRoute,
+ UserEditListRoute: UserEditListRoute,
+ UserEditProfileRoute: UserEditProfileRoute,
+ UserWxLoginRoute: UserWxLoginRoute,
+}
+
+const UserRouteWithChildren = UserRoute._addFileChildren(UserRouteChildren)
+
+const rootRouteChildren: RootRouteChildren = {
+ IndexRoute: IndexRoute,
+ AppRoute: AppRouteWithChildren,
+ ConfigRoute: ConfigRouteWithChildren,
+ ContainerRoute: ContainerRouteWithChildren,
+ DomainRoute: DomainRouteWithChildren,
+ FileRoute: FileRouteWithChildren,
+ HomeRoute: HomeRoute,
+ MapRoute: MapRoute,
+ OrgRoute: OrgRouteWithChildren,
+ UserRoute: UserRouteWithChildren,
+}
+export const routeTree = rootRouteImport
+ ._addFileChildren(rootRouteChildren)
+ ._addFileTypes
()
diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx
new file mode 100644
index 0000000..d40d82a
--- /dev/null
+++ b/src/routes/__root.tsx
@@ -0,0 +1,16 @@
+import { Link, Outlet, createRootRoute } from '@tanstack/react-router'
+import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'
+
+export const Route = createRootRoute({
+ component: RootComponent,
+})
+
+function RootComponent() {
+ return (
+ <>
+
+
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/src/routes/app.$appKey.version.list.tsx b/src/routes/app.$appKey.version.list.tsx
new file mode 100644
index 0000000..4fe4c82
--- /dev/null
+++ b/src/routes/app.$appKey.version.list.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { AppVersionList } from '../pages/app/edit/AppVersionList'
+
+export const Route = createFileRoute('/app/$appKey/version/list')({
+ component: () => ,
+})
diff --git a/src/routes/app._index.tsx b/src/routes/app._index.tsx
new file mode 100644
index 0000000..2d456e8
--- /dev/null
+++ b/src/routes/app._index.tsx
@@ -0,0 +1,11 @@
+import { createFileRoute, redirect } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/app/_index')({
+ beforeLoad: () => {
+ throw redirect({
+ to: '/app/edit/list',
+ throw: true,
+ })
+ },
+ component: () => null,
+})
diff --git a/src/routes/app.edit.list.tsx b/src/routes/app.edit.list.tsx
new file mode 100644
index 0000000..f5a2e73
--- /dev/null
+++ b/src/routes/app.edit.list.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { List } from '../pages/app/edit/List'
+
+export const Route = createFileRoute('/app/edit/list')({
+ component: () =>
,
+})
diff --git a/src/routes/app.tsx b/src/routes/app.tsx
new file mode 100644
index 0000000..d30452d
--- /dev/null
+++ b/src/routes/app.tsx
@@ -0,0 +1,6 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+import { Main } from '../pages/app/layouts'
+
+export const Route = createFileRoute('/app')({
+ component: () => ,
+})
diff --git a/src/routes/config._index.tsx b/src/routes/config._index.tsx
new file mode 100644
index 0000000..b70e8fe
--- /dev/null
+++ b/src/routes/config._index.tsx
@@ -0,0 +1,11 @@
+import { createFileRoute, redirect } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/config/_index')({
+ beforeLoad: () => {
+ throw redirect({
+ to: '/config/edit/list',
+ throw: true,
+ })
+ },
+ component: () => null,
+})
diff --git a/src/routes/config.edit.list.tsx b/src/routes/config.edit.list.tsx
new file mode 100644
index 0000000..1a31e32
--- /dev/null
+++ b/src/routes/config.edit.list.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { List } from '../pages/config/edit/List'
+
+export const Route = createFileRoute('/config/edit/list')({
+ component: () =>
,
+})
diff --git a/src/routes/config.tsx b/src/routes/config.tsx
new file mode 100644
index 0000000..6c1c459
--- /dev/null
+++ b/src/routes/config.tsx
@@ -0,0 +1,10 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+import { LayoutMain } from '@/modules/layout'
+
+export const Route = createFileRoute('/config')({
+ component: () => (
+
+
+
+ ),
+})
diff --git a/src/routes/container._index.tsx b/src/routes/container._index.tsx
new file mode 100644
index 0000000..aa52715
--- /dev/null
+++ b/src/routes/container._index.tsx
@@ -0,0 +1,11 @@
+import { createFileRoute, redirect } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/container/_index')({
+ beforeLoad: () => {
+ throw redirect({
+ to: '/container/edit/list',
+ throw: true,
+ })
+ },
+ component: () => null,
+})
diff --git a/src/routes/container.edit.list.tsx b/src/routes/container.edit.list.tsx
new file mode 100644
index 0000000..5fe28ae
--- /dev/null
+++ b/src/routes/container.edit.list.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { ContainerList } from '../pages/container/edit/List'
+
+export const Route = createFileRoute('/container/edit/list')({
+ component: () => ,
+})
diff --git a/src/routes/container.preview.$id.tsx b/src/routes/container.preview.$id.tsx
new file mode 100644
index 0000000..3159812
--- /dev/null
+++ b/src/routes/container.preview.$id.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { Preview } from '../pages/container/preview'
+
+export const Route = createFileRoute('/container/preview/$id')({
+ component: () => ,
+})
diff --git a/src/routes/container.preview.$id.wrapper.tsx b/src/routes/container.preview.$id.wrapper.tsx
new file mode 100644
index 0000000..92fb765
--- /dev/null
+++ b/src/routes/container.preview.$id.wrapper.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { PreviewWrapper } from '../pages/container/preview'
+
+export const Route = createFileRoute('/container/preview/$id/wrapper')({
+ component: () => ,
+})
diff --git a/src/routes/container.tsx b/src/routes/container.tsx
new file mode 100644
index 0000000..381d240
--- /dev/null
+++ b/src/routes/container.tsx
@@ -0,0 +1,10 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+import { LayoutMain } from '@/modules/layout'
+
+export const Route = createFileRoute('/container')({
+ component: () => (
+
+
+
+ ),
+})
diff --git a/src/routes/domain._index.tsx b/src/routes/domain._index.tsx
new file mode 100644
index 0000000..1be3f7c
--- /dev/null
+++ b/src/routes/domain._index.tsx
@@ -0,0 +1,11 @@
+import { createFileRoute, redirect } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/domain/_index')({
+ beforeLoad: () => {
+ throw redirect({
+ to: '/domain/edit/list',
+ throw: true,
+ })
+ },
+ component: () => null,
+})
diff --git a/src/routes/domain.edit.list.tsx b/src/routes/domain.edit.list.tsx
new file mode 100644
index 0000000..1b5ca9c
--- /dev/null
+++ b/src/routes/domain.edit.list.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { List } from '../pages/domain/edit/List'
+
+export const Route = createFileRoute('/domain/edit/list')({
+ component: () =>
,
+})
diff --git a/src/routes/domain.tsx b/src/routes/domain.tsx
new file mode 100644
index 0000000..03daa08
--- /dev/null
+++ b/src/routes/domain.tsx
@@ -0,0 +1,6 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+import { Main } from '../pages/domain/layouts'
+
+export const Route = createFileRoute('/domain')({
+ component: () => ,
+})
diff --git a/src/routes/file._index.tsx b/src/routes/file._index.tsx
new file mode 100644
index 0000000..31bdbfa
--- /dev/null
+++ b/src/routes/file._index.tsx
@@ -0,0 +1,11 @@
+import { createFileRoute, redirect } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/file/_index')({
+ beforeLoad: () => {
+ throw redirect({
+ to: '/file/edit/list',
+ throw: true,
+ })
+ },
+ component: () => null,
+})
diff --git a/src/routes/file.edit.list.tsx b/src/routes/file.edit.list.tsx
new file mode 100644
index 0000000..5e95a46
--- /dev/null
+++ b/src/routes/file.edit.list.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { List } from '../pages/file/edit/List'
+
+export const Route = createFileRoute('/file/edit/list')({
+ component: () =>
,
+})
diff --git a/src/routes/file.tsx b/src/routes/file.tsx
new file mode 100644
index 0000000..dfc5661
--- /dev/null
+++ b/src/routes/file.tsx
@@ -0,0 +1,6 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+import { Main } from '../pages/file/layouts'
+
+export const Route = createFileRoute('/file')({
+ component: () => ,
+})
diff --git a/src/routes/home.tsx b/src/routes/home.tsx
new file mode 100644
index 0000000..e0e2bc9
--- /dev/null
+++ b/src/routes/home.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { App as HomeApp } from '../pages/home'
+
+export const Route = createFileRoute('/home')({
+ component: () => ,
+})
diff --git a/src/routes/index.tsx b/src/routes/index.tsx
new file mode 100644
index 0000000..2fe0fe7
--- /dev/null
+++ b/src/routes/index.tsx
@@ -0,0 +1,11 @@
+import { createFileRoute, redirect } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/')({
+ beforeLoad: () => {
+ throw redirect({
+ to: '/app',
+ throw: true,
+ })
+ },
+ component: () => null,
+})
diff --git a/src/routes/map.tsx b/src/routes/map.tsx
new file mode 100644
index 0000000..55ddfce
--- /dev/null
+++ b/src/routes/map.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { App as MapApp } from '../pages/map'
+
+export const Route = createFileRoute('/map')({
+ component: () => ,
+})
diff --git a/src/routes/org._index.tsx b/src/routes/org._index.tsx
new file mode 100644
index 0000000..6a4f876
--- /dev/null
+++ b/src/routes/org._index.tsx
@@ -0,0 +1,11 @@
+import { createFileRoute, redirect } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/org/_index')({
+ beforeLoad: () => {
+ throw redirect({
+ to: '/org/edit/list',
+ throw: true,
+ })
+ },
+ component: () => null,
+})
diff --git a/src/routes/org.edit.list.tsx b/src/routes/org.edit.list.tsx
new file mode 100644
index 0000000..b672f38
--- /dev/null
+++ b/src/routes/org.edit.list.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { List } from '../pages/org/edit/List'
+
+export const Route = createFileRoute('/org/edit/list')({
+ component: () =>
,
+})
diff --git a/src/routes/org.edit.user.$id.tsx b/src/routes/org.edit.user.$id.tsx
new file mode 100644
index 0000000..8098bfb
--- /dev/null
+++ b/src/routes/org.edit.user.$id.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { UserList } from '../pages/org/edit/UserList'
+
+export const Route = createFileRoute('/org/edit/user/$id')({
+ component: () => ,
+})
diff --git a/src/routes/org.tsx b/src/routes/org.tsx
new file mode 100644
index 0000000..50dc5fd
--- /dev/null
+++ b/src/routes/org.tsx
@@ -0,0 +1,6 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+import { Main } from '../pages/org/layouts'
+
+export const Route = createFileRoute('/org')({
+ component: () => ,
+})
diff --git a/src/routes/user._index.tsx b/src/routes/user._index.tsx
new file mode 100644
index 0000000..c6c8cbe
--- /dev/null
+++ b/src/routes/user._index.tsx
@@ -0,0 +1,11 @@
+import { createFileRoute, redirect } from '@tanstack/react-router'
+
+export const Route = createFileRoute('/user/_index')({
+ beforeLoad: () => {
+ throw redirect({
+ to: '/user/edit/list',
+ throw: true,
+ })
+ },
+ component: () => null,
+})
diff --git a/src/routes/user.edit.list.tsx b/src/routes/user.edit.list.tsx
new file mode 100644
index 0000000..c68ad81
--- /dev/null
+++ b/src/routes/user.edit.list.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { List } from '../pages/user/edit/List'
+
+export const Route = createFileRoute('/user/edit/list')({
+ component: () =>
,
+})
diff --git a/src/routes/user.edit.profile.tsx b/src/routes/user.edit.profile.tsx
new file mode 100644
index 0000000..ba681fa
--- /dev/null
+++ b/src/routes/user.edit.profile.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { Profile } from '../pages/user/edit/Profile'
+
+export const Route = createFileRoute('/user/edit/profile')({
+ component: () => ,
+})
diff --git a/src/routes/user.login.tsx b/src/routes/user.login.tsx
new file mode 100644
index 0000000..5b14c88
--- /dev/null
+++ b/src/routes/user.login.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { Login as UserLogin } from '../pages/user/login/Login'
+
+export const Route = createFileRoute('/user/login')({
+ component: () => ,
+})
diff --git a/src/routes/user.tsx b/src/routes/user.tsx
new file mode 100644
index 0000000..a3728d4
--- /dev/null
+++ b/src/routes/user.tsx
@@ -0,0 +1,10 @@
+import { Outlet, createFileRoute } from '@tanstack/react-router'
+import { LayoutMain } from '@/modules/layout'
+
+export const Route = createFileRoute('/user')({
+ component: () => (
+
+
+
+ ),
+})
diff --git a/src/routes/user.wx.login.tsx b/src/routes/user.wx.login.tsx
new file mode 100644
index 0000000..2e98756
--- /dev/null
+++ b/src/routes/user.wx.login.tsx
@@ -0,0 +1,6 @@
+import { createFileRoute } from '@tanstack/react-router'
+import { Login as WxLogin } from '../pages/user/wx/Login'
+
+export const Route = createFileRoute('/user/wx/login')({
+ component: () => ,
+})
diff --git a/vite.config.ts b/vite.config.ts
index 320daaa..0b19b48 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -2,6 +2,8 @@ import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import tailwindcss from '@tailwindcss/vite';
+import { tanstackRouter } from '@tanstack/router-plugin/vite'
+
const isDev = process.env.NODE_ENV === 'development';
const centerEnv = process.env.CENTER_ENV;
const plugins: any[] = [];
@@ -17,7 +19,13 @@ let proxy = {
// https://vitejs.dev/config/
export default defineConfig({
- plugins: [react(), ...plugins],
+ plugins: [
+ // Please make sure that '@tanstack/router-plugin' is passed before '@vitejs/plugin-react'
+ tanstackRouter({
+ target: 'react',
+ autoCodeSplitting: true,
+ }),
+ react(), ...plugins],
css: {
postcss: {},
@@ -34,38 +42,6 @@ export default defineConfig({
base: isDev ? '/' : '/root/center-v1/',
build: {
sourcemap: false,
- rollupOptions: {
- output: {
- // 控制输出
- // 在rollup里面, hash代表将你的文件名和文件内容进行组合计算得来的结果
- assetFileNames: (chunkInfo) => {
- console.log(chunkInfo.names);
- if (chunkInfo.names?.includes('panda.jpg')) {
- return '[name].[ext]';
- }
- const qrcode = ['qrcode-8x8.jpg'];
- const names = chunkInfo.names || [];
- if (qrcode.some((name) => names.includes(name))) {
- return '[name].[ext]';
- }
- return '[name].[hash].[ext]';
- },
- manualChunks(id) {
- if (id.includes('node_modules')) {
- if (id.includes('react')) {
- return 'vendor-react';
- }
- // prettier
- if (id.includes('prettier')) {
- return 'vendor-prettier';
- }
- // codemirror
- // console.log(id);
- return 'vendor';
- }
- },
- },
- },
},
server: {
port: 6020,