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