主题通道 yh-theme-init.js 的 appearance 有硬性同源限制 (appearanceSameOrigin 不通过直接 return,连请求都不发)。 - host.config.ts:仅当最终 serviceUrl 与当前页面同源时,才回写 __APP_CONFIG__.serviceHost;dev 的绝对地址(跨源)不回写,保持 '/api/appearance' 同源相对,交由 vite 代理转发,避免被整段跳过。 - prod:serviceUrl = 同域 ctx(https://base.../userclass),回写后 appearance 命中 https://base.../userclass/api/appearance。 - vite.config.ts:/api 代理支持 YH_API_PROXY_TARGET 指向真实后端 (target 带 /userclass 前缀即可,无需 rewrite)。
- 构建:Vue CLI 4 → Vite 5,入口迁至根 index.html(含 env-config + 主题通道 loader) - 技术栈:Vue 2.6 → Vue 3.4,view-design → view-ui-plus 1.3.24,vue-router 3 → 4(hash) - 壳层重写:App.vue / components/layout.vue 对齐 Notice 骨架(logo-badge、icon-* 通道图标、resolveMenuPage、crumb-home 基线) - 机械转换:具名 slot → template #x、.sync → v-model:、@click.native、$set、beforeDestroy、/deep/ → :deep() - render:h('Button')/h('Input') → 真组件 + 扁平 props/onClick - 组件适配:vuedraggable 4 的 #item 插槽;vue-treeselect → @zanmato/vue3-treeselect;Page 分页改 v-model + pageSize 显式回写 - 清理:删除 Vue2 死代码(layout_old/bak/child、App.Net、codeModal、未引用组件) - 修复:深链接首次加载被重定向到首个模块(router.isReady) 验证:vite build 通过;headless CDP 全 15 路由无异常;教师列表 2 行渲染、操作列按钮点击弹窗正常。