web:rename function
This commit is contained in:
@@ -14,6 +14,7 @@ import { PopoverPlugin } from './plugins/PopoverPlugin'
|
||||
import { DoricListItemNode } from "./shader/DoricListItemNode"
|
||||
import { DoricListNode } from "./shader/DoricListNode"
|
||||
import { DoricDraggableNode } from "./shader/DoricDraggableNode"
|
||||
import { DoricRefreshableNode } from "./shader/DoricRefreshableNode"
|
||||
|
||||
const bundles: Map<string, string> = new Map
|
||||
|
||||
@@ -62,4 +63,5 @@ registerViewNode('Image', DoricImageNode)
|
||||
registerViewNode('Scroller', DoricScrollerNode)
|
||||
registerViewNode('ListItem', DoricListItemNode)
|
||||
registerViewNode('List', DoricListNode)
|
||||
registerViewNode('Draggable', DoricDraggableNode)
|
||||
registerViewNode('Draggable', DoricDraggableNode)
|
||||
registerViewNode('Refreshable', DoricRefreshableNode)
|
@@ -43,8 +43,8 @@ export class DoricListNode extends DoricSuperNode {
|
||||
}
|
||||
}
|
||||
|
||||
onBlended() {
|
||||
super.onBlended()
|
||||
onBlending() {
|
||||
super.onBlending()
|
||||
if (this.childNodes.length !== this.itemCount) {
|
||||
const ret = this.pureCallJSResponse("renderBunchedItems", this.childNodes.length, this.itemCount) as DVModel[]
|
||||
this.childNodes = this.childNodes.concat(ret.map(e => {
|
||||
|
@@ -11,8 +11,22 @@ export class DoricRefreshableNode extends DoricSuperNode {
|
||||
|
||||
build() {
|
||||
const ret = document.createElement('div')
|
||||
ret.style.overflow = "scroll"
|
||||
const header = document.createElement('div')
|
||||
const content = document.createElement('div')
|
||||
header.style.width = "100%"
|
||||
header.style.height = "200px"
|
||||
header.style.backgroundColor = "red"
|
||||
|
||||
content.style.width = "100%"
|
||||
content.style.height = "100%"
|
||||
content.style.backgroundColor = "blue"
|
||||
ret.appendChild(header)
|
||||
ret.appendChild(content)
|
||||
ret.addEventListener("scroll", () => {
|
||||
ret.scrollTop = 200
|
||||
})
|
||||
return ret
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -24,8 +24,8 @@ export class DoricScrollerNode extends DoricSuperNode {
|
||||
return viewId === this.childViewId ? this.childNode : undefined
|
||||
}
|
||||
|
||||
onBlended() {
|
||||
super.onBlended()
|
||||
onBlending() {
|
||||
super.onBlending()
|
||||
const model = this.getSubModel(this.childViewId)
|
||||
if (model === undefined) {
|
||||
return
|
||||
|
@@ -141,12 +141,18 @@ export abstract class DoricViewNode {
|
||||
for (let key in props) {
|
||||
this.blendProps(this.view, key, props[key])
|
||||
}
|
||||
this.onBlended()
|
||||
this.onBlending()
|
||||
this.layout()
|
||||
}
|
||||
|
||||
onBlending() {
|
||||
|
||||
}
|
||||
|
||||
onBlended() {
|
||||
|
||||
}
|
||||
|
||||
configBorder() {
|
||||
if (this.border) {
|
||||
this.view.style.borderStyle = "solid"
|
||||
@@ -397,8 +403,8 @@ export abstract class DoricGroupViewNode extends DoricSuperNode {
|
||||
blend(props: { [index: string]: any }) {
|
||||
super.blend(props)
|
||||
}
|
||||
onBlended() {
|
||||
super.onBlended()
|
||||
onBlending() {
|
||||
super.onBlending()
|
||||
this.configChildNode()
|
||||
}
|
||||
configChildNode() {
|
||||
|
Reference in New Issue
Block a user