Skip to content

Commit

Permalink
Merge pull request #713 from vuejs-translations/sync
Browse files Browse the repository at this point in the history
Sync #f618a3a5
  • Loading branch information
Jinjiang committed May 20, 2023
2 parents 5593791 + d1df6ee commit 78c796c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/guide/essentials/template-syntax.md
Expand Up @@ -151,9 +151,9 @@ data() {
可以在绑定的表达式中使用一个组件暴露的方法:

```vue-html
<span :title="toTitleDate(date)">
<time :title="toTitleDate(date)" :datetime="date">
{{ formatDate(date) }}
</span>
</time>
```

:::tip
Expand Down
2 changes: 1 addition & 1 deletion src/guide/introduction.md
Expand Up @@ -140,7 +140,7 @@ export default {
},
// methods 是一些用来更改状态与触发更新的函数
// 它们可以在模板中作为事件监听器绑定
// 它们可以在模板中作为事件处理器绑定
methods: {
increment() {
this.count++
Expand Down
2 changes: 1 addition & 1 deletion src/guide/quick-start.md
Expand Up @@ -22,7 +22,7 @@ footer: false

在本节中,我们将介绍如何在本地搭建 Vue [单页应用](/guide/extras/ways-of-using-vue#single-page-application-spa)。创建的项目将使用基于 [Vite](https://vitejs.dev) 的构建设置,并允许我们使用 Vue 的[单文件组件](/guide/scaling-up/sfc) (SFC)。

确保你安装了最新版本的 [Node.js](https://nodejs.org/)然后在命令行中运行以下命令 (不要带上 `>` 符号):
确保你安装了最新版本的 [Node.js](https://nodejs.org/)并且你的当前工作目录正是打算创建项目的目录。在命令行中运行以下命令 (不要带上 `>` 符号):

<div class="language-sh"><pre><code><span class="line"><span style="color:var(--vt-c-green);">&gt;</span> <span style="color:#A6ACCD;">npm init vue@latest</span></span></code></pre></div>

Expand Down
4 changes: 2 additions & 2 deletions src/guide/reusability/composables.md
Expand Up @@ -94,13 +94,13 @@ const { x, y } = useMouse()

```js
// event.js
import { onMounted, onUnmounted } from 'vue'
import { onMounted, onBeforeUnmount } from 'vue'

export function useEventListener(target, event, callback) {
// 如果你想的话,
// 也可以用字符串形式的 CSS 选择器来寻找目标 DOM 元素
onMounted(() => target.addEventListener(event, callback))
onUnmounted(() => target.removeEventListener(event, callback))
onBeforeUnmount(() => target.removeEventListener(event, callback))
}
```

Expand Down

1 comment on commit 78c796c

@vercel
Copy link

@vercel vercel bot commented on 78c796c May 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.