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

a-form 表单禁用时 Upload 仍然可操作 #7109

Closed
1 task
ADMINnhanh opened this issue Nov 14, 2023 · 5 comments
Closed
1 task

a-form 表单禁用时 Upload 仍然可操作 #7109

ADMINnhanh opened this issue Nov 14, 2023 · 5 comments
Labels

Comments

@ADMINnhanh
Copy link

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

Version

4.0.7

Environment

win10, 谷歌浏览器 119.0.6045.124(正式版本) (64 位)

Reproduction link

https://antdv.com/components/form-cn#components-form-demo-disabled

Steps to reproduce

官网的例子就有这个情况

What is expected?

Upload 除了预览操作外的操作全部禁止

What is actually happening?

Upload 仍然可上传

@puppet-666
Copy link
Contributor

link #7047 似乎与这个pr有点关系 @kovsu

@puppet-666
Copy link
Contributor

应该 disabled.value || disabledContext.value ?

@kovsu
Copy link
Member

kovsu commented Nov 15, 2023

没有这个的问题就是把 disabled: false 移除就行了,因为 ?? 这个只有在 null 和 undefined 才会走下一个,这里直接给了 false 才导致没取到 form 的 disabled

@puppet-666
Copy link
Contributor

我理解上面的修改,上面想表达的是尽量对齐一下,默认为false,disable: false 移除后对代码是没有问题
1700020719992

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants