fix(Pagination): block default events for the enter key (#7368)

* fix(Pagination): block default events for the enter key

* refactor: consider other keyboard events
pull/7516/head
selicens 2024-04-19 22:44:34 +08:00 committed by GitHub
parent 2b41e56520
commit 4815ee6f20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -283,6 +283,7 @@ export default defineComponent({
},
runIfEnter(event, callback, ...restParams) {
if (event.key === 'Enter' || event.charCode === 13) {
event.preventDefault();
callback(...restParams);
}
},