Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在返回代理对象的 Lightning JS 渲染器中使用“document.getElementsByClassName”。我可以在调试控制台中看到我想要的实际元素,但我不知道如何从代理对象中提取该元素。
调试控制台截图
JSON.strigify() 方法将允许您检查代理对象中的值。您也可以指定 aura:id 到文本区域,您可以使用 cmp.find("inputId").getElement() 访问它以获取元素 ehihc 是闪电中推荐的。