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

@@ -2316,6 +2316,12 @@ var ListItem = /** @class */ (function (_super) {
], ListItem.prototype, "actions", void 0);
return ListItem;
}(Stack));
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 = {}));
var List = /** @class */ (function (_super) {
__extends$c(List, _super);
function List() {
@@ -2330,18 +2336,26 @@ var List = /** @class */ (function (_super) {
if (this.loadMoreView) {
ret.push(this.loadMoreView);
}
if (this.header) {
ret.push(this.header);
}
if (this.footer) {
ret.push(this.footer);
}
return ret;
};
List.prototype.scrollToItem = function (context, index, config) {
var animated = config === null || config === void 0 ? void 0 : config.animated;
return this.nativeChannel(context, 'scrollToItem')({ index: index, animated: animated, });
};
/**
* @param context
* @returns Returns the range of the visible views.
*/
List.prototype.findVisibleItems = function (context) {
return this.nativeChannel(context, 'findVisibleItems')();
};
/**
* @param context
* @returns Returns the range of the completely visible views.
*/
List.prototype.findCompletelyVisibleItems = function (context) {
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
};
List.prototype.reset = function () {
this.cachedViews.clear();
this.itemCount = 0;
@@ -2363,12 +2377,6 @@ var List = /** @class */ (function (_super) {
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.prototype.toModel.call(this);
};
__decorate$9([
@@ -2415,14 +2423,6 @@ var List = /** @class */ (function (_super) {
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);
return List;
}(Superview));
function list(config) {
@@ -2952,14 +2952,22 @@ var FlowLayout = /** @class */ (function (_super) {
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.
*/
FlowLayout.prototype.findVisibleItems = function (context) {
return this.nativeChannel(context, 'findVisibleItems')();
};
/**
* @param context
* @returns Returns the range of the completely visible views for each column.
*/
FlowLayout.prototype.findCompletelyVisibleItems = function (context) {
return this.nativeChannel(context, 'findCompletelyVisibleItems')();
};
FlowLayout.prototype.reset = function () {
this.cachedViews.clear();
this.itemCount = 0;
@@ -2981,12 +2989,6 @@ var FlowLayout = /** @class */ (function (_super) {
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.prototype.toModel.call(this);
};
__decorate$5([
@@ -3041,14 +3043,6 @@ var FlowLayout = /** @class */ (function (_super) {
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);
return FlowLayout;
}(Superview));
function flowlayout(config) {

View File

@@ -1739,6 +1739,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);
@@ -1751,18 +1757,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;
@@ -1783,12 +1797,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();
}
}
@@ -1836,14 +1844,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);
@@ -2228,14 +2228,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;
@@ -2256,12 +2264,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();
}
}
@@ -2317,14 +2319,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) {

View File

@@ -3260,6 +3260,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);
@@ -3272,18 +3278,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;
@@ -3304,12 +3318,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();
}
}
@@ -3357,14 +3365,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);
@@ -3749,14 +3749,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;
@@ -3777,12 +3785,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();
}
}
@@ -3838,14 +3840,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) {