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