Skip to content

[bug] SearchBar 搜索栏 的search 事件 在H5中会刷新当前页面 #1025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tqn911024 opened this issue Feb 23, 2022 · 2 comments
Closed
Assignees

Comments

@tqn911024
Copy link

问题描述

在使用搜索栏的时候,使用了search事件,在敲击回车或者使用手机软键盘的确认时候,触发的是页面刷新而非搜索事件

最小可复现仓库

<nut-searchbar v-model="searchValue" @submit="search">





搜索


预期的行为和实际行为

预期的行为 :敲击回车或者手机软键盘中的确定键,回调我输入的值
实际行为: 敲击回车或者手机软键盘中国的确定键,当前页面刷新

复现步骤,具体代码

H5中运行
<nut-searchbar v-model="searchValue" @submit="search">





搜索


相关环境信息

  • 操作系统
  • Node 版本
  • NutUI 版本:@nutui/[email protected]
  • Vue 版本: 3.0
  • 引用方式: npm ?
@bigpigOne
Copy link

@submit 改成 @search试试

@szg2008
Copy link
Contributor

szg2008 commented Feb 25, 2022

已修复v3.1.17

@szg2008 szg2008 closed this as completed Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants