CINXE.COM

404 | Mpx 框架

<!DOCTYPE html> <html lang="en-US" dir="ltr"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>404 | Mpx 框架</title> <meta name="description" content="Not Found"> <meta name="generator" content="VitePress v1.6.3"> <link rel="preload stylesheet" href="/assets/style.D9lwO_cj.css" as="style"> <link rel="preload stylesheet" href="/vp-icons.css" as="style"> <script type="module" src="/assets/app.-jTyqA5_.js"></script> <link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="icon" href="/favicon.ico"> <link rel="manifest" href="/manifest.webmanifest"> <script type="text/javascript">(function(e,r,t,i,a,n,s){e[t]=e[t]||function(){(e[t].q=e[t].q||[]).push(arguments)},n=r.createElement(i),n.async=1,n.src="https://www.clarity.ms/tag/"+a,s=r.getElementsByTagName(i)[0],s.parentNode.insertBefore(n,s)})(window,document,"clarity","script","jtvvy52wxy");</script> <meta name="author" content="Mpx 框架"> <meta property="og:type" content="website"> <meta name="og:title" content="Mpx 框架"> <meta name="og:description" content="深度性能优化的增强型小程序开发框架"> <meta property="og:image" content="https://mpxjs.cn/logo.png"> <meta property="og:url" content="https://mpxjs.cn/"> <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script> <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script> <link rel="manifest" href="/manifest.webmanifest"> </head> <body> <div id="app"></div> <script>window.__VP_HASH_MAP__=JSON.parse("{\"api_app-config.md\":\"8yUvMnrA\",\"api_builtin.md\":\"zC7lHwxi\",\"api_compile.md\":\"5MYyG7PG\",\"api_composition-api.md\":\"Clk-dbRQ\",\"api_directives.md\":\"Iz0_eRUW\",\"api_extend.md\":\"COshM7be\",\"api_global-api.md\":\"DekFw7fO\",\"api_index.md\":\"DWA54RPB\",\"api_instance-api.md\":\"D7wqBPPP\",\"api_optional-api.md\":\"C9RjUBcS\",\"api_reactivity-api.md\":\"Br0_H2qt\",\"api_store-api.md\":\"D58j1Loq\",\"articles_1.0.md\":\"CX3uMEvE\",\"articles_2.0.md\":\"BiE2-Btj\",\"articles_2.7-release.md\":\"CtxTlBaz\",\"articles_2.8-release-alter.md\":\"O870wUeV\",\"articles_2.8-release.md\":\"DUJxybJv\",\"articles_2.9-release-alter.md\":\"B0zILKuf\",\"articles_2.9-release.md\":\"-fAvpoEu\",\"articles_index.md\":\"PgSaR_s8\",\"articles_mpx-cli-next.md\":\"DLApcxVv\",\"articles_mpx-cube-ui.md\":\"DPiau_2k\",\"articles_mpx1.md\":\"CPF70K1U\",\"articles_mpx2.md\":\"ChNa77kM\",\"articles_performance.md\":\"BF8yiIIl\",\"articles_size-control.md\":\"DH0nqEH7\",\"articles_ts-derivation.md\":\"Y2VtWgAq\",\"articles_unit-test.md\":\"D45q9SRT\",\"desc.md\":\"CRM-d_8c\",\"guide_advance_ability-compatible.md\":\"DUUqlGU1\",\"guide_advance_async-subpackage.md\":\"YdRmCpxD\",\"guide_advance_build-config.md\":\"CK_KSb3r\",\"guide_advance_custom-output-path.md\":\"CcDbiRF1\",\"guide_advance_dll-plugin.md\":\"CtchVSg7\",\"guide_advance_i18n.md\":\"D7eAH4JX\",\"guide_advance_image-process.md\":\"R7ATnHM_\",\"guide_advance_mixin.md\":\"BA5vitiz\",\"guide_advance_npm.md\":\"Cel872y9\",\"guide_advance_pinia.md\":\"D3A9y0Gw\",\"guide_advance_platform.md\":\"C-a6y7Wp\",\"guide_advance_plugin.md\":\"EgOm6-ei\",\"guide_advance_progressive.md\":\"DJ7EwCPw\",\"guide_advance_provide-inject.md\":\"FHPTn5Pf\",\"guide_advance_resource-resolve.md\":\"CQ0_dCIQ\",\"guide_advance_size-report.md\":\"DsRaf5lZ\",\"guide_advance_ssr.md\":\"Dighccx3\",\"guide_advance_store.md\":\"RxkbMHcD\",\"guide_advance_subpackage.md\":\"BO3rQ_SJ\",\"guide_advance_utility-first-css.md\":\"DRTXuxCL\",\"guide_basic_class-style-binding.md\":\"CHjIhjm9\",\"guide_basic_component.md\":\"BVlz4Z0G\",\"guide_basic_conditional-render.md\":\"CqWMRF4_\",\"guide_basic_css.md\":\"CMhUuiRO\",\"guide_basic_event.md\":\"CJro7QhD\",\"guide_basic_ide.md\":\"J6p9ySwr\",\"guide_basic_intro.md\":\"BQ5nSHat\",\"guide_basic_list-render.md\":\"DJ0nmxdg\",\"guide_basic_option-chain.md\":\"1crAkqm-\",\"guide_basic_reactive.md\":\"ZEZ7uVds\",\"guide_basic_refs.md\":\"BlYk9tcG\",\"guide_basic_single-file.md\":\"pOorh032\",\"guide_basic_start.md\":\"DsaWQHXU\",\"guide_basic_template.md\":\"Bcxqv41D\",\"guide_basic_two-way-binding.md\":\"B_KA2k94\",\"guide_composition-api_composition-api.md\":\"Bh8pACFE\",\"guide_composition-api_reactive-api.md\":\"WOHtEb5G\",\"guide_extend_api-proxy.md\":\"CKVZi01O\",\"guide_extend_fetch.md\":\"DoVBrdcs\",\"guide_extend_index.md\":\"B-AnIYDs\",\"guide_extend_mock.md\":\"CfZHEPBA\",\"guide_migrate_2.7.md\":\"BRNs6PtI\",\"guide_migrate_2.8.md\":\"DUgpXI5-\",\"guide_migrate_2.9.md\":\"DZXr1Vtv\",\"guide_migrate_mpx-cli-3.md\":\"BlX0YUtQ\",\"guide_platform_basic.md\":\"WikgVNAd\",\"guide_platform_miniprogram.md\":\"X8yJCeEN\",\"guide_platform_rn.md\":\"Cw4g6zSW\",\"guide_platform_web.md\":\"CcHiVFzp\",\"guide_tool_e2e-test.md\":\"EMUVz3nW\",\"guide_tool_ts.md\":\"CH10H8U-\",\"guide_tool_unit-test.md\":\"BNWMp2Lt\",\"guide_understand_compile.md\":\"DS5TaIwp\",\"guide_understand_runtime.md\":\"Cc3uol1G\",\"index.md\":\"De5Lhfdz\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Mpx 框架\",\"description\":\"A VitePress site\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"search\":{\"provider\":\"local\",\"options\":{\"translations\":{\"button\":{\"buttonText\":\"搜索文档\",\"buttonAriaLabel\":\"搜索文档\"},\"modal\":{\"displayDetails\":\"显示详细列表\",\"resetButtonTitle\":\"重置搜索\",\"backButtonTitle\":\"关闭搜索\",\"noResultsText\":\"没有结果\",\"footer\":{\"selectText\":\"选择\",\"selectKeyAriaLabel\":\"输入\",\"navigateText\":\"导航\",\"navigateUpKeyAriaLabel\":\"上箭头\",\"navigateDownKeyAriaLabel\":\"下箭头\",\"closeText\":\"关闭\",\"closeKeyAriaLabel\":\"esc\"}}}}},\"logo\":\"/favicon.ico\",\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/didi/mpx\"}],\"nav\":[{\"text\":\"指南\",\"activeMatch\":\"^/guide/\",\"link\":\"/guide/basic/start\"},{\"text\":\"API\",\"activeMatch\":\"^/api/\",\"link\":\"/api/\"},{\"text\":\"文章\",\"activeMatch\":\"^/articles/\",\"link\":\"/articles/\"},{\"text\":\"更新记录\",\"activeMatch\":\"^/releases/\",\"link\":\"https://github.com/didi/mpx/releases\",\"target\":\"_blank\"}],\"outline\":{\"level\":[2,3],\"label\":\"本页目录\"},\"sidebar\":{\"/guide/\":[{\"text\":\"基础\",\"collapsable\":false,\"items\":[{\"text\":\"快速开始\",\"link\":\"/guide/basic/start\"},{\"text\":\"介绍\",\"link\":\"/guide/basic/intro\"},{\"text\":\"单文件开发\",\"link\":\"/guide/basic/single-file\"},{\"text\":\"IDE 高亮配置\",\"link\":\"/guide/basic/ide\"},{\"text\":\"模板语法\",\"link\":\"/guide/basic/template\"},{\"text\":\"CSS 处理\",\"link\":\"/guide/basic/css\"},{\"text\":\"数据响应\",\"link\":\"/guide/basic/reactive\"},{\"text\":\"类名样式绑定\",\"link\":\"/guide/basic/class-style-binding\"},{\"text\":\"条件渲染\",\"link\":\"/guide/basic/conditional-render\"},{\"text\":\"列表渲染\",\"link\":\"/guide/basic/list-render\"},{\"text\":\"事件处理\",\"link\":\"/guide/basic/event\"},{\"text\":\"双向绑定\",\"link\":\"/guide/basic/two-way-binding\"},{\"text\":\"自定义组件\",\"link\":\"/guide/basic/component\"},{\"text\":\"获取组件实例/节点信息\",\"link\":\"/guide/basic/refs\"},{\"text\":\"模版内可选链表达式\",\"link\":\"/guide/basic/option-chain\"}]},{\"text\":\"进阶\",\"collapsable\":false,\"items\":[{\"text\":\"状态管理(store)\",\"link\":\"/guide/advance/store\"},{\"text\":\"状态管理(pinia)\",\"link\":\"/guide/advance/pinia\"},{\"text\":\"使用 mixin\",\"link\":\"/guide/advance/mixin\"},{\"text\":\"使用 npm\",\"link\":\"/guide/advance/npm\"},{\"text\":\"使用分包\",\"link\":\"/guide/advance/subpackage\"},{\"text\":\"分包异步化\",\"link\":\"/guide/advance/async-subpackage\"},{\"text\":\"跨平台\",\"link\":\"/guide/advance/platform\"},{\"text\":\"国际化 i18n\",\"link\":\"/guide/advance/i18n\"},{\"text\":\"包体积分析\",\"link\":\"/guide/advance/size-report\"},{\"text\":\"图像资源处理\",\"link\":\"/guide/advance/image-process\"},{\"text\":\"原生渐进迁移\",\"link\":\"/guide/advance/progressive\"},{\"text\":\"原生能力兼容\",\"link\":\"/guide/advance/ability-compatible\"},{\"text\":\"小程序插件\",\"link\":\"/guide/advance/plugin\"},{\"text\":\"自定义路径\",\"link\":\"/guide/advance/custom-output-path\"},{\"text\":\"使用原子类\",\"link\":\"/guide/advance/utility-first-css\"},{\"text\":\"SSR\",\"link\":\"/guide/advance/ssr\"},{\"text\":\"依赖注入(Provide/Inject)\",\"link\":\"/guide/advance/provide-inject\"},{\"text\":\"编译配置\",\"link\":\"/guide/advance/build-config\"}]},{\"text\":\"跨端\",\"collapsable\":false,\"items\":[{\"text\":\"跨端输出基础\",\"link\":\"/guide/platform/basic\"},{\"text\":\"跨端输出 RN\",\"link\":\"/guide/platform/rn\"}]},{\"text\":\"组合式 API\",\"collapsable\":false,\"items\":[{\"text\":\"组合式 API\",\"link\":\"/guide/composition-api/composition-api\"},{\"text\":\"响应式 API\",\"link\":\"/guide/composition-api/reactive-api\"}]},{\"text\":\"工具\",\"collapsable\":false,\"items\":[{\"text\":\"使用TypeScript开发小程序\",\"link\":\"/guide/tool/ts\"},{\"text\":\"单元测试\",\"link\":\"/guide/tool/unit-test\"},{\"text\":\"E2E自动化测试\",\"link\":\"/guide/tool/e2e-test\"}]},{\"text\":\"拓展\",\"collapsable\":false,\"items\":[{\"text\":\"网络请求\",\"link\":\"/guide/extend/fetch\"},{\"text\":\"API 转换\",\"link\":\"/guide/extend/api-proxy\"},{\"text\":\"数据 Mock\",\"link\":\"/guide/extend/mock\"}]},{\"text\":\"理解\",\"collapsable\":false,\"items\":[{\"text\":\"Mpx运行时增强原理\",\"link\":\"/guide/understand/runtime\"},{\"text\":\"Mpx编译构建原理\",\"link\":\"/guide/understand/compile\"}]},{\"text\":\"迁移\",\"collapsable\":false,\"items\":[{\"text\":\"从 2.8 升级至 2.9\",\"link\":\"/guide/migrate/2.9\"},{\"text\":\"从 2.7 升级至 2.8\",\"link\":\"/guide/migrate/2.8\"},{\"text\":\"从旧版本迁移至 2.7\",\"link\":\"/guide/migrate/2.7\"},{\"text\":\"mpx-cli v2 迁移到 v3\",\"link\":\"/guide/migrate/mpx-cli-3\"}]}],\"/api/\":[{\"text\":\"API\",\"collapsable\":false,\"items\":[{\"text\":\"API 参考\",\"link\":\"/api/\"},{\"text\":\"全局配置\",\"link\":\"/api/app-config\"},{\"text\":\"全局 API\",\"link\":\"/api/global-api\"},{\"text\":\"实例 API\",\"link\":\"/api/instance-api\"},{\"text\":\"Store API\",\"link\":\"/api/store-api\"},{\"text\":\"模板指令\",\"link\":\"/api/directives\"},{\"text\":\"编译构建\",\"link\":\"/api/compile\"},{\"text\":\"内建组件\",\"link\":\"/api/builtIn\"},{\"text\":\"响应式 API\",\"link\":\"/api/reactivity-api\"},{\"text\":\"组合式 API\",\"link\":\"/api/composition-api\"},{\"text\":\"选项式 API\",\"link\":\"/api/optional-api\"},{\"text\":\"周边拓展\",\"link\":\"/api/extend\"}]}],\"/articles/\":[{\"text\":\"文章\",\"collapsable\":false,\"items\":[{\"text\":\"滴滴开源小程序框架Mpx\",\"link\":\"/articles/1.0\"},{\"text\":\"Mpx 发布2.0,完美支持跨平台开发\",\"link\":\"/articles/2.0\"},{\"text\":\"小程序框架运行时性能大测评\",\"link\":\"/articles/performance\"},{\"text\":\"小程序开发者,为什么你应该尝试下MPX\",\"link\":\"/articles/mpx1\"},{\"text\":\"Mpx 小程序框架技术揭秘\",\"link\":\"/articles/mpx2\"},{\"text\":\"滴滴出行小程序体积优化实践\",\"link\":\"/articles/size-control\"},{\"text\":\"使用Typescript新特性Template Literal Types完善链式key的类型推导\",\"link\":\"/articles/ts-derivation\"},{\"text\":\"Mpx2.7 版本正式发布,大幅提升编译构建速度\",\"link\":\"/articles/2.7-release\"},{\"text\":\"Mpx2.8 版本正式发布,使用组合式 API 开发小程序\",\"link\":\"/articles/2.8-release\"},{\"text\":\"Mpx2.9 版本正式发布,支持原子类、SSR 和包体积优化\",\"link\":\"/articles/2.9-release\"},{\"text\":\"小程序跨端组件库 Mpx-cube-ui 开源啦\",\"link\":\"/articles/mpx-cube-ui\"},{\"text\":\"@mpxjs/cli 插件化改造\",\"link\":\"/articles/mpx-cli-next\"},{\"text\":\"Mpx 小程序单元测试能力建设与实践\",\"link\":\"/articles/unit-test\"}]}]},\"darkModeSwitchLabel\":\"外观\",\"sidebarMenuLabel\":\"菜单\",\"returnToTopLabel\":\"返回顶部\",\"langMenuLabel\":\"语言\",\"notFound\":{\"title\":\"页面未找到\",\"linkText\":\"返回首页\",\"quote\":\"😩 抱歉,迷路了~\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}},\"docFooter\":{\"prev\":\"上一页\",\"next\":\"下一页\"}},\"locales\":{\"/\":{\"label\":\"中文\",\"lang\":\"zh-CN\",\"title\":\"Mpx 框架\",\"description\":\"深度性能优化的增强型小程序开发框架\"}},\"scrollOffset\":134,\"cleanUrls\":false}");</script> </body> </html>