[{"data":1,"prerenderedAt":1087,"buildId":1088},["ShallowReactive",2],{"-docs-getting-started-migration-description":3,"docs--docs-getting-started-migration":16,"docs-navigation-zh-CN":880,"mdc-d0lvp9-key":1068,"surround--docs-getting-started-migration":1084},{"data":4,"body":5},{},{"type":6,"children":7},"root",[8],{"type":9,"tag":10,"props":11,"children":12},"element","p",{},[13],{"type":14,"value":15},"text","从 v1 升级到 v2 时需要处理的破坏性变更。",{"id":17,"title":18,"body":19,"category":871,"description":15,"difficulty":871,"extension":872,"index":873,"keywords":871,"links":871,"meta":874,"navigation":871,"path":875,"requires":871,"seo":876,"sitemap":877,"stem":878,"__hash__":879},"docs\u002Fdocs\u002F1.getting-started\u002F6.migration.md","迁移到 v2",{"type":20,"value":21,"toc":861},"minimark",[22,26,29,32,84,88,101,114,117,304,325,329,340,374,392,610,617,620,675,680,687,690,813,816,819,857],[23,24,25],"h2",{"id":25},"概述",[10,27,28],{},"v2 重新聚焦 Schema 驱动的中后台能力（AutoForm、SearchForm、DataTable、API），移除了与 Nuxt UI 重叠或复用价值较低的组件。下文汇总升级时需要核对的行为变化与替代方案。",[23,30,31],{"id":31},"升级步骤",[33,34,35,49,64,78],"ol",{},[36,37,38,42,43,48],"li",{},[39,40,41],"strong",{},"确认运行环境","。核对版本要求，再更新依赖和锁文件。见 ",[44,45,47],"a",{"href":46},"#%E7%8E%AF%E5%A2%83%E4%B8%8E-api","环境与 API","。",[36,50,51,54,55,59,60,48],{},[39,52,53],{},"替换已移除的用法","。检查 ",[44,56,58],{"href":57},"#%E7%A7%BB%E9%99%A4%E7%9A%84%E7%BB%84%E4%BB%B6","组件与类型"," 和 ",[44,61,63],{"href":62},"#%E7%A7%BB%E9%99%A4%E7%9A%84-autoform-%E6%8E%A7%E4%BB%B6%E7%B1%BB%E5%9E%8B","AutoForm 控件",[36,65,66,54,69,73,74,48],{},[39,67,68],{},"核对行为变化",[44,70,72],{"href":71},"#%E8%A1%A8%E5%8D%95%E8%A1%A8%E6%A0%BC%E4%B8%8E%E8%AF%AD%E8%A8%80","表单、表格与语言"," 以及 ",[44,75,77],{"href":76},"\u002Fdocs\u002Fapi#%E4%BB%8E-v1-%E8%BF%81%E7%A7%BB%E5%88%B0-v2","API 迁移表",[36,79,80,83],{},[39,81,82],{},"验证迁移结果","。运行项目的 lint、类型检查、测试和构建，回归项目使用到的流程。",[23,85,87],{"id":86},"用-ai-迁移","用 AI 迁移",[10,89,90,91,95,96,100],{},"在项目根目录打开 AI 编程助手，展开并复制提示词，或让助手读取 ",[44,92,94],{"href":93},"\u002Fraw\u002Fdocs\u002Fgetting-started\u002Fmigration.md","本页的 Markdown 版本","。提示词以 ",[97,98,99],"code",{},"v1.8.3"," 为比较基准，也会检查项目是否需要补做更早的 v1 升级。",[102,103,105],"collapsible",{"name":104},"完整迁移提示词",[106,107,112],"pre",{"className":108,"code":110,"language":14,"meta":111},[109],"language-text","请把当前项目的 @movk\u002Fnuxt 从 v1 迁移到 v2，保留现有业务流程、数据格式和交互。\n\n先读取项目说明、package.json、锁文件、Nuxt 或 Vite 配置、app.config、应用入口和 CI 配置。确认实际的 v1 版本、要安装的 v2 版本、包管理器，以及项目使用 Nuxt 还是 Vue + Vite。用目标版本的源码、类型声明和迁移指南核对下面的清单。若项目早于 v1.8.3，也检查实际版本到 v1.8.3 之间的差异。记录每项命中的文件和预期改动，再修改已用到的功能。\n\n参考资料\n- Movk Nuxt 迁移指南 https:\u002F\u002Fnuxt.mhaibaraai.cn\u002Fdocs\u002Fgetting-started\u002Fmigration\n- 文档索引 https:\u002F\u002Fnuxt.mhaibaraai.cn\u002Fllms.txt\n- API 迁移表 https:\u002F\u002Fnuxt.mhaibaraai.cn\u002Fdocs\u002Fapi#从-v1-迁移到-v2\n- Nuxt Auth Utils 迁移指南 https:\u002F\u002Fnuxt.com\u002Fmodules\u002Fauth-utils#migrate-from-v05\n- Nuxt Site Config v5 变更 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fnuxt-site-config\u002Freleases\u002Ftag\u002Fv5.0.0\n\n迁移清单\n\n1. 环境与依赖\n   - 将开发、CI 和部署环境的 Node.js 对齐到 ^22.22.3 || ^24.15.0 || >=26.0.0。Nuxt 模式要求 Nuxt ^4.6.4，并使用兼容的 Nuxt UI 4（至少 4.13.0）和 Zod 4（至少 4.3.6）。使用项目现有包管理器更新依赖和锁文件。\n   - Vue + Vite 项目检查 @movk\u002Fnuxt\u002Fvite、virtual:movk-plugins 与 CSS 入口。API 集成、上传下载和流式请求依赖 Nuxt。保留唯一的 Tailwind CSS 入口及 @import \"@movk\u002Fnuxt\"。\n   - 若项目单独锁定了 reka-ui，则与目标 Nuxt UI 对齐。若直接依赖 nuxt-site-config、tailwind-variants 或相关模块，检查跨主版本的配置与类型兼容。maska 和 colortranslator 已从模块移除，项目自己的调用仍需相应依赖。\n\n2. 移除的组件、类型与主题\n   - 按项目实际组件前缀搜索模板、导入、组件类型和主题配置。迁移 WithClear、WithCopy、WithPasswordToggle、WithCharacterLimit、WithFloatingLabel、AsPhoneNumberInput 为 Nuxt UI 输入组件组合。\n   - PillGroup 按单选、多选、切换面板的实际用途换成 URadioGroup、UCheckboxGroup、UToggleGroup 或 UTabs。ColorChooser 可用 UColorPicker 和 UPopover 组合。Popconfirm 可用 UPopover 或 useMessageBox().confirm。SlideVerify 需要项目提供实现，保留原有验证流程。\n   - 检查自定义包装组件的 v-model、事件、插槽、可访问性和主题样式。移除旧组件的类型导入和对应主题条目。\n\n3. AutoForm 与 SearchForm\n   - 检查 schema 中的 withClear、withCopy、withPasswordToggle、withCharacterLimit、withFloatingLabel、asPhoneNumberInput、colorChooser、slideVerify、pillGroup。简单场景使用现有控件和 controlProps，需要保留增强交互时通过 defineControl 注册自定义控件并传入 controls。\n   - 将 AutoForm 的 :state 改为 v-model，表单绑定类型使用 z.input，并按 schema 的输出类型检查提交回调。reset() 恢复基线并补齐 schema 默认值，clear() 只保留默认值。两者原地更新状态，AutoForm 的事件带状态快照。编辑表单异步加载记录后，用 setBaseline() 设置重置目标。\n   - 检查条件显示对嵌套对象、布局字段、校验和提交值的影响。meta.if 隐藏的字段不参与校验，hiddenValue 控制是否清除模型里的值，字段级策略优先。核对依赖隐藏字段的校验和提交逻辑。\n   - SearchForm 的受控展开使用 v-model:expanded，初始展开可用 defaultExpanded。默认提交会修剪字符串、移除空字符串、null 和 undefined，保留 0 与 false。需要原值时用 :transform-payload=\"false\"，或传自定义函数。检查 reset\u002Fclear 事件中完整的 schema 字段及清空后的 undefined，尤其是用对象合并更新筛选条件的代码。SearchForm 仅渲染支持的叶子字段，跳过对象、数组字段和布局容器。\n   - 项目需要时再采用异步选项 asyncItems、数组项移动和复制、toggle \u002F toggleGroup、isDirty \u002F dirtyFields。启用 syncQuery 时，在 Nuxt 或 Vue Router 下检查首次恢复、前进与后退、query-restore 后刷新列表，以及替换或追加历史的行为。\n\n4. DataTable 与 Tree\n   - 将表格操作确认的 confirmText \u002F cancelText \u002F confirmButtonProps \u002F cancelButtonProps 改为 confirmLabel \u002F cancelLabel \u002F confirmButton \u002F cancelButton。把 paginationUi.text 改为完整模板，键为 empty、total、range、rangeUnknown、selected、pageSize，核对分页文档中的占位符。\n   - 回归客户端与服务端分页、树形展开、选中行和无限滚动。使用 key 数组的选中、展开、列显隐状态时，检查对应 v-model 的绑定与初始值。检查空表格加载时的骨架屏，skeletonRows: 0 可使用 UTable 默认加载样式，已定义的 loading 插槽优先。\n   - 按需采用 columnSettings、persistKey 和 CSV 导出。exportCsv 只处理传给表格的数据，服务端分页需要全量导出时使用 exportServerCsv 和 serverCsvExport，并传入页面的外部筛选条件。\n   - Tree 回归父子级联、禁用节点、搜索前后选中与展开状态、懒加载失败重试。按需使用 leaf 策略、searchMethod \u002F searchDebounce、reload()、getNode()、loadError 和 searchError。\n\n5. 语言、日期与主题\n   - AutoForm、SearchForm、DataTable、Tree、DatePicker 和 MessageBox 的默认文案跟随 UApp locale，缺省回退英文。要保留中文则设置 \u003CUApp :locale=\"zh_cn\">。自定义文案可用 extendMovkLocale，组件已有的文案 props 也可继续使用。\n   - movk.zod 的校验文案本地化按需开启。locale: 'auto' 在客户端跟随 UApp，服务端用 fallback。movk:zod:config 的 customError 仅作用于当前应用的 AutoForm 和 SearchForm。Vue + Vite 通过插件选项 zod.customError 配置。检查直接调用 Zod 的校验以及自定义错误映射。\n   - useDateFormatter 未传 locale 时跟随 UApp，组件外回退 en。确认 toDate 对带时间值保留时分秒，convertData 保留原生 Date 和类实例。DatePicker 使用 v-model:open 控制弹层，popoverProps.defaultOpen 仅用于初始化非受控状态。检查 open() \u002F close()、负时区、月和年模式的显示，以及表单字段尺寸和禁用态。\n   - 检查自定义主题前缀、中性色板及 SSR 首屏颜色。自定义组件前缀的项目同时验证 useMessageBox 的命令式调用。\n\n6. API、认证与文件传输（Nuxt）\n   - 搜索 $api（含 .use、.raw 和 .stream）、useApiFetch 及其变体、上传下载、chat transport 和 movk:api:* 钩子。将 skipBusinessCheck \u002F skipUnwrap 改为语义取反的 businessCheck \u002F unwrap，未设置的选项继续继承端点和全局配置。把 $api 的这些选项和 toast 从 context 移到请求选项顶层。\n   - 业务码检查与 dataKey 解包独立。直接返回裸数组或裸对象的端点，在 endpoints.\u003Cname>.response 中同时设置 businessCheck: false 和 unwrap: false。按请求覆盖端点默认值。自定义 onRequest \u002F onResponse 会在内置钩子之后执行，依赖原始响应的调用应显式设置 unwrap: false。\n   - 用 ApiError.data?.kind 判断 business、http、network、timeout、aborted，按需读取 data.code 和 data.response。更新原先使用 FetchError、isBusinessError、error.response 或把 error.data 当成响应体的代码。movk:api:error 改为 (context, error)，在重试结束后最多上报一次，主动中止不触发错误上报。检查 401、Toast、重试和 SSR 认证。\n   - 上传 timeoutMs 改为 timeout。上传下载继承端点的 publicHeaders 和请求钩子，注入的认证头优先于普通 headers。仅关闭业务校验时仍会解包。检查下载缺少 Content-Length 时的进度、JSON 错误响应及中止行为。SSE 和 chat transport 按流读取，JSON 错误仍按端点策略处理。\n   - 若使用 nuxt-auth-utils 会话，从 v0.5 升到 v0.6 时，按上游指南迁移会话配置、服务端 helpers 和部署环境。生产环境需设置 NUXT_APP_SECRET，移除旧的 NUXT_SESSION_PASSWORD 和 runtimeConfig.session.password，并安排用户重新登录。报告部署所需的变量名，保留密钥值在部署环境中。\n\n7. 文档和 AI 集成\n   - 更新项目引用的 Movk Nuxt 文档链接。旧 composables 页按能力合并，SearchForm 归入 AutoForm，上传下载和流式请求归入 API，MCP、llms.txt 和 Skills 归入 AI 集成页。\n\n改完后运行项目已有的 lint、类型检查、测试和构建，回归本次命中的表单提交、分页、认证或文件传输等流程。汇报修改的文件、核对结果、还需人工处理的部署项，以及无法验证的项目。\n","",[97,113,110],{"__ignoreMap":111},[23,115,116],{"id":116},"移除的组件",[118,119,120,133],"table",{},[121,122,123],"thead",{},[124,125,126,130],"tr",{},[127,128,129],"th",{},"组件",[127,131,132],{},"替代方案",[134,135,136,156,171,186,201,216,231,260,276,286],"tbody",{},[124,137,138,144],{},[139,140,141],"td",{},[97,142,143],{},"MWithClear",[139,145,146,149,150],{},[97,147,148],{},"UInput"," 组合写法，见 ",[44,151,155],{"href":152,"rel":153},"https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents\u002Finput#with-clear-button",[154],"nofollow","Nuxt UI Input 示例",[124,157,158,163],{},[139,159,160],{},[97,161,162],{},"MWithCopy",[139,164,165,149,167],{},[97,166,148],{},[44,168,155],{"href":169,"rel":170},"https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents\u002Finput#with-copy-button",[154],[124,172,173,178],{},[139,174,175],{},[97,176,177],{},"MWithPasswordToggle",[139,179,180,149,182],{},[97,181,148],{},[44,183,155],{"href":184,"rel":185},"https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents\u002Finput#with-password-toggle",[154],[124,187,188,193],{},[139,189,190],{},[97,191,192],{},"MWithCharacterLimit",[139,194,195,149,197],{},[97,196,148],{},[44,198,155],{"href":199,"rel":200},"https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents\u002Finput#with-character-limit",[154],[124,202,203,208],{},[139,204,205],{},[97,206,207],{},"MWithFloatingLabel",[139,209,210,149,212],{},[97,211,148],{},[44,213,155],{"href":214,"rel":215},"https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents\u002Finput#with-floating-label",[154],[124,217,218,223],{},[139,219,220],{},[97,221,222],{},"MAsPhoneNumberInput",[139,224,225,149,227],{},[97,226,148],{},[44,228,155],{"href":229,"rel":230},"https:\u002F\u002Fui.nuxt.com\u002Fdocs\u002Fcomponents\u002Finput#as-a-phone-number-input",[154],[124,232,233,238],{},[139,234,235],{},[97,236,237],{},"MPillGroup",[139,239,240,241,244,245,248,249,252,253,256,257],{},"按用途选择 ",[97,242,243],{},"URadioGroup"," \u002F ",[97,246,247],{},"UCheckboxGroup"," 的 ",[97,250,251],{},"variant=\"card\"","、",[97,254,255],{},"UToggleGroup"," 或 ",[97,258,259],{},"UTabs",[124,261,262,267],{},[139,263,264],{},[97,265,266],{},"MColorChooser",[139,268,269,272,273],{},[97,270,271],{},"UColorPicker"," 放入 ",[97,274,275],{},"UPopover",[124,277,278,283],{},[139,279,280],{},[97,281,282],{},"MSlideVerify",[139,284,285],{},"无内置替代，可自行实现或接入第三方人机验证服务",[124,287,288,293],{},[139,289,290],{},[97,291,292],{},"MPopconfirm",[139,294,295,297,298],{},[97,296,275],{}," 内放置确认按钮，或使用命令式的 ",[44,299,301],{"href":300},"\u002Fdocs\u002Fcomponents\u002Fmessage-box#usemessagebox",[97,302,303],{},"useMessageBox",[10,305,306,307,310,311,314,315,252,318,252,321,324],{},"同时移除了 ",[97,308,309],{},"maska"," 与 ",[97,312,313],{},"colortranslator"," 依赖，以及上述组件对应的 Props \u002F Emits \u002F Slots 类型导出（如 ",[97,316,317],{},"WithClearProps",[97,319,320],{},"PillGroupProps",[97,322,323],{},"ColorChooserProps","）。",[23,326,328],{"id":327},"移除的-autoform-控件类型","移除的 AutoForm 控件类型",[10,330,331,332,335,336,339],{},"以下 ",[97,333,334],{},"type"," 值不再内置，继续使用会渲染 ",[97,337,338],{},"[AutoForm] No control mapped"," 提示：",[341,342,343,363],"ul",{},[36,344,345,252,348,252,351,252,354,252,357,252,360],{},[97,346,347],{},"withClear",[97,349,350],{},"withPasswordToggle",[97,352,353],{},"withCopy",[97,355,356],{},"withCharacterLimit",[97,358,359],{},"withFloatingLabel",[97,361,362],{},"asPhoneNumberInput",[36,364,365,252,368,252,371],{},[97,366,367],{},"colorChooser",[97,369,370],{},"slideVerify",[97,372,373],{},"pillGroup",[10,375,376,377,380,381,384,385,388,389,391],{},"简单场景可通过 ",[97,378,379],{},"controlProps"," 配置现有控件。需要保留增强输入框时，在项目内封装组件，通过 ",[97,382,383],{},"defineControl"," 注册并把 ",[97,386,387],{},"controls"," 传给表单。自定义控件可以沿用原来的 ",[97,390,334],{}," 名称。",[393,394,395,527],"code-group",{},[106,396,401],{"className":397,"code":398,"filename":399,"language":400,"meta":111,"style":111},"language-ts shiki shiki-themes github-light github-light github-dark","const schema = afz.object({\n  \u002F\u002F 之前：afz.string({ type: 'withPasswordToggle' })\n  password: afz.string({ controlProps: { type: 'password' } }),\n  \u002F\u002F 之前：afz.enum([...], { type: 'pillGroup' })\n  category: afz.enum(['全部', '前端', '后端'], {\n    type: 'radioGroup',\n    controlProps: { orientation: 'horizontal' }\n  })\n})\n","使用内置控件","ts",[97,402,403,430,437,456,462,491,503,515,521],{"__ignoreMap":111},[404,405,408,412,416,419,423,427],"span",{"class":406,"line":407},"line",1,[404,409,411],{"class":410},"s8jYJ","const",[404,413,415],{"class":414},"sBjJW"," schema",[404,417,418],{"class":410}," =",[404,420,422],{"class":421},"sxrX7"," afz.",[404,424,426],{"class":425},"snPdu","object",[404,428,429],{"class":421},"({\n",[404,431,433],{"class":406,"line":432},2,[404,434,436],{"class":435},"sCsY4","  \u002F\u002F 之前：afz.string({ type: 'withPasswordToggle' })\n",[404,438,440,443,446,449,453],{"class":406,"line":439},3,[404,441,442],{"class":421},"  password: afz.",[404,444,445],{"class":425},"string",[404,447,448],{"class":421},"({ controlProps: { type: ",[404,450,452],{"class":451},"sIIMD","'password'",[404,454,455],{"class":421}," } }),\n",[404,457,459],{"class":406,"line":458},4,[404,460,461],{"class":435},"  \u002F\u002F 之前：afz.enum([...], { type: 'pillGroup' })\n",[404,463,465,468,471,474,477,480,483,485,488],{"class":406,"line":464},5,[404,466,467],{"class":421},"  category: afz.",[404,469,470],{"class":425},"enum",[404,472,473],{"class":421},"([",[404,475,476],{"class":451},"'全部'",[404,478,479],{"class":421},", ",[404,481,482],{"class":451},"'前端'",[404,484,479],{"class":421},[404,486,487],{"class":451},"'后端'",[404,489,490],{"class":421},"], {\n",[404,492,494,497,500],{"class":406,"line":493},6,[404,495,496],{"class":421},"    type: ",[404,498,499],{"class":451},"'radioGroup'",[404,501,502],{"class":421},",\n",[404,504,506,509,512],{"class":406,"line":505},7,[404,507,508],{"class":421},"    controlProps: { orientation: ",[404,510,511],{"class":451},"'horizontal'",[404,513,514],{"class":421}," }\n",[404,516,518],{"class":406,"line":517},8,[404,519,520],{"class":421},"  })\n",[404,522,524],{"class":406,"line":523},9,[404,525,526],{"class":421},"})\n",[106,528,531],{"className":397,"code":529,"filename":530,"language":400,"meta":111,"style":111},"import PasswordInput from '~\u002Fcomponents\u002FPasswordInput.vue'\n\nconst { afz, controls } = useAutoForm({\n  withPasswordToggle: defineControl({\n    component: PasswordInput,\n    controlProps: { class: 'w-full' }\n  })\n})\n","注册自定义控件",[97,532,533,547,553,578,587,592,602,606],{"__ignoreMap":111},[404,534,535,538,541,544],{"class":406,"line":407},[404,536,537],{"class":410},"import",[404,539,540],{"class":421}," PasswordInput ",[404,542,543],{"class":410},"from",[404,545,546],{"class":451}," '~\u002Fcomponents\u002FPasswordInput.vue'\n",[404,548,549],{"class":406,"line":432},[404,550,552],{"emptyLinePlaceholder":551},true,"\n",[404,554,555,557,560,563,565,567,570,573,576],{"class":406,"line":439},[404,556,411],{"class":410},[404,558,559],{"class":421}," { ",[404,561,562],{"class":414},"afz",[404,564,479],{"class":421},[404,566,387],{"class":414},[404,568,569],{"class":421}," } ",[404,571,572],{"class":410},"=",[404,574,575],{"class":425}," useAutoForm",[404,577,429],{"class":421},[404,579,580,583,585],{"class":406,"line":458},[404,581,582],{"class":421},"  withPasswordToggle: ",[404,584,383],{"class":425},[404,586,429],{"class":421},[404,588,589],{"class":406,"line":464},[404,590,591],{"class":421},"    component: PasswordInput,\n",[404,593,594,597,600],{"class":406,"line":493},[404,595,596],{"class":421},"    controlProps: { class: ",[404,598,599],{"class":451},"'w-full'",[404,601,514],{"class":421},[404,603,604],{"class":406,"line":505},[404,605,520],{"class":421},[404,607,608],{"class":406,"line":517},[404,609,526],{"class":421},[10,611,612,613,48],{},"详见 ",[44,614,616],{"href":615},"\u002Fdocs\u002Fauto-form\u002Fcontrols#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8E%A7%E4%BB%B6","控件与自定义控件",[23,618,47],{"id":619},"环境与-api",[118,621,622,632],{},[121,623,624],{},[124,625,626,629],{},[127,627,628],{},"依赖",[127,630,631],{},"版本要求",[134,633,634,644,654,665],{},[124,635,636,639],{},[139,637,638],{},"Node.js",[139,640,641],{},[97,642,643],{},"^22.22.3 || ^24.15.0 || >=26.0.0",[124,645,646,649],{},[139,647,648],{},"Nuxt（Nuxt 模式）",[139,650,651],{},[97,652,653],{},"^4.6.4",[124,655,656,659],{},[139,657,658],{},"Nuxt UI",[139,660,661,664],{},[97,662,663],{},"4.13.0"," 或更高的兼容 v4 版本",[124,666,667,670],{},[139,668,669],{},"Zod",[139,671,672,664],{},[97,673,674],{},"4.3.6",[676,677,679],"note",{"to":678},"\u002Fdocs\u002Fapi#从-v1-迁移到-v2","Nuxt 模式下的请求选项、错误处理、钩子和传输超时变更，见 API 迁移表。",[10,681,682,683,48],{},"使用纯 Vue 项目时，核对 ",[44,684,686],{"href":685},"\u002Fdocs\u002Fgetting-started\u002Fvue","Vue \u002F Vite 安装与配置",[23,688,72],{"id":689},"表单表格与语言",[341,691,692,710,727,740,777,787],{},[36,693,694,697,698,701,702,705,706,709],{},[39,695,696],{},"AutoForm 绑定","。使用 ",[97,699,700],{},"v-model"," 绑定输入状态，类型用 ",[97,703,704],{},"z.input","。旧的 ",[97,707,708],{},":state"," 仍可用，开发时会提示弃用。",[36,711,712,48,715,718,719,722,723,726],{},[39,713,714],{},"表单重置与清空",[97,716,717],{},"reset()"," 恢复基线并应用 schema 默认值，",[97,720,721],{},"clear()"," 仅保留 schema 默认值。两者原地更新绑定对象并发出状态快照。编辑已有记录时，在加载后用 ",[97,724,725],{},"setBaseline()"," 设置重置目标。",[36,728,729,697,732,735,736,739],{},[39,730,731],{},"SearchForm",[97,733,734],{},"v-model:expanded"," 控制展开。提交默认去除字符串首尾空白和空值，可设 ",[97,737,738],{},":transform-payload=\"false\""," 保留原始数据。",[36,741,742,745,746,252,749,252,752,252,755,758,759,252,762,252,765,252,768,252,771,252,774,48],{},[39,743,744],{},"DataTable","。操作确认改用 ",[97,747,748],{},"confirmLabel",[97,750,751],{},"cancelLabel",[97,753,754],{},"confirmButton",[97,756,757],{},"cancelButton","。分页文案改用完整句子模板，键为 ",[97,760,761],{},"empty",[97,763,764],{},"total",[97,766,767],{},"range",[97,769,770],{},"rangeUnknown",[97,772,773],{},"selected",[97,775,776],{},"pageSize",[36,778,779,782,783,786],{},[39,780,781],{},"语言","。组件文案与 ",[97,784,785],{},"useDateFormatter"," 跟随 UApp 语言，缺省回退英文。需要中文时设定 UApp 语言，或对格式化函数传入 locale。",[36,788,789,48,792,795,796,799,800,803,804,244,807,810,811,48],{},[39,790,791],{},"DatePicker",[97,793,794],{},"v-model:open"," 优先于旧的 ",[97,797,798],{},"popoverProps.open","，",[97,801,802],{},"popoverProps.defaultOpen"," 仅初始化非受控状态。调用 ",[97,805,806],{},"open()",[97,808,809],{},"close()"," 前，把已有受控开关迁移到 ",[97,812,794],{},[23,814,815],{"id":815},"文档路径调整",[10,817,818],{},"文档按能力域重新组织，旧链接会自动重定向：",[341,820,821,840,850],{},[36,822,823,826,827,830,831,834,835,244,837,839],{},[97,824,825],{},"\u002Fdocs\u002Fcomposables\u002F*"," 拆入对应能力域：",[97,828,829],{},"useAutoForm"," → 表单、",[97,832,833],{},"useTheme"," → 主题、",[97,836,303],{},[97,838,785],{}," → 对应组件页、上传下载与流式请求 → API",[36,841,842,843,799,847,849],{},"AutoForm 的字段类型页合并为 ",[44,844,846],{"href":845},"\u002Fdocs\u002Fauto-form\u002Ffield-types","字段类型",[97,848,731],{}," 移入表单章节",[36,851,852,853],{},"AI 集成三页合并为 ",[44,854,856],{"href":855},"\u002Fdocs\u002Fgetting-started\u002Fai","AI 集成",[858,859,860],"style",{},"html pre.shiki code .s8jYJ, html code.shiki .s8jYJ{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sBjJW, html code.shiki .sBjJW{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":111,"searchDepth":432,"depth":432,"links":862},[863,864,865,866,867,868,869,870],{"id":25,"depth":432,"text":25},{"id":31,"depth":432,"text":31},{"id":86,"depth":432,"text":87},{"id":116,"depth":432,"text":116},{"id":327,"depth":432,"text":328},{"id":619,"depth":432,"text":47},{"id":689,"depth":432,"text":72},{"id":815,"depth":432,"text":815},null,"md",false,{},"\u002Fdocs\u002Fgetting-started\u002Fmigration",{"title":18,"description":15},{"loc":875},"docs\u002F1.getting-started\u002F6.migration","FuNvBz-jloPqDYOmyAn7gxGuzkPwVbHrl9KZDsZFVZI",[881],{"title":882,"path":883,"stem":884,"children":885,"page":873},"Docs","\u002Fdocs","docs",[886,918,969,1006,1045],{"title":887,"path":888,"stem":889,"children":890,"category":871,"description":871,"icon":917},"快速开始","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started\u002F1.index",[891,894,899,904,908,913,914],{"title":892,"path":888,"stem":889,"category":871,"description":893},"介绍","了解 Movk Nuxt 的表单、数据表格、组件和 API 集成，并选择适合 Nuxt 或 Vue + Vite 项目的接入方式。",{"title":895,"path":896,"stem":897,"category":871,"description":898},"安装","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F1.getting-started\u002F2.installation","在 Nuxt 4 项目中安装和配置 Movk Nuxt 模块。",{"title":900,"path":901,"stem":902,"category":871,"description":903},"模块配置","\u002Fdocs\u002Fgetting-started\u002Fconfiguration","docs\u002F1.getting-started\u002F3.configuration","配置组件前缀、主题颜色、字体、API 端点、认证策略、响应解析规则和 Toast 提示行为。",{"title":905,"path":685,"stem":906,"category":871,"description":907},"Vue \u002F Vite","docs\u002F1.getting-started\u002F4.vue","在纯 Vue + Vite 项目中使用 Movk 的独立组件、主题与 Composables，无需 Nuxt。",{"title":909,"path":910,"stem":911,"category":871,"description":912},"主题系统","\u002Fdocs\u002Fgetting-started\u002Ftheme","docs\u002F1.getting-started\u002F5.theme","通过模块默认值、ThemePicker 组件和 useTheme composable 管理颜色、圆角、图标集与深色模式，字体则在构建期配置。",{"title":18,"path":875,"stem":878,"category":871,"description":15},{"title":856,"path":855,"stem":915,"category":871,"description":916},"docs\u002F1.getting-started\u002F7.ai","通过 MCP、llms.txt 与 Skills 让 AI 助手理解 Movk Nuxt。","i-lucide-square-play",{"title":919,"category":871,"description":871,"icon":920,"path":921,"stem":922,"children":923,"page":873},"表单","i-lucide-square-pen","\u002Fdocs\u002Fauto-form","docs\u002F2.auto-form",[924,928,933,936,941,946,951,956,961,965],{"title":887,"path":925,"stem":926,"category":871,"description":927},"\u002Fdocs\u002Fauto-form\u002Fquickstart","docs\u002F2.auto-form\u002F1.quickstart","了解 AutoForm 的核心设计理念和基本使用方式。",{"title":929,"path":930,"stem":931,"category":871,"description":932},"实战示例","\u002Fdocs\u002Fauto-form\u002Frecipes","docs\u002F2.auto-form\u002F10.recipes","登录、注册分组校验、多文件上传与横向搜索表单等 AutoForm 组合场景。",{"title":846,"path":845,"stem":934,"category":871,"description":935},"docs\u002F2.auto-form\u002F2.field-types","afz 各字段类型到控件的映射与配置。",{"title":937,"path":938,"stem":939,"category":871,"description":940},"对象与数组","\u002Fdocs\u002Fauto-form\u002Fobject-array","docs\u002F2.auto-form\u002F3.object-array","嵌套对象与动态数组字段的渲染与增删。",{"title":942,"path":943,"stem":944,"category":871,"description":945},"控件","\u002Fdocs\u002Fauto-form\u002Fcontrols","docs\u002F2.auto-form\u002F4.controls","通过 type 字段将 schema 映射到 Nuxt UI 控件，或注册、直接传入自定义 Vue 组件扩展表单字段。",{"title":947,"path":948,"stem":949,"category":871,"description":950},"元数据与布局","\u002Fdocs\u002Fauto-form\u002Fmetadata-layout","docs\u002F2.auto-form\u002F5.metadata-layout","通过 meta 配置字段属性，并用 afz.layout 组织布局。",{"title":952,"path":953,"stem":954,"category":871,"description":955},"插槽","\u002Fdocs\u002Fauto-form\u002Fslots","docs\u002F2.auto-form\u002F6.slots","通过具名插槽自定义 AutoForm 的头尾、字段控件、字段前后与布局内容。",{"title":957,"path":958,"stem":959,"category":871,"description":960},"联动与提交","\u002Fdocs\u002Fauto-form\u002Freactive-submit","docs\u002F2.auto-form\u002F7.reactive-submit","字段间响应式联动与表单提交处理。",{"title":731,"path":962,"stem":963,"category":871,"description":964},"\u002Fdocs\u002Fauto-form\u002Fsearch-form","docs\u002F2.auto-form\u002F8.search-form","Schema 驱动的可折叠搜索表单组件。",{"title":829,"path":966,"stem":967,"category":871,"description":968},"\u002Fdocs\u002Fauto-form\u002Fuse-auto-form","docs\u002F2.auto-form\u002F9.use-auto-form","用于创建类型化 Zod Schema 和管理 AutoForm 控件的 composable。",{"title":744,"path":970,"stem":971,"children":972,"category":871,"description":871,"icon":1005},"\u002Fdocs\u002Fdata-table","docs\u002F3.data-table\u002F1.index",[973,975,980,985,990,995,1000],{"title":892,"path":970,"stem":971,"category":871,"description":974},"基于 TanStack Table 的声明式数据表格，含列配置、选择、展开、树形、分页、加载更多与完整 API 参考。",{"title":976,"path":977,"stem":978,"category":871,"description":979},"外观","\u002Fdocs\u002Fdata-table\u002Fappearance","docs\u002F3.data-table\u002F2.appearance","组件样式覆盖、分页样式覆盖、斑马纹与边框、视觉密度、内容自适应、空值占位与粘性表头。",{"title":981,"path":982,"stem":983,"category":871,"description":984},"列配置","\u002Fdocs\u002Fdata-table\u002Fcolumns","docs\u002F3.data-table\u002F3.columns","数据列的固定、排序、列固定切换、列宽拖拽、文本截断、Tooltip、可见性与函数式配置。",{"title":986,"path":987,"stem":988,"category":871,"description":989},"特殊列","\u002Fdocs\u002Fdata-table\u002Fspecial-columns","docs\u002F3.data-table\u002F4.special-columns","选择列、索引列、行固定列与操作列的配置，含树形选择策略、动态按钮与二次确认。",{"title":991,"path":992,"stem":993,"category":871,"description":994},"行为与交互","\u002Fdocs\u002Fdata-table\u002Frows","docs\u002F3.data-table\u002F5.rows","行选择、展开详情、点击行为、动态行样式、悬停、右键菜单与编程式控制。",{"title":996,"path":997,"stem":998,"category":871,"description":999},"树形数据","\u002Fdocs\u002Fdata-table\u002Ftree","docs\u002F3.data-table\u002F6.tree","通过 childrenKey 启用树形表格，配置展开、级联选择策略、缩进与选中结果读取。",{"title":1001,"path":1002,"stem":1003,"category":871,"description":1004},"分页与加载更多","\u002Fdocs\u002Fdata-table\u002Fpagination","docs\u002F3.data-table\u002F7.pagination","客户端自动分页、服务端手动分页与加载状态，以及触底加载、无限滚动的实用参数。","i-lucide-table",{"title":1007,"path":1008,"stem":1009,"children":1010,"category":871,"description":871,"icon":1044},"API","\u002Fdocs\u002Fapi","docs\u002F4.api\u002F1.index",[1011,1014,1019,1024,1029,1034,1039],{"title":1012,"path":1008,"stem":1009,"category":871,"description":1013},"概览","Nuxt 数据获取基础与 Movk Nuxt API 系统的核心概念和架构设计。",{"title":1015,"path":1016,"stem":1017,"category":871,"description":1018},"$api","\u002Fdocs\u002Fapi\u002Fapi-plugin","docs\u002F4.api\u002F2.api-plugin","由 api.factory 插件创建的增强型 $fetch 实例，支持认证注入、数据解包、业务检查和多端点切换。",{"title":1020,"path":1021,"stem":1022,"category":871,"description":1023},"hooks","\u002Fdocs\u002Fapi\u002Fhooks","docs\u002F4.api\u002F3.hooks","通过 Nuxt 运行时 Hook 扩展 API 系统行为，实现全局请求拦截、错误处理和 401 自定义处理。",{"title":1025,"path":1026,"stem":1027,"category":871,"description":1028},"useApiFetch","\u002Fdocs\u002Fapi\u002Fuse-api-fetch","docs\u002F4.api\u002F4.use-api-fetch","基于 Nuxt useFetch 封装的 API 请求 composable，提供自动认证、业务状态码检查和 Toast 提示。",{"title":1030,"path":1031,"stem":1032,"category":871,"description":1033},"上传与下载","\u002Fdocs\u002Fapi\u002Fupload-download","docs\u002F4.api\u002F5.upload-download","带进度监控的文件上传与下载。",{"title":1035,"path":1036,"stem":1037,"category":871,"description":1038},"流式请求","\u002Fdocs\u002Fapi\u002Fstream","docs\u002F4.api\u002F6.stream","SSE 流式请求与 AI SDK Chat Transport。",{"title":1040,"path":1041,"stem":1042,"category":871,"description":1043},"API 架构设计","\u002Fdocs\u002Fapi\u002Farchitecture","docs\u002F4.api\u002F7.architecture","厘清 @movk\u002Fnuxt 的职责边界，用最小化分层组织直连后端、同源代理与最小化 BFF，并梳理两类 Auth 的完整闭环。","i-lucide-cloud",{"title":1046,"category":871,"description":871,"icon":1047,"path":1048,"stem":1049,"children":1050,"page":873},"Components","i-lucide-box","\u002Fdocs\u002Fcomponents","docs\u002F5.components",[1051,1056,1062],{"title":791,"path":1052,"stem":1053,"category":1054,"description":1055},"\u002Fdocs\u002Fcomponents\u002Fdate-picker","docs\u002F5.components\u002Fdate-picker","advanced","基于国际化标准的日期选择器组件。",{"title":1057,"path":1058,"stem":1059,"category":1060,"description":1061},"MessageBox","\u002Fdocs\u002Fcomponents\u002Fmessage-box","docs\u002F5.components\u002Fmessage-box","feedback","模态消息对话框，提供声明式与编程式两种调用方式。",{"title":1063,"path":1064,"stem":1065,"category":1054,"description":1066,"badge":1067},"Tree","\u002Fdocs\u002Fcomponents\u002Ftree","docs\u002F5.components\u002Ftree","基于 Nuxt UI Tree 的树形组件，补齐搜索、懒加载、工具栏、复选框与父子策略。","v1.4.2",{"data":1069,"body":1070},{},{"type":6,"children":1071},[1072],{"type":9,"tag":10,"props":1073,"children":1074},{},[1075,1077],{"type":14,"value":1076},"Copyright © 2025 - 2026 YiXuan - ",{"type":9,"tag":404,"props":1078,"children":1081},{"className":1079},[1080],"text-highlighted",[1082],{"type":14,"value":1083},"MIT License",[1085,1086],{"title":909,"path":910,"stem":911,"description":912,"children":-1},{"title":856,"path":855,"stem":915,"description":916,"children":-1},1795763776099,"237a5cff-9aba-4421-be98-81a239f14b62"]