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.
我在窗口中有一个基本表格。这个表单有几个复选框,我需要一些如何能够用另一个复选框全选。我应该如何访问这些复选框类型。我正在尝试获取对“this”的引用,然后是 this.getForm().getFieldValues() 但有更好的方法吗,因为我只需要获取复选框而不是其他字段。
谢谢,SS
默认情况下,ExtJs 字段没有getForm()方法来访问其父级。但是,您可以使用此覆盖来添加此方法。获得表格后,您可以访问您喜欢的任何字段,这应该可以让您按照您的描述进行操作。