Skip to content

Commit 6fa6232

Browse files
authored
i18n(zh-cn): Update layouts.mdx (#10699)
1 parent 6a49387 commit 6fa6232

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/zh-cn/basics/layouts.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import ReadMore from '~/components/ReadMore.astro'
1313

1414
但是,布局组件没有什么特别的!它们可以像任何其他 Astro 组件一样[接受 props](/zh-cn/basics/astro-components/#组件参数)[导入和使用其他组件](/zh-cn/basics/astro-components/#组件概述)。它们可以包含[UI 框架组件](/zh-cn/guides/framework-components/)[客户端脚本](/zh-cn/guides/client-side-scripts/)。它们甚至不必提供完整的页面外壳,而是可以用作部分 UI 模板。
1515

16-
然而,如果布局组件确实包含页面外壳,那么它的 `<html>` 元素必须是该组件中所有其他元素的父元素。所有 [`<style>`](/zh-cn/guides/styling/#在-astro-进行设计)[`<script>`](/zh-cn/guides/client-side-scripts/#在-astro-中使用-script) 元素必须包含在 `<html>` 标签内。
16+
然而,如果布局组件确实包含页面外壳,那么它的 `<html>` 元素必须是该组件中所有其他元素的父元素。
1717

1818
布局组件通常放置在项目中的 `src/layouts` 目录中,但这不是必须的。你可以选择将它们放置在项目中的任何位置。你甚至可以通过[在布局组件名称前面加上“_](/zh-cn/guides/routing/#排除页面)将布局组件与页面放在同一个文件夹中。
1919

0 commit comments

Comments
 (0)