feat: add preloadItemCount for List, incase we need preload more items before scroll to end
This commit is contained in:
60
doric-web/dist/index.js
vendored
60
doric-web/dist/index.js
vendored
@@ -1278,6 +1278,16 @@ var doric = (function (exports) {
|
||||
}
|
||||
}
|
||||
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;
|
||||
@@ -1312,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) => {
|
||||
@@ -1776,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;
|
||||
@@ -1807,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;
|
||||
@@ -3625,6 +3625,10 @@ __decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
], List.prototype, "onDragged", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Number)
|
||||
], List.prototype, "preloadItemCount", void 0);
|
||||
function list(config) {
|
||||
const ret = new List;
|
||||
ret.apply(config);
|
||||
|
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
Reference in New Issue
Block a user