2019-08-02 16:19题主

如何选择某个树的节点

我想在树加载成功后,给树赋具体的值,要如何实现呢?
例如:
        加载成功后显示的如下:
     
我一进入页面后显示的是某一行数据选中的
要如何实现呢?
2019-08-05 09:08#1
path, [field], [separator], [callback], [scope] )

Expand the tree to the path of a particular node, then select it.

Parameters

  • path : String

    The path to select; A string of separated node IDs.

    The path should include a leading separator. eg '/root/usermanagement/users'

  • field : String (optional)

    The field to get the data from. Defaults to the model idProperty.

  • separator : String (optional)

    A separator to use.

    Defaults to: '/'

  • callback : Function (optional)

    A function to execute when the select finishes. The callback will be called with (bSuccess, oLastNode) where bSuccess is if the select was successful and oLastNode is the last node that was expanded.

  • scope : Object (optional)

    The scope of the callback function

Fires

  • viewcreated

返回开发者社区