gpt4 book ai didi

Angular CDK ListKeyManager 差异

转载 作者:行者123 更新时间:2023-12-05 07:24:30 30 4
gpt4 key购买 nike

Angular CDK a11y documentation提到了两种类型的 ListKeyManager:

There are two varieties of ListKeyManager, FocusKeyManager andActiveDescendantKeyManager.

FocusKeyManager

Used when options will directly receive browser focus.Each item managed must implement the FocusableOption interface

ActiveDescendantKeyManager

Used when options will be marked as activevia aria-activedescendant. Each item managed must implement theHighlightable interface:

这对我来说不是很有用,我更喜欢在这里询问而不是阅读源代码,所以我想知道它们之间的区别,它们的用例是什么,这样我就可以选择正确的。

最佳答案

在实现 ActiveDescendantKeyManager 之后,我注意到它做的很少,所以我没有使用它们中的任何一个,而是编写了我自己的键/列表处理逻辑。

关于Angular CDK ListKeyManager 差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55393124/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com