From 67f3fad1ce3c00d778899f3e9a6225a0875cbe2c Mon Sep 17 00:00:00 2001 From: miaoxinyu01 Date: Tue, 24 Oct 2023 11:50:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dts=E6=A0=A1=E9=AA=8C=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-ui/src/components/Pagination.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/amis-ui/src/components/Pagination.tsx b/packages/amis-ui/src/components/Pagination.tsx index e9258ebb8..65c43089d 100644 --- a/packages/amis-ui/src/components/Pagination.tsx +++ b/packages/amis-ui/src/components/Pagination.tsx @@ -250,13 +250,13 @@ export class Pagination extends React.Component< const lastPage = this.getLastPage(); let value = e.currentTarget.value; - const {dispatchEvent} = this.props; - await dispatchEvent?.('change', resolveEventData(this.props, {value})); - if (/^\d+$/.test(value) && parseInt(value, 10) > lastPage) { value = String(lastPage); } + const {dispatchEvent} = this.props; + await dispatchEvent?.('change', resolveEventData(this.props, {value})); + this.setState({pageNum: value}); }