web:List add reload function
This commit is contained in:
parent
44ba80bc90
commit
704a31f80c
@ -40,10 +40,24 @@ export class DoricListNode extends DoricSuperNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
this.reset()
|
||||||
|
const ret = this.pureCallJSResponse("renderBunchedItems", 0, this.itemCount) as DVModel[]
|
||||||
|
ret.forEach(e => {
|
||||||
|
const viewNode = DoricViewNode.create(this.context, e.type) as DoricListItemNode
|
||||||
|
viewNode.viewId = e.id
|
||||||
|
viewNode.init(this)
|
||||||
|
viewNode.blend(e.props)
|
||||||
|
this.view.appendChild(viewNode.view)
|
||||||
|
return viewNode
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
while (this.view.lastElementChild) {
|
while (this.view.lastElementChild) {
|
||||||
this.view.removeChild(this.view.lastElementChild)
|
this.view.removeChild(this.view.lastElementChild)
|
||||||
}
|
}
|
||||||
|
this.childNodes = []
|
||||||
}
|
}
|
||||||
|
|
||||||
onBlending() {
|
onBlending() {
|
||||||
|
Reference in New Issue
Block a user