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

[zh-cn] Init translation of 'vue refs focus management' #14104

Merged
merged 7 commits into from
Jul 11, 2023

Conversation

jasonren0403
Copy link
Contributor

@jasonren0403 jasonren0403 commented Jul 9, 2023

Description

reduce sidebar flaw by one :(

@jasonren0403 jasonren0403 requested a review from a team as a code owner July 9, 2023 13:54
@jasonren0403 jasonren0403 requested review from yin1999 and removed request for a team July 9, 2023 13:54
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Jul 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2023

Preview URLs

Flaws (33)

URL: /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Vue_refs_focus_management
Title: 使用 Vue 模板引用进行焦点管理
Flaw count: 33

  • macros:
    • /zh-CN/docs/Learn/CSS/Building_blocks/Cascade_layers does not exist but fell back to /en-US/docs/Learn/CSS/Building_blocks/Cascade_layers
    • /zh-CN/docs/Learn/Performance/Multimedia does not exist but fell back to /en-US/docs/Learn/Performance/Multimedia
    • /zh-CN/docs/Learn/Performance/video does not exist but fell back to /en-US/docs/Learn/Performance/video
    • /zh-CN/docs/Learn/Performance/JavaScript does not exist but fell back to /en-US/docs/Learn/Performance/JavaScript
    • /zh-CN/docs/Learn/Performance/HTML does not exist but fell back to /en-US/docs/Learn/Performance/HTML
    • and 28 more flaws omitted
External URLs (4)

URL: /zh-CN/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Vue_refs_focus_management
Title: 使用 Vue 模板引用进行焦点管理

(comment last updated: 2023-07-11 14:54:21)


{{LearnSidebar}}{{PreviousMenuNext("Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Vue_conditional_rendering","Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Vue_resources", "Learn/Tools_and_testing/Client-side_JavaScript_frameworks")}}

使用 Vue 所做的事情快要结束了。最后一个需要讲述的内容是焦点管理,换句话说,也是如何提升我们应用的键盘无障碍性。我们将看看使用 **Vue refs** 来处理这个问题——这是一个进阶功能,允许你直接访问虚拟 DOM 之下的底层 DOM 节点,或者从一个组件直接访问一个子组件的内部 DOM 结构。
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
使用 Vue 所做的事情快要结束了。最后一个需要讲述的内容是焦点管理,换句话说,也是如何提升我们应用的键盘无障碍性。我们将看看使用 **Vue refs** 来处理这个问题——这是一个进阶功能,允许你直接访问虚拟 DOM 之下的底层 DOM 节点,或者从一个组件直接访问一个子组件的内部 DOM 结构。
使用 Vue 所做的事情快要结束了。最后一个需要讲述的内容是焦点管理,换句话说,也是如何提升我们应用的键盘无障碍性。我们将看看使用 **Vue ref** 来处理这个问题——这是一个进阶功能,允许你直接访问虚拟 DOM 之下的底层 DOM 节点,或者从一个组件直接访问一个子组件的内部 DOM 结构。

Comment on lines 61 to 63
相反,如果你需要访问底层 DOM 节点(比如设置焦点时),你可以使用 [Vue 模板引用](https://cn.vuejs.org/guide/essentials/template-refs.html)。对于自定义的 Vue 组件,你也可以使用 refs 来直接访问子组件的内部结构,然而这样做应该是谨慎的,因为这会使代码更难推理和理解。

要在一个组件中使用 ref,你需要在你想访问的元素上添加一个 `ref` 属性,并为该属性的值添加一个字符串标识符。值得注意的是,在一个组件中,引用必须是唯一的。在同一时间呈现的两个元素不应该有相同的引用。
Copy link
Member

Choose a reason for hiding this comment

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

coud we use "模板引用" for all those name, if it's not refering to a attribute :)

We may need to consider the translation for all the instances.

Copy link
Member

@yin1999 yin1999 left a comment

Choose a reason for hiding this comment

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

Thanks

@yin1999 yin1999 merged commit 63b9220 into main Jul 11, 2023
@yin1999 yin1999 deleted the vue-refs-focus-translation-zhcn branch July 11, 2023 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants