本文整理匯總了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);
}