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) {
|
init(superNode) {
|
||||||
if (superNode) {
|
if (superNode) {
|
||||||
this.superNode = superNode;
|
this.superNode = superNode;
|
||||||
if (this instanceof DoricSuperViewNode) {
|
if (this instanceof DoricSuperNode) {
|
||||||
this.reusable = superNode.reusable;
|
this.reusable = superNode.reusable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.view = this.build();
|
this.view = this.build();
|
||||||
this.view.style.overflow = "hidden";
|
|
||||||
}
|
}
|
||||||
get paddingLeft() {
|
get paddingLeft() {
|
||||||
return this.padding.left || 0;
|
return this.padding.left || 0;
|
||||||
@ -3941,7 +3940,7 @@ return __module.exports;
|
|||||||
Reflect.apply(this.context.invokeEntityMethod, this.context, argumentsList);
|
Reflect.apply(this.context.invokeEntityMethod, this.context, argumentsList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class DoricSuperViewNode extends DoricViewNode {
|
class DoricSuperNode extends DoricViewNode {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(...arguments);
|
super(...arguments);
|
||||||
this.reusable = false;
|
this.reusable = false;
|
||||||
@ -3987,12 +3986,16 @@ return __module.exports;
|
|||||||
this.subModels.delete(id);
|
this.subModels.delete(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class DoricGroupViewNode extends DoricSuperViewNode {
|
class DoricGroupViewNode extends DoricSuperNode {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(...arguments);
|
super(...arguments);
|
||||||
this.childNodes = [];
|
this.childNodes = [];
|
||||||
this.childViewIds = [];
|
this.childViewIds = [];
|
||||||
}
|
}
|
||||||
|
init(superNode) {
|
||||||
|
super.init(superNode);
|
||||||
|
this.view.style.overflow = "hidden";
|
||||||
|
}
|
||||||
blendProps(v, propName, prop) {
|
blendProps(v, propName, prop) {
|
||||||
if (propName === 'children') {
|
if (propName === 'children') {
|
||||||
if (prop instanceof Array) {
|
if (prop instanceof Array) {
|
||||||
@ -4406,7 +4409,7 @@ return __module.exports;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DoricScrollerNode extends DoricSuperViewNode {
|
class DoricScrollerNode extends DoricSuperNode {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(...arguments);
|
super(...arguments);
|
||||||
this.childViewId = "";
|
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 = ""
|
childViewId: string = ""
|
||||||
|
@ -64,7 +64,7 @@ export abstract class DoricViewNode {
|
|||||||
viewId = ""
|
viewId = ""
|
||||||
viewType = "View"
|
viewType = "View"
|
||||||
context: DoricContext
|
context: DoricContext
|
||||||
superNode?: DoricSuperViewNode
|
superNode?: DoricSuperNode
|
||||||
layoutConfig = {
|
layoutConfig = {
|
||||||
widthSpec: LayoutSpec.EXACTLY,
|
widthSpec: LayoutSpec.EXACTLY,
|
||||||
heightSpec: LayoutSpec.EXACTLY,
|
heightSpec: LayoutSpec.EXACTLY,
|
||||||
@ -104,15 +104,14 @@ export abstract class DoricViewNode {
|
|||||||
this.context = context
|
this.context = context
|
||||||
}
|
}
|
||||||
|
|
||||||
init(superNode?: DoricSuperViewNode) {
|
init(superNode?: DoricSuperNode) {
|
||||||
if (superNode) {
|
if (superNode) {
|
||||||
this.superNode = superNode
|
this.superNode = superNode
|
||||||
if (this instanceof DoricSuperViewNode) {
|
if (this instanceof DoricSuperNode) {
|
||||||
this.reusable = superNode.reusable
|
this.reusable = superNode.reusable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.view = this.build()
|
this.view = this.build()
|
||||||
this.view.style.overflow = "hidden"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract build(): HTMLElement
|
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
|
reusable = false
|
||||||
|
|
||||||
subModels: Map<String, DVModel> = new Map
|
subModels: Map<String, DVModel> = new Map
|
||||||
@ -367,10 +366,16 @@ export abstract class DoricSuperViewNode extends DoricViewNode {
|
|||||||
abstract getSubNodeById(viewId: string): DoricViewNode | undefined
|
abstract getSubNodeById(viewId: string): DoricViewNode | undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
export abstract class DoricGroupViewNode extends DoricSuperViewNode {
|
export abstract class DoricGroupViewNode extends DoricSuperNode {
|
||||||
childNodes: DoricViewNode[] = []
|
childNodes: DoricViewNode[] = []
|
||||||
childViewIds: string[] = []
|
childViewIds: string[] = []
|
||||||
|
|
||||||
|
init(superNode?: DoricSuperNode) {
|
||||||
|
super.init(superNode)
|
||||||
|
this.view.style.overflow = "hidden"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
blendProps(v: HTMLElement, propName: string, prop: any) {
|
blendProps(v: HTMLElement, propName: string, prop: any) {
|
||||||
if (propName === 'children') {
|
if (propName === 'children') {
|
||||||
if (prop instanceof Array) {
|
if (prop instanceof Array) {
|
||||||
|
Reference in New Issue
Block a user