按照连接实现
因为他设定了子条目列表的名称所以要在父列表继承BaseExpandNode()后,在实体类里加入
fun addChildNode(){
if (childNode == null){
childNode = ArrayList<BaseNode>()
}
childList?.forEach {
childNode?.add((it as BaseNode))
}
}
整体实体类效果就是这个样子的(如下)
//父列表条目
data class GroupModel(
val title: String? = "",
val childList<BizModel>?,
override var childNode: MutableList<BaseNode>?
) : BaseExpandNode() {
fun addChildNode(){
if (childNode == null){
childNode = ArrayList<BaseNode>()
}
childList?.forEach {
childNode?.add((it as BaseNode))
}
}
}
//子列表条目
data clas