Refactor: UmiJs -> Vite (#12410)

### What problem does this PR solve?

Refactor: UmiJs -> Vite+React

### Type of change

- [x] Refactoring

---------

Co-authored-by: Liu An <asiro@qq.com>
This commit is contained in:
chanx
2026-01-04 19:14:20 +08:00
committed by GitHub
parent 2c10ccd622
commit a8a060676a
168 changed files with 12808 additions and 23476 deletions

View File

@ -1,17 +1,17 @@
import { ReactComponent as FileIcon } from '@/assets/svg/file-management.svg';
import { ReactComponent as GraphIcon } from '@/assets/svg/graph.svg';
import { ReactComponent as KnowledgeBaseIcon } from '@/assets/svg/knowledge-base.svg';
import FileIcon from '@/assets/svg/file-management.svg';
import GraphIcon from '@/assets/svg/graph.svg';
import KnowledgeBaseIcon from '@/assets/svg/knowledge-base.svg';
import { useTranslate } from '@/hooks/common-hooks';
import { useFetchAppConf } from '@/hooks/logic-hooks';
import { useNavigateWithFromState } from '@/hooks/route-hook';
import { MessageOutlined, SearchOutlined } from '@ant-design/icons';
import { Flex, Layout, Radio, Space, theme } from 'antd';
import { MouseEventHandler, useCallback, useMemo } from 'react';
import { useLocation } from 'umi';
import { useLocation } from 'react-router';
import Toolbar from '../right-toolbar';
import { useTheme } from '@/components/theme-provider';
import styles from './index.less';
import styles from './index.module.less';
const { Header } = Layout;

View File

@ -14,7 +14,7 @@ import {
} from '@/hooks/use-user-setting-request';
import { TenantRole } from '@/pages/user-setting/constants';
import { BellRing, CircleHelp, MoonIcon, SunIcon } from 'lucide-react';
import { useNavigate } from 'umi';
import { useNavigate } from 'react-router';
import styled from './index.less';
const Circle = ({ children, ...restProps }: React.PropsWithChildren) => {

View File

@ -1,9 +1,9 @@
import { useFetchUserInfo } from '@/hooks/use-user-setting-request';
import { history } from '@/utils/simple-history-util';
import { Avatar } from 'antd';
import React from 'react';
import { history } from 'umi';
import styles from '../../index.less';
import styles from '../../index.module.less';
const App: React.FC = () => {
const { data: userInfo } = useFetchUserInfo();

View File

@ -1,10 +1,10 @@
import { Divider, Layout, theme } from 'antd';
import React from 'react';
import { Outlet } from 'umi';
import { Outlet } from 'react-router';
import '../locales/config';
import Header from './components/header';
import styles from './index.less';
import styles from './index.module.less';
const { Content } = Layout;

View File

@ -30,7 +30,7 @@ import {
} from 'lucide-react';
import React, { useCallback, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { useLocation } from 'umi';
import { useLocation } from 'react-router';
import { BellButton } from './bell-button';
const handleDocHelpCLick = () => {

View File

@ -1,4 +1,4 @@
import { Outlet } from 'umi';
import { Outlet } from 'react-router';
import { Header } from './next-header';
export default function NextLayout() {