Closed jtong123 closed 9 months ago
`import React, { useState } from 'react'; import { Select } from '@douyinfe/semi-ui';
() => { let [value, setValue] = useState('xigua'); const handleChange = (value) => { console.info('value', value, value.label) let val = value.label setValue(val) } return ( <> <Select onChangeWithObject={true} value={value} style={{ width: '300px' }} onChange={handleChange} placeholder="受控的Select">
传的值格式不对。可以先看一下官网这个示例
"@douyinfe/semi-ui": "^2.45.1",
handleChange里value对象都能拿到,setValue失败