feat:List add header and footer
This commit is contained in:
25
doric-web/dist/index.js
vendored
25
doric-web/dist/index.js
vendored
@@ -3322,12 +3322,17 @@ class List extends Superview {
|
||||
this.batchCount = 15;
|
||||
}
|
||||
allSubviews() {
|
||||
const ret = [...this.cachedViews.values()];
|
||||
if (this.loadMoreView) {
|
||||
return [...this.cachedViews.values(), this.loadMoreView];
|
||||
ret.push(this.loadMoreView);
|
||||
}
|
||||
else {
|
||||
return this.cachedViews.values();
|
||||
if (this.header) {
|
||||
ret.push(this.header);
|
||||
}
|
||||
if (this.footer) {
|
||||
ret.push(this.footer);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
scrollToItem(context, index, config) {
|
||||
const animated = config === null || config === void 0 ? void 0 : config.animated;
|
||||
@@ -3353,6 +3358,12 @@ class List extends Superview {
|
||||
if (this.loadMoreView) {
|
||||
this.dirtyProps['loadMoreView'] = this.loadMoreView.viewId;
|
||||
}
|
||||
if (this.header) {
|
||||
this.dirtyProps['header'] = this.header.viewId;
|
||||
}
|
||||
if (this.footer) {
|
||||
this.dirtyProps['footer'] = this.footer.viewId;
|
||||
}
|
||||
return super.toModel();
|
||||
}
|
||||
}
|
||||
@@ -3400,6 +3411,14 @@ __decorate$9([
|
||||
Property,
|
||||
__metadata$9("design:type", Boolean)
|
||||
], List.prototype, "bounces", void 0);
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$9("design:type", ListItem)
|
||||
], List.prototype, "header", void 0);
|
||||
__decorate$9([
|
||||
Property,
|
||||
__metadata$9("design:type", ListItem)
|
||||
], List.prototype, "footer", 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