`
cedary
  • 浏览: 19043 次
  • 性别: Icon_minigender_2
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论

attributes in nodes

    博客分类:
  • ext
阅读更多
Jack真是贴心周全啊。Node中attributes属性是开放出来供开发者自己定义属性用的。如果在定义json data时希望把自己需要的属性也加进去,能被load出来。那么用这个public property就好了。

// json data
[{
"id":"haha",
"text":"haha",
"contentLink":myurl
}]

// get the node contentLink
treePanel.on('click', function(node){
    var link = node.attributes.contentLink;
    ......
 });


轻松快意,想放多少放多少。
分享到:
评论

相关推荐

    Amplify Shader Editor 1.4.3

    * Redone visuals of property type nodes Attributes list to be easier to use * Added new Enum and Custom attributes to property type nodes * Enum on Create Enum mode creates an Enum attribute using the...

    An End-to-End Network for Generating Social Relationship Graphs.pdf

    The neural network exploits the recurrent connections among the GRUs to implement message passing between nodes and edges in the graph, and results in significant improvement over previous methods ...

    Vector CANdb++ SP27 CAN报文编辑软件

    Correction of a crash when copying nodes in a read-only database When exporting CSV signals, the minimum and maximum values are exported with full precision For a node's Mapped Rx signal, the assigned...

    NativeXml-master

    Fixed bug in entity resolving for attributes ! Bugfix: Take into account default value in WriteAttributeString/-Integer ! Bugfix: Never write empty attributes to the XML file + Added ...

    CANdb++ 3.0 SP27

    For user-defined attributes with the type "hex" it is now possible to define the min/max/default values also in the range 0xF0000000 to 0xFFFFFFFFFF. Correction of a slowdown when opening some MDC ...

    C# 操作XML.txt

    对于每个XML节点,可以通过`Attributes`属性获取其所有属性,并对其进行处理。如果存在特定名称的属性,则可以进一步获取其值。 #### 示例代码 ```csharp static void GetNodes(XmlNode node) { XmlAttribute ...

    DITidy v5.6.3 for D4-XE10 HTML XML 解析

    Easy to use API to iterate and examine document nodes and attributes. Generates cleaned-up and well formatted HTML and XHTML with customizable layout styles. Reads and writes configuration files ...

    Amplify Shader Editor1.5.4 最新版

    Creating nodes or new Shaders is as intuitive as creating a new Unity Material in the Project Explorer window. OPEN to customer contributions like nodes, improvements, bug fixes or third-party ...

    TreeView 结点 保存XML

    foreach (TreeNode node in nodes) { XmlElement xmlNode = xmlDoc.CreateElement("Node"); xmlNode.SetAttribute("Name", node.Text); if (node.Tag != null) xmlNode.SetAttribute("Tag", node.Tag.ToString...

    Security enforcement, from OS to image to VM for Production OpenStack Cloud

    Controller nodes are high-availabile and easily scale-out based on Pacemaker+Corosync+HAproxy, with large compute+storage nodes, splitted by multiple regions, and each region was further splitted ...

    ASP.NET2.0认证题

    foreach (XmlNode node in nodes) { node.Attributes[0].Value = "NA"; }** - 这个选项正确,因为它遍历了所有的`book`节点,并将每个节点的第一个属性(即`genre`)的值设为“NA”。 - **B. foreach (XmlNode ...

    ILSpy_binaries_ILSpy 6.1.zip

    C# 9.0: Attributes on local functions General ILSpy now uses System.Reflection.Metadata 1.8.1 UI Improvements Assembly List UX: double-click selects list and dismisses dialog Base types treenode: ...

    VB操纵XML文档读取节点

    For Each node In nodes Console.WriteLine(node.Name) Next ``` 如果要查找特定的元素节点,我们可以使用XPath表达式。比如,查找名为`book`的所有元素: ```vb Dim bookNodes As XmlNodeList = xmlDoc....

    Python Cookbook, 2nd Edition

    Interpolating Variables in a Stringin Python 2.4 Recipe 1.18. Replacing Multiple Patterns in a Single Pass Recipe 1.19. Checking a String for Any of Multiple Endings Recipe 1.20. Handling ...

    ASP操作XML数据.rar_asp+xml_操作XML

    For Each node In nodes ' 处理每个item节点 Next ``` 3. Element对象:代表XML文档中的元素节点,可以通过Node对象的`nodeName`和`nodeValue`属性获取元素名和值。也可以通过`getAttribute`和`setAttribute`操作...

    C#操作XML.对XML的增删改查操作,

    foreach (XmlNode node in nodes) { Console.WriteLine(node.InnerText); } ``` 此外,LINQ to XML提供了一种更现代且类型安全的方式来查询XML,它允许你使用C#查询语法(LINQ查询)。 ```csharp XDocument xDoc = ...

    erlanghandbook

    These attributes provide essential information about the module and help in organizing and managing code. #### Datatypes (Terms) Erlang uses a rich set of datatypes known as terms, which include: -...

    C#加载整个硬盘目录到TreeView

    DirectoryInfo和FileInfo对象提供了Attributes属性,可以据此判断是目录还是文件,并为TreeNode设置相应的图标。 以下是一个简单的示例代码片段,演示了如何将一个驱动器的目录结构加载到TreeView: ```csharp ...

Global site tag (gtag.js) - Google Analytics