knight-ui 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/component/input/Select.d.ts +2 -0
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -487,6 +487,9 @@ const options = [
|
|
|
487
487
|
<Select optionList={options} multiple defaultValue={["1", "2"]} max={3} />
|
|
488
488
|
<Select optionList={options} filter placeholder="搜索选择" />
|
|
489
489
|
<Select optionList={options} loading />
|
|
490
|
+
|
|
491
|
+
// 设置下拉可见选项数量(按每项约 30px 推算下拉高度,超出滚动)
|
|
492
|
+
<Select optionList={options} dropdownVisibleCount={6} />
|
|
490
493
|
```
|
|
491
494
|
|
|
492
495
|
子组件:`Select.Option`、`Select.OptGroup`
|
|
@@ -498,6 +501,7 @@ const options = [
|
|
|
498
501
|
| `filter` | `boolean` | `false` | 可搜索 |
|
|
499
502
|
| `max` | `number` | — | 多选最大数量 |
|
|
500
503
|
| `maxTagCount` | `number` | — | 最多显示标签数 |
|
|
504
|
+
| `dropdownVisibleCount` | `number` | — | 下拉可见选项数量(按每项约 30px 推算高度,默认 200px) |
|
|
501
505
|
| `onChange` | `(value) => void` | — | 变更回调 |
|
|
502
506
|
|
|
503
507
|
### Cascader 级联选择
|
|
@@ -52,6 +52,8 @@ export interface SelectProps extends UIProps {
|
|
|
52
52
|
max?: number;
|
|
53
53
|
/** 最多显示标签数(多选) */
|
|
54
54
|
maxTagCount?: number;
|
|
55
|
+
/** 下拉可见选项数量(按单选项约 30px 推算下拉高度, 默认 200px) */
|
|
56
|
+
dropdownVisibleCount?: number;
|
|
55
57
|
/** 自定义渲染选项 */
|
|
56
58
|
renderOptionItem?: (option: SelectOption) => React.ReactNode;
|
|
57
59
|
/** 自定义渲染触发器 */
|