2026原创React19.2+Vite8+Arco+Echarts后台管理模板Admin

33 阅读4分钟

爆肝一周实战react19.2+react-router7+arcoDesign搭建高颜值后台管理系统。

未标题-home.png

支持light+dark主题、3种通用模板、国际化、路由/状态管理、页面缓存,图表/表格/表单/鉴权/错误页等。

360截图20260707115153257.png

2026最新款Vite8.0+Vue3.5+ArcoDesign网页端WebOS桌面系统

原创vite8.0+vue3+naive-ui轻量级后台管理系统

全新原创Vue3+Vite8+Arco优雅个人管理系统解决方案

p1.gif

项目技术框架

  • 开发工具:vscode
  • 技术框架:react^19.2.7+react-router-dom^7.18.0
  • 构建工具;vite^8.1.0
  • 组件库:@arco-design/web-react^2.66.15
  • 状态管理:zustand^5.0.14
  • 路由页面缓存:react-activation^0.13.4
  • 加载进度条:nprogress^0.2.0
  • 图表组件:echarts^6.1.0
  • markdown编辑器:@uiw/react-md-editor^4.1.1
  • 模拟数据:axios^1.18.1 + mockjs^1.1.0
  • 样式管理:sass^1.101.0

p2.gif

项目结构目录

360截图20260707100319610.png

p3.gif

项目特色

  1. 基于vite8.0构建工具初始化项目模板
  2. 最新前端技术栈react19 hooks、zustand5、react-router v7、sass
  3. 内置浅色+深色模式一键切换,支持多语言(i18n)动态切换
  4. 内置3个模板布局风格
  5. 支持页面KeepAlive缓存机制
  6. 支持动态路由鉴权验证
  7. 支持tabs多标签页切换路由页面
  8. 优雅轻盈react组件库arco-design

p4.gif

360截图20260707120306415.png

项目入口App.jsx

import { useEffect, useMemo } from 'react'
import { HashRouter } from 'react-router-dom'
import { AliveScope } from 'react-activation'
// 通过 ConfigProvider 组件实现国际化
import { ConfigProvider } from '@arco-design/web-react'
// 引入语言包
import enUS from '@arco-design/web-react/es/locale/en-US'
import zhCN from '@arco-design/web-react/es/locale/zh-CN'
import zhTW from '@arco-design/web-react/es/locale/zh-TW'
import { AuthRouter } from '@/hooks/useRoutes'
import { appStore } from '@/store/app'
import { useTitle } from '@/hooks/useTitle'
// 引入路由配置
import Router from './router'
function AppLoaded() {
  const { config: { theme }, setMode, setTheme } = appStore()
  // 设置网站标题
  useTitle()
  useEffect(() => {
    setMode()
    setTheme(theme)
  }, [theme])
  
  return (
    <AuthRouter>
      <Router />
    </AuthRouter>
  )
}
function App() {
  const { lang } = appStore()
  const locale = useMemo(() => {
    switch(lang) {
      case 'en':
        return enUS
      case 'zh-CN':
        return zhCN
      case 'zh-TW':
        return zhTW
      default:
        return zhCN
    }
  }, [lang])
  return (
    <ConfigProvider
      // 国际化
      locale={locale}
      // 全局设置组件默认配置
      componentConfig={{
        Card: {
          style: {borderRadius: 4, borderColor: 'var(--color-border)'}
        }
      }}
    >
      <HashRouter>
        <AliveScope>
          <AppLoaded />
        </AliveScope>
      </HashRouter>
    </ConfigProvider>
  )
}
export default App

8a315bd2b01ef101b3ba3a7d457f9f2e_1289798-20260708112413514-806852735.png

3fdbec54feef4047aa2893fa0853377a_1289798-20260708112428091-350525798.png

66237522a965d5cc1e5578ad959b8492_1289798-20260708112438195-1221851283.png

38f053aad373eea637406a7e6d0741ef_1289798-20260708112446664-1014107100.png

react-admin通用布局

872f0169620c610674ac2c8ece63ef0a_1289798-20260708112749080-1894624824.png

cfab6a5587cbdcbffb6c4482b5eace42_1289798-20260708112831523-1310310731.png

import { useMemo } from 'react'
import clsx from 'clsx'
import { appStore } from '@/store/app'
// 引入布局模板
import Columns from './template/columns'
import Vertical from './template/vertical'
import Transverse from './template/transverse'
function Layout() {
  const { config: { layout, fullContent } } = appStore()
  // 布局模板
  const LayoutComponent = useMemo(() => {
    switch (layout) {
      case 'columns':
        return Columns
      case 'vertical':
        return Vertical
      case 'transverse':
        return Transverse
      default:
        return Columns
    }
  }, [layout])
  return (
    <div className={clsx('radmin__container', { 'is-full': fullContent })}>
      <LayoutComponent />
    </div>
  )
}

630f71e0e8d3d0a26094b9e06bd51b63_1289798-20260708112939200-373635118.png

7681c71ccc456903bddc35ac1d7a4ed9_1289798-20260708112952451-2055691435.png

e05dc0b97efa125faeafc5fb97e01a23_1289798-20260708113000944-720583250.png

d15522b9c593e2b1872516f308e07cef_1289798-20260708113014293-712767387.png

4dc748314e24413005a88df033f42424_1289798-20260708113024816-1184365780.png

image.png

6a4381c6ed6d2144e46dd0acc504cc54_1289798-20260708113048302-899197486.png

a7810d199c1aff69b922c3422b4a1a23_1289798-20260708113101555-707209900.png

6b1f017a13664210517910ff236724c3_1289798-20260708113109186-374501198.png

8b91043b8281b815d9c13f6e8fcff6c6_1289798-20260708113118446-1616425606.png

8b706027b62ed239581a0265117dcc84_1289798-20260708113127743-17182191.png

5a77d16f523bf35e5b654f601bb3fd9f_1289798-20260708113146858-1153036273.png

262611f209c3b9f7c2a03a36b4c516dc_1289798-20260708113157032-2089752677.png

af74f13def74099122d28f1d685c0fed_1289798-20260708113212870-1778905935.png

c47e9ceeccf87be1be9c525c32144f8b_1289798-20260708113222728-1058984089.png

0c8566bbf03e1a9a89f23f18ec5be58f_1289798-20260708113231989-1042551899.png

3163391521845eaa7149fa9339c2bfed_1289798-20260708113245866-1230721063.png

react-router v7路由配置

f010d243b72b8a9898c9f113066aca66_1289798-20260708113425630-1688310528.png

import { useRoutes, Navigate } from 'react-router-dom'

// 批量导入modules路由
const modules = import.meta.glob('./modules/*.jsx', { eager: true })
const patchRoutes = Object.keys(modules).map(key => modules[key].default).flat()

/**
 * useRoutes集中式路由配置
 * @param path 路由地址
 * @param key 跳转路由地址
 * @param redirect 重定向路由地址
 * @param element 页面模板
 * meta配置
 * @param meta.icon 菜单图标
 * @param meta.name 菜单标题(国际化控制)
 * @param meta.roles ==> 页面权限 ['admin', 'dev', 'test']
 * @param meta.isAuth 是否需要验证
 * @param meta.isHidden 是否隐藏路由菜单
 * @param meta.isKeepAlive 是否缓存页面
 * @param meta.isAffix 是否固定标签(tab标签不能关闭)
 */
export const routes = [
  {
    path: '/',
    element: <Navigate to="/home" replace={true} />,
    meta: {
      isWhite: true // 路由白名单
    }
  },
  ...patchRoutes,
  // 404模块
  {
    path: '*',
    element: <Navigate to="/error/404" />,
    meta: {
      isWhite: true
    }
  }
]

const Router = () => useRoutes(routes)

react使用keep-alive缓存页面。

import { KeepAlive } from 'react-activation'
import { useLocation, matchRoutes } from 'react-router-dom'
import { appStore } from '@/store/app'
import NprogressLoading from './nprogress'

import { routes } from '@/router'

export function KeepAliveWrapper({ children }) {
  const { pathname } = useLocation()
  const { reloadPage, config: { keepAlive } } = appStore()

  // 获取当前匹配路由
  const matched = matchRoutes(routes, pathname)
  const route = matched?.[matched.length - 1]?.route

  const isCache = (route?.meta?.isKeepAlive ?? keepAlive) === true
  const cacheKey = route?.redirect || route?.key

  // 刷新标识
  const content = reloadPage ? <NprogressLoading /> : children
  
  if (isCache) {
    return (
      <KeepAlive cacheKey={cacheKey} name={cacheKey} saveScrollPosition='screen'>
        {content}
      </KeepAlive>
    )
  }
  return <>{content}</>
}

自定义tabview标签栏

ec7bbd774f97933677388e7ade5cea6d_1289798-20260708113852486-1729543791.png

1d44b3d27d70720a75978f18eaca634b_1289798-20260708113936360-2107681273.png

支持面包屑快捷导航、tabs标签栏快速切换路由页面。

react-activation实现页面keep-alive缓存,类似vue缓存功能。

外层 AliveScope — 提供缓存能力

目标组件 KeepAlive — 启用缓存

<AliveScope>
  <App />
</AliveScope>
import { KeepAlive } from 'react-activation'
import { useLocation, matchRoutes } from 'react-router-dom'
import { appStore } from '@/store/app'
import NprogressLoading from './nprogress'
import { routes } from '@/router'
export function KeepAliveWrapper({ children }) {
  const { pathname } = useLocation()
  const { reloadPage, config: { keepAlive } } = appStore()
  // 获取当前匹配路由
  const matched = matchRoutes(routes, pathname)
  const route = matched?.[matched.length - 1]?.route
  const isCache = (route?.meta?.isKeepAlive ?? keepAlive) === true
  const cacheKey = route?.redirect || route?.key
  // 刷新标识
  const content = reloadPage ? <NprogressLoading /> : children
  
  if (isCache) {
    return (
      <KeepAlive cacheKey={cacheKey} name={cacheKey} saveScrollPosition='screen'>
        {content}
      </KeepAlive>
    )
  }
  return <>{content}</>
}

使用缓存组件,当页面切走再回来,状态不会丢失,组件不会重新挂载(例如表单不丢失、滚动位置保留等)。

23092af1529099b69a9a1011ce7ca045_1289798-20260708114317121-1320031546.png

综上就是react19+vite8+arco搭建网页版后台管理系统的一些项目分享。

最新版Flutter3.41+Dart3.11仿写抖音APP直播+短视频+聊天应用程序

Electron38-Wechat电脑端聊天|vite7+electron38仿微信桌面端聊天系统

uniapp+deepseek流式ai助理|uniapp+vue3对接deepseek三端Ai问答模板

vite8-webos网页版os管理|Vue3+Vite8.0+ArcoDesign搭建pc端os桌面系统

Vite8+DeepSeek网页版AI助手|vue3+arco本地web版ai流式打字问答系统

Flutter3.41+DeepSeek智能AI应用|flutter3+getx+dio流式ai对话app模板

Electron41+Vite8.0+DeepSeek桌面端AI助手|electron+vue3流式ai系统

Flutter3-MacOS桌面OS系统|flutter3.41+window_manager客户端OS模板

最新研发flutter3.41+bitsdojo_window+getx客户端仿微信聊天Exe应用

最新版uni-app+vue3+uv-ui跨三端仿微信app聊天应用【h5+小程序+app端】

Tauri2-Vite7Admin客户端管理后台|tauri2.9+vue3+element-plus后台系统

Tauri2.8+Vue3聊天系统|vite7+tauri2+element-plus客户端仿微信聊天程序