Skip to content

Commit

Permalink
fix(demo:pulltorefresh): fix demo pulltorefresh
Browse files Browse the repository at this point in the history
  • Loading branch information
BronzeCui committed Sep 30, 2018
1 parent ae2bc17 commit 8725c4b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/pull-to-refresh/demo/basic.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'demo-pull-to-refresh-basic',
template: `
<NoticeBar *ngIf="!isMobile"
style="margin-bottom: 10px"
[noticeBarcontent]="'该组件只支持Touch事件,请使用移动模式/设备打开此页。'"
[marqueeProps]="{fps: 100}"
></NoticeBar>
<div Button style="marginBottom: 15px" (onClick)="onClick()">direction: {{this.state.down ? 'down' : 'up'}}</div>
<PullToRefresh [ngStyle]="dtPullToRefreshStyle"
[direction]="this.state.down ? 'down' : 'up'" [indicator]="this.state.down ? {} : { deactivate: '上拉可以刷新' }"
[direction]="this.state.down ? 'down' : 'up'"
[indicator]="this.state.down ? {} : { deactivate: '上拉可以刷新' }"
(onRefresh)="pullToRefresh($event)"
>
<div *ngFor="let i of this.state.data" style="text-align: center; padding: 20px">{{i}}</div>
Expand All @@ -16,6 +23,7 @@ import { Component, OnInit } from '@angular/core';
`
})
export class DemoPullToRefreshBasicComponent implements OnInit {
isMobile = /Android|webOS|iPhone|iPod|BlackBerry/i.test(window.navigator.userAgent);
pageLimit = 100;
page = 0;
state = {
Expand Down

0 comments on commit 8725c4b

Please sign in to comment.