2017-07-17 64 views
1

你能告訴我如何使用startYIonic refresher?我用過像下面那樣。但它不起作用?看來startYgetter唯一的方法沒有?我們不能設置一個值it.Which不好:(Ionic 3複習開始Y

我的使用情況:

在這個時刻,拉刷新可以從屏幕上的任何地方被觸發是有對離子的選擇手勢用於觸發時,拉下拉從屏幕最上部做只能

<ion-refresher (ionRefresh)="getData($event)" [pullMin]="180" startY="80"> 
    <ion-refresher-content pullingIcon="arrow-dropdown" pullingText="Pull to refresh" refreshingSpinner="crescent" refreshingText="Refreshing..."> 
    </ion-refresher-content> 
    </ion-refresher> 

回答

1

新:

這時你不能。他們將在未來提供此功能。 Set Refresher startY position

老:

這是在哪裏開始用戶拉複習頁面Y位置。你可以像這樣得到它。

refreshList(refresher) { 
    this.myService.getList().then((data) => { 
    console.log(refresher.startY); 
    refresher.complete(); 
    }); 
} 

我不認爲你可以設置一個像問題中的含義一樣的值。

+0

那是'getter'方法嗎?我怎樣才能根據我的用例來設置價值?我無法實現該用例嗎? – Sampath

+0

我認爲你可以選擇刷新或不考慮開始價值。但我想不出任何可以禁用拉下功能的方法。 – NuttLoose

+0

嗯..這是壞的。我問它作爲一個功能:https://github.com/ionic-team/ionic/issues/12387 – Sampath