web:support hidden
This commit is contained in:
10
doric-web/dist/index.js
vendored
10
doric-web/dist/index.js
vendored
@@ -4505,6 +4505,7 @@ var doric_web = (function (exports, axios, sandbox) {
|
||||
this.frameHeight = 0;
|
||||
this.offsetX = 0;
|
||||
this.offsetY = 0;
|
||||
this._originDisplay = "";
|
||||
this.transform = {};
|
||||
this.context = context;
|
||||
}
|
||||
@@ -4516,6 +4517,7 @@ var doric_web = (function (exports, axios, sandbox) {
|
||||
}
|
||||
}
|
||||
this.view = this.build();
|
||||
this._originDisplay = this.view.style.display;
|
||||
}
|
||||
get paddingLeft() {
|
||||
return this.padding.left || 0;
|
||||
@@ -4696,6 +4698,14 @@ var doric_web = (function (exports, axios, sandbox) {
|
||||
};
|
||||
}
|
||||
break;
|
||||
case 'hidden':
|
||||
if (prop === true) {
|
||||
this.view.style.display = "none";
|
||||
}
|
||||
else {
|
||||
this.view.style.display = this._originDisplay;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
console.error(`Cannot blend prop for ${propName}`);
|
||||
break;
|
||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -103,6 +103,8 @@ export abstract class DoricViewNode {
|
||||
|
||||
view!: HTMLElement
|
||||
|
||||
_originDisplay: string = ""
|
||||
|
||||
transform: {
|
||||
translateX?: number,
|
||||
translateY?: number,
|
||||
@@ -127,6 +129,7 @@ export abstract class DoricViewNode {
|
||||
}
|
||||
}
|
||||
this.view = this.build()
|
||||
this._originDisplay = this.view.style.display
|
||||
}
|
||||
|
||||
abstract build(): HTMLElement
|
||||
@@ -322,6 +325,13 @@ export abstract class DoricViewNode {
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'hidden':
|
||||
if (prop === true) {
|
||||
this.view.style.display = "none"
|
||||
} else {
|
||||
this.view.style.display = this._originDisplay
|
||||
}
|
||||
break
|
||||
default:
|
||||
console.error(`Cannot blend prop for ${propName}`)
|
||||
break
|
||||
|
Reference in New Issue
Block a user