mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 12:08:13 +08:00
修复ts校验问题
This commit is contained in:
parent
570d393b76
commit
67f3fad1ce
@ -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});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user