From b58cbcca699e8681fc85222d10c2f1d0fc37e5d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=95=C3=85=D0=A1=C3=87=C3=AF?= Date: Thu, 29 Sep 2022 10:54:18 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=8A=A8=E7=94=BB=E6=89=A7=E8=A1=8C=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=9A=84=E6=8E=A5=E5=8F=A3setRefreshAnimDuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ets/components/PullToRefresh/PullToRefresh.ets | 6 +++--- .../PullToRefresh/PullToRefreshConfigurator.ets | 10 ++++++++++ entry/src/main/ets/pages/customConfig.ets | 1 + 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets index e085598..447fc9e 100644 --- a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets +++ b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets @@ -302,10 +302,10 @@ export struct PullToRefresh { if (this.value >= 1) { this.value -= 1; } else { - this.value += 0.01; + this.value += 10 / this.refreshConfigurator.getRefreshAnimDuration(); } - // 保留2位小数 - this.value = Math.round(this.value * 100) / 100; + // 保留3位小数 + this.value = Math.round(this.value * 1000) / 1000; // 刷新中动画采用系统组件,因此不用自己去执行动画 // 如果有刷新中动画回调,就执行刷新中动画回调 if (this.onAnimRefreshing) { diff --git a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefreshConfigurator.ets b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefreshConfigurator.ets index d0bfdf4..67932be 100644 --- a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefreshConfigurator.ets +++ b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefreshConfigurator.ets @@ -24,6 +24,7 @@ export class PullToRefreshConfigurator { private refreshBackgroundColor?: ResourceColor = 'rgba(0,0,0,0)'; // 下拉动画区域背景色 private refreshTextColor?: ResourceColor = '#999999'; // 下拉加载完毕后提示文本的字体颜色 private refreshTextSize?: number | string | Resource = 18; // 下拉加载完毕后提示文本的字体大小 + private refreshAnimDuration?:number = 1000; // 下拉动画执行一次的时间 private loadImgHeight?: number = 30; // 上拉图片高度 private loadBackgroundColor?: ResourceColor = 'rgba(0,0,0,0)'; // 上拉动画区域背景色 private loadTextColor?: ResourceColor = '#999999'; // 上拉文本的字体颜色 @@ -135,6 +136,15 @@ export class PullToRefreshConfigurator { return this.refreshTextSize; } + setRefreshAnimDuration(refreshAnimDuration: number) { + this.refreshAnimDuration = refreshAnimDuration; + return this; + } + + getRefreshAnimDuration() { + return this.refreshAnimDuration; + } + setLoadImgHeight(loadImgHeight: number) { this.loadImgHeight = loadImgHeight; return this; diff --git a/entry/src/main/ets/pages/customConfig.ets b/entry/src/main/ets/pages/customConfig.ets index 2c188d7..4444376 100644 --- a/entry/src/main/ets/pages/customConfig.ets +++ b/entry/src/main/ets/pages/customConfig.ets @@ -38,6 +38,7 @@ struct Index { .setRefreshBackgroundColor('#ffbbfaf5') // 下拉动画区域背景色 .setRefreshTextColor('red') // 下拉加载完毕后提示文本的字体颜色 .setRefreshTextSize(25) // 下拉加载完毕后提示文本的字体大小 + .setRefreshAnimDuration(1000) // 下拉动画执行一次的时间 .setLoadImgHeight(50) // 上拉图片高度 .setLoadBackgroundColor('#ffbbfaf5') // 上拉动画区域背景色 .setLoadTextColor('blue') // 上拉文本的字体颜色 -- Gitee From dd6c82c81d347de2946cb359e8cf45b1a2c4decd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=95=C3=85=D0=A1=C3=87=C3=AF?= Date: Thu, 29 Sep 2022 11:01:51 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E4=B8=8B=E6=8B=89=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E6=B6=88=E5=A4=B1=E6=97=B6=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PullToRefresh/PullToRefresh.ets | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets index 447fc9e..43de740 100644 --- a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets +++ b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets @@ -313,14 +313,13 @@ export struct PullToRefresh { } }, 10); this.onRefresh().then((refreshText) => { - this.state = IS_REFRESHED; - clearInterval(this.timer); - if (!this.customRefresh) { - this.refreshText = refreshText; - } if (refreshText.length == 0) { this.closeRefresh(); } else { + this.state = IS_REFRESHED; + if (!this.customRefresh) { + this.refreshText = refreshText; + } setTimeout(() => { this.closeRefresh(); }, 1000); @@ -354,7 +353,6 @@ export struct PullToRefresh { } }, 10); this.onLoadMore().then((loadText) => { - clearInterval(this.timer); this.closeLoad(); }); } @@ -452,14 +450,18 @@ export struct PullToRefresh { } private closeRefresh(): void{ + clearInterval(this.timer); animateTo({ duration: this.refreshConfigurator.getAnimDuration() }, () => { this.trYTop = 0; }); - this.state = IS_FREE; - this.refreshText = ''; + setTimeout(() => { + this.state = IS_FREE; + this.refreshText = ''; + }, this.refreshConfigurator.getAnimDuration()) } private closeLoad(): void{ + clearInterval(this.timer); animateTo({ duration: this.refreshConfigurator.getAnimDuration() }, () => { this.trYBottom = 0; }); -- Gitee From 35cfca1db7a641390eaae0c4f86ec8b41cd064a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=95=C3=85=D0=A1=C3=87=C3=AF?= Date: Thu, 29 Sep 2022 11:29:05 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=96=B0=E5=A2=9Edata=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=EF=BC=8C=E5=BD=93=E9=A1=B5=E9=9D=A2=E4=B8=AD=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E5=9C=B0=E6=96=B9=E5=AF=B9=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9=E6=97=B6=EF=BC=8C=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=86=85=E7=9A=84=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=BC=9A=E5=90=8C=E6=AD=A5=E5=88=B7=E6=96=B0UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/ets/components/PullToRefresh/PullToRefresh.ets | 1 + entry/src/main/ets/pages/customConfig.ets | 1 + entry/src/main/ets/pages/customRefreshAnim.ets | 1 + entry/src/main/ets/pages/quickStart.ets | 1 + 4 files changed, 4 insertions(+) diff --git a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets index 43de740..d25aff3 100644 --- a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets +++ b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets @@ -25,6 +25,7 @@ const IS_LOADING = 5; @Component export struct PullToRefresh { + @Link data: any; @BuilderParam customList: () => void; scroller: Scroller; refreshConfigurator?: PullToRefreshConfigurator; diff --git a/entry/src/main/ets/pages/customConfig.ets b/entry/src/main/ets/pages/customConfig.ets index 4444376..4940b2f 100644 --- a/entry/src/main/ets/pages/customConfig.ets +++ b/entry/src/main/ets/pages/customConfig.ets @@ -51,6 +51,7 @@ struct Index { build() { Column() { PullToRefresh({ + data:$data, // 必传项,需绑定传入主体布局内的列表或宫格组件 scroller: this.scroller, // 必传项,自定义主体布局,内部有列表或宫格组件 diff --git a/entry/src/main/ets/pages/customRefreshAnim.ets b/entry/src/main/ets/pages/customRefreshAnim.ets index 75571d7..0674f60 100644 --- a/entry/src/main/ets/pages/customRefreshAnim.ets +++ b/entry/src/main/ets/pages/customRefreshAnim.ets @@ -29,6 +29,7 @@ struct Index { build() { Column() { PullToRefresh({ + data:$data, // 必传项,需绑定传入主体布局内的列表或宫格组件 scroller: this.scroller, // 必传项,自定义主体布局,内部有列表或宫格组件 diff --git a/entry/src/main/ets/pages/quickStart.ets b/entry/src/main/ets/pages/quickStart.ets index fdfc52b..1176b5e 100644 --- a/entry/src/main/ets/pages/quickStart.ets +++ b/entry/src/main/ets/pages/quickStart.ets @@ -27,6 +27,7 @@ struct Index { build() { Column() { PullToRefresh({ + data:$data, // 必传项,需绑定传入主体布局内的列表或宫格组件 scroller: this.scroller, // 必传项,自定义主体布局,内部有列表或宫格组件 -- Gitee From f00e621c674f7a1f0518249e021036b1ba33f95d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=95=C3=85=D0=A1=C3=87=C3=AF?= Date: Thu, 29 Sep 2022 14:56:34 +0800 Subject: [PATCH 4/6] =?UTF-8?q?entry=E4=B8=AD=E4=BF=AE=E6=94=B9=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=8A=A8=E7=94=BB=E7=A4=BA=E4=BE=8B=EF=BC=88?= =?UTF-8?q?=E4=B8=89=E7=82=B9=E8=B7=B3=E5=8A=A8=E5=8A=A8=E7=94=BB=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PullToRefresh/PullToRefresh.ets | 4 +- entry/src/main/ets/pages/customConfig.ets | 9 +- .../src/main/ets/pages/customRefreshAnim.ets | 90 +++++++++++++------ entry/src/main/ets/pages/quickStart.ets | 10 +-- 4 files changed, 75 insertions(+), 38 deletions(-) diff --git a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets index d25aff3..cbc9837 100644 --- a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets +++ b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets @@ -85,7 +85,7 @@ export struct PullToRefresh { } } - initCanvas(): void { + private initCanvas(): void { if (this.refreshRingOx == 0) { this.canvasRefresh.strokeStyle = this.refreshConfigurator.getRefreshColor(); this.canvasRefresh.fillStyle = this.refreshConfigurator.getRefreshColor(); @@ -458,7 +458,7 @@ export struct PullToRefresh { setTimeout(() => { this.state = IS_FREE; this.refreshText = ''; - }, this.refreshConfigurator.getAnimDuration()) + }, this.refreshConfigurator.getAnimDuration()); } private closeLoad(): void{ diff --git a/entry/src/main/ets/pages/customConfig.ets b/entry/src/main/ets/pages/customConfig.ets index 4940b2f..71b26b3 100644 --- a/entry/src/main/ets/pages/customConfig.ets +++ b/entry/src/main/ets/pages/customConfig.ets @@ -51,13 +51,12 @@ struct Index { build() { Column() { PullToRefresh({ - data:$data, + // 必传项,列表组件所绑定的数据 + data: $data, // 必传项,需绑定传入主体布局内的列表或宫格组件 scroller: this.scroller, // 必传项,自定义主体布局,内部有列表或宫格组件 - customList: () => { - this.getListView(); - }, + customList: this.getListView, // 可选项,组件属性配置,具有默认值 refreshConfigurator: this.refreshConfigurator, // 可选项,容器宽,默认自适应 @@ -84,6 +83,8 @@ struct Index { }, 2000); }); }, + customLoad: null, + customRefresh: null, }) } .width('100%') diff --git a/entry/src/main/ets/pages/customRefreshAnim.ets b/entry/src/main/ets/pages/customRefreshAnim.ets index 0674f60..8a4afc2 100644 --- a/entry/src/main/ets/pages/customRefreshAnim.ets +++ b/entry/src/main/ets/pages/customRefreshAnim.ets @@ -12,7 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { PullToRefresh } from '@ohos/pulltorefresh' +import { PullToRefresh, PullToRefreshConfigurator } from '@ohos/pulltorefresh' + +const pointSpace = 30; +const pointJitterAmplitude = 10; @Entry @Component @@ -21,21 +24,30 @@ struct Index { private dataNumbers: string[] = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']; private dataStrings: string[] = ['我的评论', '与我相关', '个人中心1', '个人中心2', '个人中心3', '我的发布', '设置', '退出登录']; @State data: string[] = this.dataStrings; - @State isRefreshing: boolean = true; private scroller: Scroller = new Scroller(); + private refreshConfigurator?: PullToRefreshConfigurator = new PullToRefreshConfigurator(); private canvasSetting?: RenderingContextSettings = new RenderingContextSettings(true); private canvasRefresh?: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.canvasSetting); + private value1: number[] = []; + private value2: number[] = []; + + aboutToAppear() { + // 设置属性 + this.refreshConfigurator + .setRefreshAnimDuration(600) // 下拉动画执行一次的时间 + } build() { Column() { PullToRefresh({ - data:$data, + // 必传项,列表组件所绑定的数据 + data: $data, // 必传项,需绑定传入主体布局内的列表或宫格组件 scroller: this.scroller, // 必传项,自定义主体布局,内部有列表或宫格组件 - customList: () => { - this.getListView(); - }, + customList: this.getListView, + // 可选项,组件属性配置,具有默认值 + refreshConfigurator: this.refreshConfigurator, // 可选项,下拉刷新回调 onRefresh: () => { return new Promise((resolve, reject) => { @@ -62,37 +74,61 @@ struct Index { }, // 可选项,下拉中回调 onAnimPullDown: (value, width, height) => { - this.isRefreshing = false; - this.refreshText = '下拉中:' + value; + this.canvasRefresh.clearRect(0, 0, width, height); + if (value <= 0.33) { + this.drawPoint(width / 2, height / 2); + } else if (value <= 0.75) { + this.drawPoint(width / 2 - (pointSpace / 2 * (value - 0.33) / (0.75 - 0.33)), height / 2); + this.drawPoint(width / 2 + (pointSpace / 2 * (value - 0.33) / (0.75 - 0.33)), height / 2); + } else { + this.drawPoint(width / 2, height / 2); + this.drawPoint(width / 2 - pointSpace / 2 - (pointSpace / 2 * (value - 0.75) / (1 - 0.75)), height / 2); + this.drawPoint(width / 2 + pointSpace / 2 + (pointSpace / 2 * (value - 0.75) / (1 - 0.75)), height / 2); + } }, // 可选项,刷新中回调 onAnimRefreshing: (value, width, height) => { - this.isRefreshing = true; this.canvasRefresh.clearRect(0, 0, width, height); - this.canvasRefresh.fillRect(0, height * 3 / 4 / 2, width * value, height / 4); - } + // 将value值由0到1循环变化变为-1到1反复变化 + value = Math.abs(value * 2 - 1) * 2 - 1; + // 绘制第1个点 + this.drawPoint(width / 2 - pointSpace, height / 2 + pointJitterAmplitude * value); + // 绘制第2个点 + if (this.value1.length == 7) { + this.drawPoint(width / 2, height / 2 + pointJitterAmplitude * this.value1[0]); + this.value1 = this.value1.splice(1, this.value1.length); + } else { + this.drawPoint(width / 2, height / 2 + pointJitterAmplitude); + } + this.value1.push(value); + // 绘制第3个点 + if (this.value2.length == 14) { + this.drawPoint(width / 2 + pointSpace, height / 2 + pointJitterAmplitude * this.value2[0]); + this.value2 = this.value2.splice(1, this.value2.length); + } else { + this.drawPoint(width / 2 + pointSpace, height / 2 + pointJitterAmplitude); + } + this.value2.push(value); + }, + customLoad: null, }) } } + private drawPoint(x: number, y: number): void{ + this.canvasRefresh.beginPath(); + this.canvasRefresh.arc(x, y, 3, 0, Math.PI * 2); + this.canvasRefresh.fill(); + } + @Builder private customRefreshView() { - Stack() { - Text(this.refreshText) - .width('100%') - .height('100%') - .fontSize(16) - .fontColor('red') - .textAlign(TextAlign.Center) - .visibility(this.isRefreshing ? Visibility.Hidden : Visibility.Visible) - Canvas(this.canvasRefresh) - .width('100%') - .height('100%') - .onReady(() => { - this.canvasRefresh.fillStyle = '#7bff80'; - }) - .visibility(this.isRefreshing ? Visibility.Visible : Visibility.Hidden) - } + Canvas(this.canvasRefresh) + .width('100%') + .height('100%') + .onReady(() => { + this.canvasRefresh.fillStyle = 'red'; + }) } @Builder diff --git a/entry/src/main/ets/pages/quickStart.ets b/entry/src/main/ets/pages/quickStart.ets index 1176b5e..4d2f539 100644 --- a/entry/src/main/ets/pages/quickStart.ets +++ b/entry/src/main/ets/pages/quickStart.ets @@ -27,14 +27,12 @@ struct Index { build() { Column() { PullToRefresh({ - data:$data, + // 必传项,列表组件所绑定的数据 + data: $data, // 必传项,需绑定传入主体布局内的列表或宫格组件 scroller: this.scroller, // 必传项,自定义主体布局,内部有列表或宫格组件 - customList: () => { - // 一个用@Builder修饰过的UI方法 - this.getListView(); - }, + customList: this.getListView, // 可选项,下拉刷新回调 onRefresh: () => { return new Promise((resolve, reject) => { @@ -55,6 +53,8 @@ struct Index { }, 2000); }); }, + customLoad: null, + customRefresh: null, }) } } -- Gitee From 16345677ef0193a3df1153f6eb093e5260027f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=95=C3=85=D0=A1=C3=87=C3=AF?= Date: Thu, 29 Sep 2022 15:03:28 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=AE=8C=E5=96=84readme=EF=BC=88=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E4=BA=86=E4=B8=80=E4=B8=AAdata=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=AF=B4=E6=98=8E=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/ets/components/PullToRefresh/PullToRefresh.ets | 2 +- README.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets index cbc9837..d698d5d 100644 --- a/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets +++ b/PullToRefresh/src/main/ets/components/PullToRefresh/PullToRefresh.ets @@ -26,8 +26,8 @@ const IS_LOADING = 5; @Component export struct PullToRefresh { @Link data: any; - @BuilderParam customList: () => void; scroller: Scroller; + @BuilderParam customList: () => void; refreshConfigurator?: PullToRefreshConfigurator; mWidth?: Length = undefined; mHeight?: Length = undefined; diff --git a/README.md b/README.md index 2c7ec4c..35fdd2e 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ import { PullToRefresh } from '@ohos/pulltorefresh' private scroller: Scroller = new Scroller(); PullToRefresh({ +// 必传项,列表组件所绑定的数据 +data: $data, // 必传项,需绑定传入主体布局内的列表或宫格组件 scroller: this.scroller, // 必传项,自定义主体布局,内部有列表或宫格组件 @@ -67,8 +69,9 @@ onLoadMore: () => { ### PullToRefresh组件属性 -| 属性 | 类型 | 释义 | 默认值 | +| 属性 | 类型 | 释义 | 默认值 | | :------------------:| :-------------------------------------------------------------: | :---------------------------: | :----------------------------: | +| data | any | 列表或宫格组件所绑定的数据 | undefined | | scroller | Scroller | 列表或宫格组件所绑定的Scroller对象 | undefined | | customList | ```() => void ``` | 自定义主体布局,内部有列表或宫格组件 | undefined | | refreshConfigurator | PullToRefreshConfigurator | 组件属性配置 | PullToRefreshConfigurator | -- Gitee From f6b695d760e967aed433ea31277912fec562d8f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=95=C3=85=D0=A1=C3=87=C3=AF?= Date: Tue, 11 Oct 2022 09:25:37 +0800 Subject: [PATCH 6/6] =?UTF-8?q?npm=E5=8F=91=E5=B8=831.0.1=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PullToRefresh/package.json | 2 +- README.md | 2 ++ changelog.md | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/PullToRefresh/package.json b/PullToRefresh/package.json index 840d02e..7c5223e 100644 --- a/PullToRefresh/package.json +++ b/PullToRefresh/package.json @@ -13,7 +13,7 @@ }, "main": "", "repository": "https://gitee.com/openharmony-sig/PullToRefresh", - "version": "1.0.0", + "version": "1.0.1", "dependencies": {}, "license": "Apache License 2.0", "devDependencies": {} diff --git a/README.md b/README.md index 35fdd2e..9c9daac 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ onLoadMore: () => { }, 2000); }); }, +customLoad: null, +customRefresh: null, }) ``` diff --git a/changelog.md b/changelog.md index d42381b..2d75898 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +## 1.0.1 +1.新增设置下拉动画执行时间的接口setRefreshAnimDuration + +2.新增data属性,当页面中其他地方对列表数据进行修改时,组件内的列表组件会同步刷新UI + ## 1.0.0 1.支持下拉刷新 -- Gitee