Open f3liiix opened 5 months ago
react-vant
react-vant-icons
3.3.5
No response
默认值 defaultValue 依然有问题
const areas = [ { text: '武汉', value: 1 }, { text: '长沙', value: 2 }, { text: '成都', value: 3 }, ]
const [value, setValue] = useState<Record<string, string | number>>({})
`<DropdownMenu className='areas' value={value} defaultValue={{text: '武汉', value: 1}} onChange={v => setValue(v)}>
<DropdownMenu.Item name='value1' options={areas}/> </DropdownMenu> 把value1改成value即可
<DropdownMenu.Item name='value1' options={areas}/> </DropdownMenu>
Which React Vant packages are impacted?
react-vant
(React Vant core)react-vant-icons
(React Vant Icon)What version of React Vant are you using?
3.3.5
Reproduce live demo(codesandebox or stackblitz)?
No response
Descripition
默认值 defaultValue 依然有问题
const areas = [ { text: '武汉', value: 1 }, { text: '长沙', value: 2 }, { text: '成都', value: 3 }, ]
const [value, setValue] = useState<Record<string, string | number>>({})
`<DropdownMenu className='areas' value={value} defaultValue={{text: '武汉', value: 1}} onChange={v => setValue(v)}>