Remove header and footer support,this is unnecessary

This commit is contained in:
pengfei.zhou
2021-10-11 18:10:59 +08:00
committed by osborn
parent 8fd2477c81
commit 738c072ee4
20 changed files with 270 additions and 471 deletions

View File

@@ -3314,6 +3314,12 @@ __decorate$9([
Property,
__metadata$9("design:type", Array)
], ListItem.prototype, "actions", void 0);
exports.OtherItems = void 0;
(function (OtherItems) {
OtherItems[OtherItems["LoadMore"] = -10] = "LoadMore";
OtherItems[OtherItems["Header"] = -11] = "Header";
OtherItems[OtherItems["Footer"] = -12] = "Footer";
})(exports.OtherItems || (exports.OtherItems = {}));
class List extends Superview {
constructor() {
super(...arguments);
@@ -3326,18 +3332,26 @@ class List extends Superview {
if (this.loadMoreView) {
ret.push(this.loadMoreView);
}
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;
return this.nativeChannel(context, 'scrollToItem')({ index, animated, });
}
/**
* @param context
* @returns Returns the range of the visible views.
*/
findVisibleItems(context) {
return this.nativeChannel(context, 'findVisibleItems')();
}
/**
* @param context
* @returns Returns the range of the completely visible views.
*/
findCompletelyVisibleItems(context) {
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
}
reset() {
this.cachedViews.clear();
this.itemCount = 0;
@@ -3358,12 +3372,6 @@ 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();
}
}
@@ -3411,14 +3419,6 @@ __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);
@@ -3803,14 +3803,22 @@ class FlowLayout extends Superview {
if (this.loadMoreView) {
ret.push(this.loadMoreView);
}
if (this.header) {
ret.push(this.header);
}
if (this.footer) {
ret.push(this.footer);
}
return ret;
}
/**
* @param context
* @returns Returns the range of the visible views for each column.
*/
findVisibleItems(context) {
return this.nativeChannel(context, 'findVisibleItems')();
}
/**
* @param context
* @returns Returns the range of the completely visible views for each column.
*/
findCompletelyVisibleItems(context) {
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
}
reset() {
this.cachedViews.clear();
this.itemCount = 0;
@@ -3831,12 +3839,6 @@ class FlowLayout 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();
}
}
@@ -3892,14 +3894,6 @@ __decorate$5([
Property,
__metadata$5("design:type", Boolean)
], FlowLayout.prototype, "bounces", void 0);
__decorate$5([
Property,
__metadata$5("design:type", FlowLayoutItem)
], FlowLayout.prototype, "header", void 0);
__decorate$5([
Property,
__metadata$5("design:type", FlowLayoutItem)
], FlowLayout.prototype, "footer", void 0);
function flowlayout(config) {
const ret = new FlowLayout;
for (let key in config) {

File diff suppressed because one or more lines are too long