File tree Expand file tree Collapse file tree 4 files changed +4
-3
lines changed
apps/docs/content/zh-hans/docs
02-pages/04-api-reference/03-functions Expand file tree Collapse file tree 4 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ translation-updated-at: 2025-05-19T23:02:54.260Z
4
4
title : 如何使用多区域 (Multi-zones) 和 Next.js 构建微前端
5
5
nav_title : 多区域 (Multi-zones)
6
6
description : 学习如何利用 Next.js 的多区域功能构建微前端,实现在单一域名下部署多个 Next.js 应用。
7
+ ---
7
8
8
9
{ /* 本文档内容在应用路由和页面路由间共享。如需添加仅适用于页面路由 (Pages Router) 的内容,可使用 `<PagesOnly>内容</PagesOnly>` 组件。所有共享内容不应包裹在任何组件中。*/ }
9
10
Original file line number Diff line number Diff line change 2
2
source-updated-at : 2025-05-16T04:52:11.000Z
3
3
translation-updated-at : 2025-05-19T23:07:03.507Z
4
4
title : getServerSideProps
5
- description : ` getServerSideProps` 的 API 参考文档 。了解如何在 Next.js 中通过每次请求获取数据。
5
+ description : API `getServerSideProps` 的参考文档 。了解如何在 Next.js 中通过每次请求获取数据。
6
6
---
7
7
8
8
当从页面导出一个名为 ` getServerSideProps ` (服务端渲染 (SSR)) 的函数时,Next.js 会在每次请求时使用该函数返回的数据预渲染此页面。如果您需要获取频繁变化的数据,并希望页面展示最新内容时,这个功能非常有用。
Original file line number Diff line number Diff line change 2
2
source-updated-at : 2025-05-16T04:52:11.000Z
3
3
translation-updated-at : 2025-05-19T23:07:48.180Z
4
4
title : getStaticPaths
5
- description : ` getStaticPaths` API 参考文档。了解如何使用 `getStaticPaths` 获取数据并生成静态页面。
5
+ description : API `getStaticPaths`参考文档。了解如何使用 `getStaticPaths` 获取数据并生成静态页面。
6
6
---
7
7
8
8
当从使用了 [ 动态路由 (Dynamic Routes)] ( /docs/pages/building-your-application/routing/dynamic-routes ) 的页面中导出一个名为 ` getStaticPaths ` 的函数时,Next.js 将静态预渲染 ` getStaticPaths ` 指定的所有路径。
Original file line number Diff line number Diff line change 2
2
source-updated-at : 2025-05-16T04:52:11.000Z
3
3
translation-updated-at : 2025-05-19T23:07:22.685Z
4
4
title : getStaticProps
5
- description : ` getStaticProps` API 参考文档。了解如何使用 `getStaticProps` 在 Next.js 中生成静态页面。
5
+ description : API `getStaticProps` 参考文档。了解如何使用 `getStaticProps` 在 Next.js 中生成静态页面。
6
6
---
7
7
8
8
导出一个名为 ` getStaticProps ` 的函数,将在构建时使用该函数返回的 props 预渲染页面:
You can’t perform that action at this time.
0 commit comments