|
@@ -5,6 +5,7 @@ export struct RefreshView {
|
|
@Link isLoading: boolean
|
|
@Link isLoading: boolean
|
|
@Prop data: Array<ESObject>
|
|
@Prop data: Array<ESObject>
|
|
@Require keyGenerator?: (item: ESObject, index: number) => string
|
|
@Require keyGenerator?: (item: ESObject, index: number) => string
|
|
|
|
+ init: boolean = true
|
|
pageSize: number = 10
|
|
pageSize: number = 10
|
|
onLoadMore?: (pageNum: number) => void
|
|
onLoadMore?: (pageNum: number) => void
|
|
onRefresh?: () => void
|
|
onRefresh?: () => void
|
|
@@ -15,7 +16,9 @@ export struct RefreshView {
|
|
private _oTime: number = 0
|
|
private _oTime: number = 0
|
|
|
|
|
|
aboutToAppear(): void {
|
|
aboutToAppear(): void {
|
|
- this.onRefresh && this.onRefresh()
|
|
|
|
|
|
+ if (this.init) {
|
|
|
|
+ this.onRefresh && this.onRefresh()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
// 使用父组件@Builder装饰的方法初始化子组件@BuilderParam
|
|
// 使用父组件@Builder装饰的方法初始化子组件@BuilderParam
|