From 9348ffcb256179f2fa4c6309e9460c4b71407da5 Mon Sep 17 00:00:00 2001 From: Tyh2001 <1469442737@qq.com> Date: Tue, 19 Dec 2023 17:43:22 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20=E5=8F=91=E5=B8=83=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=200.66.1=20(2023-12-19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.en-US.md | 5 +++++ CHANGELOG.md | 5 +++++ docs/docs/changelog.md | 5 +++++ packages/fighting-design/_hooks/use-page/index.ts | 5 +++-- packages/fighting-design/package.json | 2 +- packages/fighting-design/pagination/src/pagination.vue | 2 +- start/src/App.vue | 2 +- 7 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index ad38b55fe2..509c2df1b5 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -4,6 +4,11 @@ English | [Chinese](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.md) +## 0.66.1 (2023-12-19) + +- Fix the issue of displaying page numbers incorrectly in the `f-pagination` component when the `total` is less than the `page-size` +- Fix the issue with the `f-pagination` component not executing `on-change` when executing `on-prev` and `on-text` callbacks + ## 0.66.0 (2023-12-18) - Fix the issue of the `f-table` component not breaking line styles for English letter text diff --git a/CHANGELOG.md b/CHANGELOG.md index 81c11824ce..77db9c297e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ 中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.en-US.md) +## 0.66.1 (2023-12-19) + +- 修复 `f-pagination` 组件在 `total` 小于 `page-size` 时候显示页码错误的问题 +- 修复 `f-pagination` 组件在执行 `on-prev` 和 `on-next` 回调的时候为执行 `on-change` 的问题 + ## 0.66.0 (2023-12-18) - 修复 `f-table` 组件对于英文字母的文字不换行样式的问题 diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index 81c11824ce..77db9c297e 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -2,6 +2,11 @@ 中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.en-US.md) +## 0.66.1 (2023-12-19) + +- 修复 `f-pagination` 组件在 `total` 小于 `page-size` 时候显示页码错误的问题 +- 修复 `f-pagination` 组件在执行 `on-prev` 和 `on-next` 回调的时候为执行 `on-change` 的问题 + ## 0.66.0 (2023-12-18) - 修复 `f-table` 组件对于英文字母的文字不换行样式的问题 diff --git a/packages/fighting-design/_hooks/use-page/index.ts b/packages/fighting-design/_hooks/use-page/index.ts index 8afb8c8ba1..5b316e2741 100644 --- a/packages/fighting-design/_hooks/use-page/index.ts +++ b/packages/fighting-design/_hooks/use-page/index.ts @@ -67,7 +67,6 @@ export const usePage = ( let showPrevMore = false /** 显示下一页更多 */ let showNextMore = false - /** 结果数组 */ const pageList: number[] = [] @@ -80,7 +79,7 @@ export const usePage = ( showNextMore = true } } else { - // 如果最大页码数小于 当前输入的pagerCount + // 如果最大页码数小于 当前输入的 pagerCount for (let i = 2; i < maxCount.value; i++) { pageList.push(i) } @@ -130,12 +129,14 @@ export const usePage = ( modelValue.currentModelValue.value = newCurrent run(prop.onNext, newCurrent, prop.pageSize) + run(prop.onChange, newCurrent, prop.pageSize) }, /**上一页切换 */ prev: (): void => { newCurrent = prop.current === 1 ? 1 : prop.current - 1 modelValue.currentModelValue.value = newCurrent run(prop.onPrev, newCurrent, prop.pageSize) + run(prop.onChange, newCurrent, prop.pageSize) } } as const diff --git a/packages/fighting-design/package.json b/packages/fighting-design/package.json index cd51be863c..a1301fcdc4 100644 --- a/packages/fighting-design/package.json +++ b/packages/fighting-design/package.json @@ -1,6 +1,6 @@ { "name": "fighting-design", - "version": "0.66.0", + "version": "0.66.1", "description": "Fighting design can quickly build interactive interfaces in vue3 applications, which looks good.", "keywords": [ "fighting", diff --git a/packages/fighting-design/pagination/src/pagination.vue b/packages/fighting-design/pagination/src/pagination.vue index b9e3a20947..7a88120a28 100644 --- a/packages/fighting-design/pagination/src/pagination.vue +++ b/packages/fighting-design/pagination/src/pagination.vue @@ -112,7 +112,7 @@
+