web: update dist

This commit is contained in:
王劲鹏 2023-01-17 11:18:32 +08:00 committed by osborn
parent 345e839d32
commit 7ae96b2cea
2 changed files with 41 additions and 32 deletions

View File

@ -1252,7 +1252,9 @@ var doric = (function (exports) {
}
hookBeforeNativeCall(context);
Reflect.apply(callback.resolve, context, argumentsList);
context.callbacks.delete(callbackId);
if (callback.retained !== true) {
context.callbacks.delete(callbackId);
}
}
function jsCallReject(contextId, callbackId, args) {
const context = gContexts.get(contextId);
@ -1271,9 +1273,21 @@ var doric = (function (exports) {
}
hookBeforeNativeCall(context);
Reflect.apply(callback.reject, context.entity, argumentsList);
context.callbacks.delete(callbackId);
if (callback.retained !== true) {
context.callbacks.delete(callbackId);
}
}
class Context {
hookBeforeNativeCall() {
if (this.entity && Reflect.has(this.entity, 'hookBeforeNativeCall')) {
Reflect.apply(Reflect.get(this.entity, 'hookBeforeNativeCall'), this.entity, []);
}
}
hookAfterNativeCall() {
if (this.entity && Reflect.has(this.entity, 'hookAfterNativeCall')) {
Reflect.apply(Reflect.get(this.entity, 'hookAfterNativeCall'), this.entity, []);
}
}
constructor(id) {
this.callbacks = new Map;
this.classes = new Map;
@ -1308,16 +1322,6 @@ var doric = (function (exports) {
}
});
}
hookBeforeNativeCall() {
if (this.entity && Reflect.has(this.entity, 'hookBeforeNativeCall')) {
Reflect.apply(Reflect.get(this.entity, 'hookBeforeNativeCall'), this.entity, []);
}
}
hookAfterNativeCall() {
if (this.entity && Reflect.has(this.entity, 'hookAfterNativeCall')) {
Reflect.apply(Reflect.get(this.entity, 'hookAfterNativeCall'), this.entity, []);
}
}
callNative(namespace, method, args) {
const callbackId = uniqueId('callback');
return new Promise((resolve, reject) => {
@ -1335,7 +1339,8 @@ var doric = (function (exports) {
const functionId = uniqueId('function');
this.callbacks.set(functionId, {
resolve: func,
reject: () => { loge("This should not be called"); }
reject: () => { loge("This should not be called"); },
retained: true,
});
return functionId;
}
@ -1771,6 +1776,24 @@ function createRef() {
return new Ref;
}
class View {
callback2Id(f) {
const id = uniqueId('Function');
this.callbacks.set(id, f);
return id;
}
id2Callback(id) {
let f = this.callbacks.get(id);
if (f === undefined) {
f = Reflect.get(this, id);
}
return f;
}
findViewByTag(tag) {
if (tag === this.tag) {
return this;
}
return undefined;
}
constructor() {
this.width = 0;
this.height = 0;
@ -1802,24 +1825,6 @@ class View {
}
});
}
callback2Id(f) {
const id = uniqueId('Function');
this.callbacks.set(id, f);
return id;
}
id2Callback(id) {
let f = this.callbacks.get(id);
if (f === undefined) {
f = Reflect.get(this, id);
}
return f;
}
findViewByTag(tag) {
if (tag === this.tag) {
return this;
}
return undefined;
}
/** Anchor start*/
get left() {
return this.x;
@ -4238,6 +4243,10 @@ __decorate$6([
Property,
__metadata$6("design:type", Gravity)
], Input.prototype, "textAlignment", void 0);
__decorate$6([
Property,
__metadata$6("design:type", String)
], Input.prototype, "fontStyle", void 0);
__decorate$6([
Property,
__metadata$6("design:type", Function)

File diff suppressed because one or more lines are too long