Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/upstream' into sync
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/guide/introduction.md
#	src/guide/quick-start.md
  • Loading branch information
wxsms committed May 19, 2023
2 parents 5593791 + f618a3a commit 02d350d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 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/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

0 comments on commit 02d350d

Please sign in to comment.