mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2026-11-30 00:23:38 +08:00
2 lines
4.3 KiB
JavaScript
2 lines
4.3 KiB
JavaScript
import{_ as t,o as a,c as o,a3 as r}from"./chunks/framework.D8G7yXPy.js";const m=JSON.parse('{"title":"v5 与 v6 的版本分界","description":"","frontmatter":{},"headers":[],"relativePath":"migration.md","filePath":"migration.md"}'),d={name:"migration.md"};function c(i,e,l,n,s,h){return a(),o("div",null,[...e[0]||(e[0]=[r('<h1 id="v5-与-v6-的版本分界" tabindex="-1">v5 与 v6 的版本分界 <a class="header-anchor" href="#v5-与-v6-的版本分界" aria-label="Permalink to "v5 与 v6 的版本分界""></a></h1><p><strong>Ray Template 6.0.0 是新的主版本,与 v5 分线。</strong> v6 以 Monorepo 重新组织后台、官网文档和共享包,不提供 v5 的原地升级,也不承诺兼容 v5 的内部路径、接口、配置或本地数据。v5 项目可以继续使用原版本。</p><table tabindex="0"><thead><tr><th>版本</th><th>从哪里开始</th></tr></thead><tbody><tr><td><strong>v6.0.0</strong></td><td>新项目从 v6 工作区起步。先看<a href="./guide/start.html">快速开始</a>和<a href="./guide/architecture.html">架构指南</a>。</td></tr><tr><td><strong>v5</strong></td><td>在 <a href="https://github.com/XiaoDaiGua-Ray/ray-template/tree/legacy/v5" target="_blank" rel="noreferrer">legacy/v5</a> 查看截断前的完整源码。该分支固定于 <code>6f095b7</code>,清单版本为 <code>5.2.5</code>。需要已打标签的版本时,使用 <a href="https://github.com/XiaoDaiGua-Ray/ray-template/tree/v5.2.4" target="_blank" rel="noreferrer">v5.2.4</a>。</td></tr></tbody></table><h2 id="v6-的变更" tabindex="-1">v6 的变更 <a class="header-anchor" href="#v6-的变更" aria-label="Permalink to "v6 的变更""></a></h2><table tabindex="0"><thead><tr><th>领域</th><th>v6 的入口与约定</th></tr></thead><tbody><tr><td>应用结构</td><td>原来根目录的 <code>src/</code>、<code>mock/</code>、<code>public/</code>、应用环境文件和 <code>index.html</code> 归入 <code>apps/admin/</code>。环境变量、容器配置和构建脚本应按 v6 入口重新核对。</td></tr><tr><td>组件与工具</td><td>从各包的公开入口导入共享能力,例如 <code>@ray-template/ui/table-pro</code>、<code>@ray-template/composables/useDevice</code> 和 <code>@ray-template/utils/precision</code>。Ray Admin 内部的 <code>@/</code> 指向自己的 <code>src/</code>。</td></tr><tr><td>组件接入</td><td>v6 的 TablePro 统一使用 <code>RTablePro</code>,可传 <code>data</code> 或 <code>request(params, signal)</code>。<code>useTablePro</code> 保留 <code>[register, actions]</code> 和 <code>onRegister</code>,请求与实例方法使用<a href="./reference/table-pro.html#usetablepro">现行 API</a>。</td></tr><tr><td>路由、权限与请求</td><td>路由校验、请求客户端和布局由共享包提供。Ray Admin 在应用侧提供页面注册表、会话和鉴权、请求头、主题和语言。</td></tr><tr><td>文档与演示</td><td>VitePress 位于 <code>apps/docs/</code>,通过公共包运行示例。官方发布中后台位于 <code>/ray-template/</code>,v6 文档位于 <code>/ray-template/docs/</code>。</td></tr></tbody></table><h2 id="现有项目采用-v6" tabindex="-1">现有项目采用 v6 <a class="header-anchor" href="#现有项目采用-v6" aria-label="Permalink to "现有项目采用 v6""></a></h2><ol><li>从新的工作区或分支起步,保留现有 v5 代码与部署的回退入口。重新配置依赖、环境变量、接口地址和 CI。</li><li>按业务逐项迁入页面、接口及菜单配置,以 v6 的<a href="./guide/first-page.html">页面示例</a>、<a href="./guide/routing.html">路由约定</a>和 <a href="./reference/table-pro.html">TablePro API</a>为准。旧的深层导入、路由 JSON 和自定义拦截器需要逐项检查。</li><li>使用独立浏览器配置或部署源验证 v6。<code>localStorage</code> 按站点源隔离,放在同域不同路径不足以隔离 v5 和 v6 的会话与偏好。旧的设置、锁屏、缓存和登录状态没有通用迁移流程。</li><li>验证登录、权限、路由直达、接口、缓存和部署路径,再切换业务入口。运行 <code>pnpm harness verify</code>,需要组合部署时用 <code>pnpm pages:build</code>。<a href="./guide/tooling.html">工程检查与部署</a></li></ol>',7)])])}const p=t(d,[["render",c]]);export{m as __pageData,p as default};
|