feat:add set environment value api
This commit is contained in:
@@ -1066,6 +1066,10 @@ var Panel = /** @class */ (function () {
|
||||
Panel.prototype.onDestroy = function () { };
|
||||
Panel.prototype.onShow = function () { };
|
||||
Panel.prototype.onHidden = function () { };
|
||||
Panel.prototype.onEnvChanged = function () {
|
||||
this.__root__.children.length = 0;
|
||||
this.build(this.__root__);
|
||||
};
|
||||
Panel.prototype.addHeadView = function (type, v) {
|
||||
var map = this.headviews.get(type);
|
||||
if (map) {
|
||||
@@ -1128,6 +1132,9 @@ var Panel = /** @class */ (function () {
|
||||
this.__root__.children.length = 0;
|
||||
this.build(this.__root__);
|
||||
};
|
||||
Panel.prototype.__onEnvChanged__ = function () {
|
||||
this.onEnvChanged();
|
||||
};
|
||||
Panel.prototype.__response__ = function (viewIds, callbackId) {
|
||||
var arguments$1 = arguments;
|
||||
|
||||
@@ -1359,6 +1366,12 @@ var Panel = /** @class */ (function () {
|
||||
__metadata$b("design:paramtypes", [Object]),
|
||||
__metadata$b("design:returntype", void 0)
|
||||
], Panel.prototype, "__build__", null);
|
||||
__decorate$b([
|
||||
NativeCall,
|
||||
__metadata$b("design:type", Function),
|
||||
__metadata$b("design:paramtypes", []),
|
||||
__metadata$b("design:returntype", void 0)
|
||||
], Panel.prototype, "__onEnvChanged__", null);
|
||||
__decorate$b([
|
||||
NativeCall,
|
||||
__metadata$b("design:type", Function),
|
||||
|
@@ -830,6 +830,10 @@ class Panel {
|
||||
onDestroy() { }
|
||||
onShow() { }
|
||||
onHidden() { }
|
||||
onEnvChanged() {
|
||||
this.__root__.children.length = 0;
|
||||
this.build(this.__root__);
|
||||
}
|
||||
addHeadView(type, v) {
|
||||
let map = this.headviews.get(type);
|
||||
if (map) {
|
||||
@@ -892,6 +896,9 @@ class Panel {
|
||||
this.__root__.children.length = 0;
|
||||
this.build(this.__root__);
|
||||
}
|
||||
__onEnvChanged__() {
|
||||
this.onEnvChanged();
|
||||
}
|
||||
__response__(viewIds, callbackId) {
|
||||
const v = this.retrospectView(viewIds);
|
||||
if (v === undefined) {
|
||||
@@ -1046,6 +1053,12 @@ __decorate$b([
|
||||
__metadata$b("design:paramtypes", [Object]),
|
||||
__metadata$b("design:returntype", void 0)
|
||||
], Panel.prototype, "__build__", null);
|
||||
__decorate$b([
|
||||
NativeCall,
|
||||
__metadata$b("design:type", Function),
|
||||
__metadata$b("design:paramtypes", []),
|
||||
__metadata$b("design:returntype", void 0)
|
||||
], Panel.prototype, "__onEnvChanged__", null);
|
||||
__decorate$b([
|
||||
NativeCall,
|
||||
__metadata$b("design:type", Function),
|
||||
|
@@ -2351,6 +2351,10 @@ class Panel {
|
||||
onDestroy() { }
|
||||
onShow() { }
|
||||
onHidden() { }
|
||||
onEnvChanged() {
|
||||
this.__root__.children.length = 0;
|
||||
this.build(this.__root__);
|
||||
}
|
||||
addHeadView(type, v) {
|
||||
let map = this.headviews.get(type);
|
||||
if (map) {
|
||||
@@ -2413,6 +2417,9 @@ class Panel {
|
||||
this.__root__.children.length = 0;
|
||||
this.build(this.__root__);
|
||||
}
|
||||
__onEnvChanged__() {
|
||||
this.onEnvChanged();
|
||||
}
|
||||
__response__(viewIds, callbackId) {
|
||||
const v = this.retrospectView(viewIds);
|
||||
if (v === undefined) {
|
||||
@@ -2567,6 +2574,12 @@ __decorate$b([
|
||||
__metadata$b("design:paramtypes", [Object]),
|
||||
__metadata$b("design:returntype", void 0)
|
||||
], Panel.prototype, "__build__", null);
|
||||
__decorate$b([
|
||||
NativeCall,
|
||||
__metadata$b("design:type", Function),
|
||||
__metadata$b("design:paramtypes", []),
|
||||
__metadata$b("design:returntype", void 0)
|
||||
], Panel.prototype, "__onEnvChanged__", null);
|
||||
__decorate$b([
|
||||
NativeCall,
|
||||
__metadata$b("design:type", Function),
|
||||
|
1
doric-js/index.d.ts
vendored
1
doric-js/index.d.ts
vendored
@@ -140,6 +140,7 @@ declare module 'doric/lib/src/ui/panel' {
|
||||
onDestroy(): void;
|
||||
onShow(): void;
|
||||
onHidden(): void;
|
||||
onEnvChanged(): void;
|
||||
abstract build(rootView: Group): void;
|
||||
addHeadView(type: string, v: View): void;
|
||||
allHeadViews(): IterableIterator<Map<string, View>>;
|
||||
|
2
doric-js/lib/src/ui/panel.d.ts
vendored
2
doric-js/lib/src/ui/panel.d.ts
vendored
@@ -9,6 +9,7 @@ export declare abstract class Panel {
|
||||
onDestroy(): void;
|
||||
onShow(): void;
|
||||
onHidden(): void;
|
||||
onEnvChanged(): void;
|
||||
abstract build(rootView: Group): void;
|
||||
private __data__?;
|
||||
private __root__;
|
||||
@@ -27,6 +28,7 @@ export declare abstract class Panel {
|
||||
private __onShow__;
|
||||
private __onHidden__;
|
||||
private __build__;
|
||||
private __onEnvChanged__;
|
||||
private __response__;
|
||||
private retrospectView;
|
||||
private nativeRender;
|
||||
|
@@ -45,6 +45,10 @@ export class Panel {
|
||||
onDestroy() { }
|
||||
onShow() { }
|
||||
onHidden() { }
|
||||
onEnvChanged() {
|
||||
this.__root__.children.length = 0;
|
||||
this.build(this.__root__);
|
||||
}
|
||||
addHeadView(type, v) {
|
||||
let map = this.headviews.get(type);
|
||||
if (map) {
|
||||
@@ -107,6 +111,9 @@ export class Panel {
|
||||
this.__root__.children.length = 0;
|
||||
this.build(this.__root__);
|
||||
}
|
||||
__onEnvChanged__() {
|
||||
this.onEnvChanged();
|
||||
}
|
||||
__response__(viewIds, callbackId) {
|
||||
const v = this.retrospectView(viewIds);
|
||||
if (v === undefined) {
|
||||
@@ -261,6 +268,12 @@ __decorate([
|
||||
__metadata("design:paramtypes", [Object]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], Panel.prototype, "__build__", null);
|
||||
__decorate([
|
||||
NativeCall,
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", []),
|
||||
__metadata("design:returntype", void 0)
|
||||
], Panel.prototype, "__onEnvChanged__", null);
|
||||
__decorate([
|
||||
NativeCall,
|
||||
__metadata("design:type", Function),
|
||||
|
Reference in New Issue
Block a user