Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n(zh-cn): update astro-syntax.mdx & directives-reference.mdx #8598

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/content/docs/zh-cn/basics/astro-syntax.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ const Component = MyComponent;

- **不支持 hydration 指令**。当使用[`client:*` hydration 指令时](/zh-cn/guides/framework-components/#激活组件),Astro 需要知道哪些组件要捆绑到生产环境中,而动态标签模式阻止了这一点。

- **不支持 [`define:vars` 指令](/zh-cn/reference/directives-reference/#definevars)**。如果你不能用额外的元素(例如 `<div>`)包装子元素,那么你可以手动为你的 Element 添加 `style={``--myVar:${value}``}`。

### 片段

Astro 支持使用 `<Fragment> </Fragment>` 或简写成 `<> </>` 包装多个元素。
Expand Down
1 change: 1 addition & 0 deletions src/content/docs/zh-cn/reference/directives-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ import api from '../db/api.js';

:::caution
只要在 `<script>` 或 `<style>` 标签上使用除 `src` 以外的任何属性,就相当于使用 `is:inline` 指令。
唯一例外的是在 `<style>` 标签上使用 [`define:vars` 指令](#definevars),它不会自动应用 `is:inline`。
:::

```astro
Expand Down
Loading