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

表单重置问题 #397

Closed
zuihou opened this issue Apr 17, 2024 · 2 comments
Closed

表单重置问题 #397

zuihou opened this issue Apr 17, 2024 · 2 comments

Comments

@zuihou
Copy link

zuihou commented Apr 17, 2024

在这个例子中,点击左边数据后,右边的表格会根据左边选择的 年级id 进行查询。

但 点击右边的重置按钮时, 年级id 也会被重置。

有没有办法在 点击右边的重置按钮时,年级id 不被重置?

image
@greper
Copy link
Contributor

greper commented Jun 8, 2024

设置右侧子表格的initialForm即可

asideTableRef.value.crudBinding.search.initialForm = { gradeId: id };

@greper greper closed this as completed Jun 8, 2024
@zuihou
Copy link
Author

zuihou commented Jun 9, 2024

不知道是我没写对还是什么原因,设置initialForm 始终不生效

最终解决办法是重写: transformQuery 方法,在该方法中固定 gradeId 等参数

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

2 participants