Bug Type: Component
Environment
- Vue Version:
3.2.33
- Element Plus Version:
2.1.11
- Browser / OS:
Chrome/100.0.4896.127/ MacOS 10.15.7
- Build Tool:
Vite
Reproduction
Related Component
el-input
Reproduction Link
Element Plus Playground
Steps to reproduce
- set prop
disabled
of componentel-form
astrue
- set prop
disabled
of componentel-input
asfalse
What is Expected?
component el-input
is not disabled
What is actually happening?
component el-input
is disabled
Additional comments
(empty)
6条答案
按热度按时间mrwjdhj31#
I think the current performance is right.
y1aodyip2#
I think the current performance is right.
Wouldn't that apply to more scenarios if form-item could override form's disabled prop
wbrvyc0a3#
The default disabled prop values of
el-input
,el-button
andel-radio
components arefalse
. If they can override the disabled prop of the form, it will be meaningless to setdisabled = true
for the form.twh00eeo4#
If you could explict set form-item's disabled prop value as
undefined
, and change current useDisabled hook logic from() => disabled.value || unref(fallback) || form?.disabled || false
to() => disabled.value ?? unref(fallback) ??form?.disabled ?? false
, the following two scenarios will all work:disabled = true
will disabled the whole form.Sometimes there are always some kids who don't fit in, when a form-item's disabled logic not same as others, the independ disabled prop could take care of them.
x33g5p2x5#
WDYT? @JeremyWuuuuu
snz8szmq6#
同样的问题