彩票走势图

logo DevExtreme 中文文档

getInstance(element)


getInstance(element)

获取使用其DOM节点找到的UI组件的实例。

  1. Parameters:
  2. element: |
  3. UI组件的容器。
  1. Return Value:
  2. UI组件的实例。

getInstance是UI组件类支持的静态方法,下面的代码演示了如何获取ID为myAccordion的元素中的Accordion实例:

// Modular approach
import Accordion from "devextreme/ui/accordion";
...
let element = document.getElementById("myAccordion");
let instance = Accordion.getInstance(element) as Accordion;

// Non-modular approach
let element = document.getElementById("myAccordion");
let instance = DevExpress.ui.dxAccordion.getInstance(element);
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP