We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
layouts.mdx
1 parent 6a49387 commit 6fa6232Copy full SHA for 6fa6232
src/content/docs/zh-cn/basics/layouts.mdx
@@ -13,7 +13,7 @@ import ReadMore from '~/components/ReadMore.astro'
13
14
但是,布局组件没有什么特别的!它们可以像任何其他 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 模板。
15
16
-然而,如果布局组件确实包含页面外壳,那么它的 `<html>` 元素必须是该组件中所有其他元素的父元素。所有 [`<style>`](/zh-cn/guides/styling/#在-astro-进行设计) 或 [`<script>`](/zh-cn/guides/client-side-scripts/#在-astro-中使用-script) 元素必须包含在 `<html>` 标签内。
+然而,如果布局组件确实包含页面外壳,那么它的 `<html>` 元素必须是该组件中所有其他元素的父元素。
17
18
布局组件通常放置在项目中的 `src/layouts` 目录中,但这不是必须的。你可以选择将它们放置在项目中的任何位置。你甚至可以通过[在布局组件名称前面加上“_”](/zh-cn/guides/routing/#排除页面)将布局组件与页面放在同一个文件夹中。
19
0 commit comments