Skip to content

Commit

Permalink
i18n(zh-cn): update astro-syntax.mdx & directives-reference.mdx (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
liruifengv committed Jun 20, 2024
1 parent 08fe5d2 commit 07b4804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit 07b4804

Please sign in to comment.