Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
https://codesandbox.io/s/pQoyXymr2 这是演示。似乎 Dropdown 只收到一次 defaultValue ,之后没有改变,为什么?
defaultValue只会影响初始组件value,所以需要使用valueprop 来控制 Dropdown 的值。这遵循 React 的带有不受控制和受控组件的模式。
defaultValue
value