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

typo: style modification #1030

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions src/guide/essentials/event-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ methods: {
`.passive` 修饰符一般用于触摸事件的监听器,可以用来[改善移动端设备的滚屏性能](https://developer.mozilla.org/zh-CN/docs/Web/API/EventTarget/addEventListener#%E4%BD%BF%E7%94%A8_passive_%E6%94%B9%E5%96%84%E6%BB%9A%E5%B1%8F%E6%80%A7%E8%83%BD)。

::: tip
请勿同时使用 `.passive` 和 `.prevent`,因为 `.passive` 已经向浏览器表明了你*不想*阻止事件的默认行为。如果你这么做了,则 `.prevent` 会被忽略,并且浏览器会抛出警告。
请勿同时使用 `.passive` 和 `.prevent`,因为 `.passive` 已经向浏览器表明了你不想阻止事件的默认行为。如果你这么做了,则 `.prevent` 会被忽略,并且浏览器会抛出警告。
Copy link
Contributor

Choose a reason for hiding this comment

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

此处对应英文文档的斜体 do not

image

Copy link
Author

Choose a reason for hiding this comment

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

英文文档看起来是美观的,中文文档这边我个人觉得看着很别扭。
如果要保持斜体是否要针对这种中文的情况怎么处理修改下~

:::

## 按键修饰符 {#key-modifiers}
Expand All @@ -276,7 +276,7 @@ methods: {
<input @keyup.enter="submit" />
```

你可以直接使用 [`KeyboardEvent.key`](https://developer.mozilla.org/zh-CN/docs/Web/API/KeyboardEvent/key/Key_Values) 暴露的按键名称作为修饰符,但需要转为 kebab-case 形式。
你可以直接使用 [`KeyboardEvent.key`](https://developer.mozilla.org/zh-CN/docs/Web/API/UI_Events/Keyboard_event_key_values) 暴露的按键名称作为修饰符,但需要转为 kebab-case 形式。
Copy link
Contributor

Choose a reason for hiding this comment

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

应该是 MDN 的 URL 变动了,还可以顺带向英文文档提交 PR

Copy link
Author

Choose a reason for hiding this comment

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

应该是 MDN 的 URL 变动了,还可以顺带向英文文档提交 PR

我看过了,英文文档的 URL 是正确的

Copy link
Contributor

Choose a reason for hiding this comment

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

应该是 MDN 的 URL 变动了,还可以顺带向英文文档提交 PR

我看过了,英文文档的 URL 是正确的

是因为英文文档自动重定向到新页面了,中文文档不知道为什么不能自动重定向

Copy link
Author

Choose a reason for hiding this comment

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

应该是 MDN 的 URL 变动了,还可以顺带向英文文档提交 PR

我看过了,英文文档的 URL 是正确的

是因为英文文档自动重定向到新页面了,中文文档不知道为什么不能自动重定向

看来像是 MDN 中文的这个文档没有配置对应的转发。我把英文文档的链接也更新下提个 pr 好了。

Copy link
Author

Choose a reason for hiding this comment

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

这样看来是不是文档还存在蛮多旧的 MDN 的链接


```vue-html
<input @keyup.page-down="onPageDown" />
Expand Down