h5:rename supernode
This commit is contained in:
parent
9101c8cd88
commit
47faafae7e
13
doric-h5/dist/index.js
vendored
13
doric-h5/dist/index.js
vendored
@ -3754,12 +3754,11 @@ return __module.exports;
|
||||
init(superNode) {
|
||||
if (superNode) {
|
||||
this.superNode = superNode;
|
||||
if (this instanceof DoricSuperViewNode) {
|
||||
if (this instanceof DoricSuperNode) {
|
||||
this.reusable = superNode.reusable;
|
||||
}
|
||||
}
|
||||
this.view = this.build();
|
||||
this.view.style.overflow = "hidden";
|
||||
}
|
||||
get paddingLeft() {
|
||||
return this.padding.left || 0;
|
||||
@ -3941,7 +3940,7 @@ return __module.exports;
|
||||
Reflect.apply(this.context.invokeEntityMethod, this.context, argumentsList);
|
||||
}
|
||||
}
|
||||
class DoricSuperViewNode extends DoricViewNode {
|
||||
class DoricSuperNode extends DoricViewNode {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.reusable = false;
|
||||
@ -3987,12 +3986,16 @@ return __module.exports;
|
||||
this.subModels.delete(id);
|
||||
}
|
||||
}
|
||||
class DoricGroupViewNode extends DoricSuperViewNode {
|
||||
class DoricGroupViewNode extends DoricSuperNode {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.childNodes = [];
|
||||
this.childViewIds = [];
|
||||
}
|
||||
init(superNode) {
|
||||
super.init(superNode);
|
||||
this.view.style.overflow = "hidden";
|
||||
}
|
||||
blendProps(v, propName, prop) {
|
||||
if (propName === 'children') {
|
||||
if (prop instanceof Array) {
|
||||
@ -4406,7 +4409,7 @@ return __module.exports;
|
||||
}
|
||||
}
|
||||
|
||||
class DoricScrollerNode extends DoricSuperViewNode {
|
||||
class DoricScrollerNode extends DoricSuperNode {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.childViewId = "";
|
||||
|
2
doric-h5/dist/index.js.map
vendored
2
doric-h5/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
import { LEFT, RIGHT, CENTER_X, CENTER_Y, TOP, BOTTOM, toPixelString, DoricSuperViewNode, DVModel, DoricViewNode } from "./DoricViewNode";
|
||||
import { LEFT, RIGHT, CENTER_X, CENTER_Y, TOP, BOTTOM, toPixelString, DoricSuperNode, DVModel, DoricViewNode } from "./DoricViewNode";
|
||||
|
||||
export class DoricScrollerNode extends DoricSuperViewNode {
|
||||
export class DoricScrollerNode extends DoricSuperNode {
|
||||
|
||||
|
||||
childViewId: string = ""
|
||||
|
@ -64,7 +64,7 @@ export abstract class DoricViewNode {
|
||||
viewId = ""
|
||||
viewType = "View"
|
||||
context: DoricContext
|
||||
superNode?: DoricSuperViewNode
|
||||
superNode?: DoricSuperNode
|
||||
layoutConfig = {
|
||||
widthSpec: LayoutSpec.EXACTLY,
|
||||
heightSpec: LayoutSpec.EXACTLY,
|
||||
@ -104,15 +104,14 @@ export abstract class DoricViewNode {
|
||||
this.context = context
|
||||
}
|
||||
|
||||
init(superNode?: DoricSuperViewNode) {
|
||||
init(superNode?: DoricSuperNode) {
|
||||
if (superNode) {
|
||||
this.superNode = superNode
|
||||
if (this instanceof DoricSuperViewNode) {
|
||||
if (this instanceof DoricSuperNode) {
|
||||
this.reusable = superNode.reusable
|
||||
}
|
||||
}
|
||||
this.view = this.build()
|
||||
this.view.style.overflow = "hidden"
|
||||
}
|
||||
|
||||
abstract build(): HTMLElement
|
||||
@ -315,7 +314,7 @@ export abstract class DoricViewNode {
|
||||
}
|
||||
|
||||
|
||||
export abstract class DoricSuperViewNode extends DoricViewNode {
|
||||
export abstract class DoricSuperNode extends DoricViewNode {
|
||||
reusable = false
|
||||
|
||||
subModels: Map<String, DVModel> = new Map
|
||||
@ -367,10 +366,16 @@ export abstract class DoricSuperViewNode extends DoricViewNode {
|
||||
abstract getSubNodeById(viewId: string): DoricViewNode | undefined
|
||||
}
|
||||
|
||||
export abstract class DoricGroupViewNode extends DoricSuperViewNode {
|
||||
export abstract class DoricGroupViewNode extends DoricSuperNode {
|
||||
childNodes: DoricViewNode[] = []
|
||||
childViewIds: string[] = []
|
||||
|
||||
init(superNode?: DoricSuperNode) {
|
||||
super.init(superNode)
|
||||
this.view.style.overflow = "hidden"
|
||||
}
|
||||
|
||||
|
||||
blendProps(v: HTMLElement, propName: string, prop: any) {
|
||||
if (propName === 'children') {
|
||||
if (prop instanceof Array) {
|
||||
|
Reference in New Issue
Block a user