wz1992777
wz1992777
采纳率4.3%
2016-05-10 06:00 阅读 1.1k

dtree 中循环菜单,获取图片

现在我的菜单是封装在一个xml文件的,dtree 中循环菜单,不同的菜单用不同的小图片,
dtree.add 方法该加哪些参数? 还是说用其他的方法

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • showbo GoCityPass新加坡曼谷通票 2016-05-10 06:15

    不是有个icon参数,配置这个icon就行了

     Functions
    
    add()
    
    Adds a node to the tree.
    Can only be called before the tree is drawn.
    
    id, pid and name are required.
    
    Parameters
    
    Name    Type    Description
    id  Number  Unique identity number.
    pid Number  Number refering to the parent node. The value for the root node has to be -1.
    name    String  Text label for the node.
    url String  Url for the node.
    title   String  Title for the node.
    target  String  Target for the node.
    icon    String  Image file to use as the icon. Uses default if not specified.
    iconOpen    String  Image file to use as the open icon. Uses default if not specified.
    open    Boolean Is the node open.
    
    点赞 评论 复制链接分享

相关推荐