mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
fix(auto-complete): children
option type and export types (#1149)
* fix(auto-complete): `n-auto-complete` group should support common option * feat(auto-complete): export `AutoCompleteOption(s)` & `AutoCompleteGroupOption` * doc(auto-complete): update changelog Co-authored-by: 07akioni <07akioni2@gmail.com>
This commit is contained in:
parent
1eb55b41e8
commit
7dc040b489
@ -10,10 +10,12 @@
|
||||
- `n-time-picker` add `input-readonly` prop, closes [#1120](https://github.com/TuSimple/naive-ui/issues/1120).
|
||||
- `n-config-provider` add global config of the `Empty` component, closes [#1092](https://github.com/TuSimple/naive-ui/issues/1092).
|
||||
- `n-select` add `on-update:show` prop.
|
||||
- `n-auto-complete` exports `AutoCompleteOption`, `AutoCompleteOptions`, and `AutoCompleteGroupOption`.
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix `n-p` warns when `depth` is number.
|
||||
- Fix `n-auto-complete`'s `children` option to allow `AutoCompleteOption`.
|
||||
- Fix `n-select` can't override `n-empty`'s theme variables.
|
||||
- Fix `n-dynamic-tags` add button is not disabled when it is disabled.
|
||||
- Fix `n-select` closes menu when enter key is pressed in filterable mode without options data.
|
||||
|
@ -25,11 +25,13 @@
|
||||
- `useDialog` 选项新增 `style` 属性,关闭 [#1054](https://github.com/TuSimple/naive-ui/issues/1054)
|
||||
- `n-timeline` 新增 `icon` slot, 关闭 [#1096](https://github.com/TuSimple/naive-ui/issues/1096)
|
||||
- `n-timeline` 新增 `icon-size` 属性
|
||||
- `n-auto-complete` 导出 `AutoCompleteOption`,`AutoCompleteOptions`,以及 `AutoCompleteGroupOption`
|
||||
|
||||
### Fixes
|
||||
|
||||
- 修复 `n-step` 无法使用 `v-for` 的子元素
|
||||
- 修复 `n-input-number` 在 `step` 不为小数时不能输入小数
|
||||
- 修复 `n-auto-complete` 的 `children` 选项以允许 `AutoCompleteOption`
|
||||
|
||||
## 2.18.0 (2021-09-07)
|
||||
|
||||
|
@ -1,2 +1,7 @@
|
||||
export { default as NAutoComplete } from './src/AutoComplete'
|
||||
export type { AutoCompleteProps } from './src/AutoComplete'
|
||||
export type {
|
||||
AutoCompleteOption,
|
||||
AutoCompleteOptions,
|
||||
AutoCompleteGroupOption
|
||||
} from './src/interface'
|
||||
|
@ -3,7 +3,7 @@ import { SelectGroupOption, SelectBaseOption } from '../../select/src/interface'
|
||||
export type AutoCompleteOption = SelectBaseOption<string, string>
|
||||
export interface AutoCompleteGroupOption
|
||||
extends Omit<SelectGroupOption, 'children'> {
|
||||
children: string[]
|
||||
children: AutoCompleteOptions
|
||||
}
|
||||
|
||||
export type AutoCompleteOptions = Array<
|
||||
|
Loading…
Reference in New Issue
Block a user