Skip to content
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

表格 可编辑行 编辑状态下 编辑单元格内点回车 该单元格就会退出可编辑状态 #258

Closed
tky753 opened this issue Feb 8, 2021 · 2 comments

Comments

@tky753
Copy link

tky753 commented Feb 8, 2021

Subject of the issue

如题

Your environment

  • OS: Win10, Chrome 88
  • Packages: -
  • Env: -

Steps to reproduce

https://vvbin.cn/next/#/comp/table/editRowTable
image
image

Expected behaviour

点回车要么没反应,要么和tab一样跳到下一个编辑框

Actual behaviour

当前单元格退出可编辑状态

@tky753
Copy link
Author

tky753 commented Feb 9, 2021

@anncwb 看了你的这个修改,发现会导致另一个问题,如果没有触发 handleSubmit,那么这个录入控件的值就不会赋值给record,
导致点保存的时候,传入的record是空的,你可以在
https://vvbin.cn/next/#/page-demo/form/high
这个页面的最后试试:
在 PersonTable.vue 加上这句
image
image
image

@tky753
Copy link
Author

tky753 commented Feb 9, 2021

我知道了,必须要先执行 await record.onEdit?.(false, true); 才会把数据写入record,之后再发送保存请求,然后还要记得try catch,保存出错的话删除记录或者在finally里reload

@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants