Skip to content

The form component scrollToFirstError is obscured after scrolling #3889

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
1 task
xiaoxiaoyu995 opened this issue Apr 1, 2021 · 4 comments
Closed
1 task
Assignees

Comments

@xiaoxiaoyu995
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.1.1

Environment

vue3

Reproduction link

Edit on CodeSandbox

Steps to reproduce

在form加上scrollToFirstError属性 点击按钮后第一个错误字段被遮挡。
页面头部有position: sticky;或fixed 属性都会出问题

What is expected?

第一个错误字段不被遮挡

What is actually happening?

第一个错误字段被遮挡


scrollToFirstError加上配置

@github-actions github-actions bot changed the title form组件scrollToFirstError滚动之后被遮挡 The form component scrollToFirstError is obscured after scrolling Apr 1, 2021
@John60676
Copy link
Member

可以使用 scrollToField方法来自己实现,通过第二个参数传入 options

参考:https://codesandbox.io/s/keen-haze-vbm9f?file=/src/App.vue

@John60676
Copy link
Member

后面支持一下能够通过 scrollToFirstError 传入 options

@shengq666
Copy link

如果我的表单是属于那种嵌套的应该怎么处理呢,我看了你的demo ,发现并不行,w我的erro信息大致是这样的
image

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants