本文整理汇总了TypeScript中ionic-angular.Content.scrollTo方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Content.scrollTo方法的具体用法?TypeScript Content.scrollTo怎么用?TypeScript Content.scrollTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ionic-angular.Content
的用法示例。
在下文中一共展示了Content.scrollTo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
medias => {
// if (medias.length > 0) {
this.mediaList = medias;
// this.mediaList = [];
// for (var i = 0; i < medias.length; i++) {
// this.mediaList.push({
// Id: medias.item(i).Id,
// Author: medias.item(i).Author,
// Title: medias.item(i).Title,
// Description: medias.item(i).Description,
// Location: medias.item(i).Location,
// MediaDate: medias.item(i).MediaDate,
// UploadDate: medias.item(i).UploadDate,
// Active: medias.item(i).Active,
// SubCategoryId: medias.item(i).SubCategoryId,
// Downloaded: medias.item(i).Downloaded
// });
// }
// }
// this.mediaList = medias;
this.activeSC == subCategory.Id ? this.activeSC = 0 : this.activeSC = subCategory.Id;
// setTimeout(
// () => {
var pos = this.findPos(event.target);
this.content.scrollTo(pos.left, pos.top - 1, 100);
// }
// , 0);
return this.mediaList;
}
示例2:
this.notificationService.getNotificationListForTop(position, isNeedRegistNotExistsReadStatus, this.keyWord).then((data: any) => {
this.notificationListForTop = data;
this.isLoadCompleted = true;
this.isScrollToTopButtonVisible = false;
if (isRefresh) {
refresher.complete();
}
if (this.isFirstTimeLoad && data.length > 9) {
this.pageContent.scrollTo(0, 46);
this.isShowSearchBar = true;
this.isFirstTimeLoad = false;
}
});
示例3: guideLineContent5
public guideLineContent5(){
this.content.scrollTo(0, this.guideline5.nativeElement.offsetTop, 500);
}
示例4: scrollBottom
scrollBottom() {
//auto scroll page to bottom
let dimensions = this.content.getContentDimensions();
this.content.scrollTo(0, dimensions.scrollBottom, 0);
}