Closed kobehhh closed 2 months ago
import React from 'react' import ReactDOM from 'react-dom' import { Select } from '@kdcloudjs/kdesign' const Demo = () => { const { Option } = Select const options = [ { children: '苹果', value: 'apple' }, { children: '橘子', value: 'orange' }, { children: '葡萄', value: 'grape' }, { children: '柠檬', value: 'lemon' }, { children: '西瓜', value: 'watermelon' }, { children: '草莓', value: 'strawberry' }, { children: '香蕉', value: 'banana' }, { children: '哈密瓜', value: 'cantaloupe' }, { children: '菠萝', value: 'pineapple' }, { children: '蓝莓', value: 'blueberry' } ] const handleChange = (value) => { console.log(value) } const style = { width: 230 } return ( <> <Select placeholder="请输入名称" mode="multiple" defaultValue={['apple', 'strawberry']} style={style} borderType="bordered" optionFilterProp="children" onChange={handleChange}> {options.map((item) => { return ( <Option value={item.value} key={item.value}> {item.children} </Option> ) })} </Select> </> ) } ReactDOM.render(<Demo />, mountNode)
组件库与浏览器均为最新版本
重现链接或代码
重现问题步骤
期望的结果是什么
实际的结果是什么
组件库版本号、浏览器信息
组件库与浏览器均为最新版本