mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-31 14:20:53 +08:00
fix: all components' exported props type's prop is readonly
This commit is contained in:
parent
cc0cdbecc1
commit
6b8e994526
@ -19,6 +19,7 @@
|
||||
- Fix `n-tree` may throw error on node selection `expanded-keys`, closes [#3319](https://github.com/TuSimple/naive-ui/issues/3319).
|
||||
- Fix `n-avatar` shows placeholder after load fails, closes [#3315](https://github.com/TuSimple/naive-ui/issues/3315).
|
||||
- Fix `n-input-number` register `mouseup` event multiple times when hold on button.
|
||||
- Fix all components' exported props type's prop is `readonly`.
|
||||
|
||||
### Feats
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
- 修复 `n-tree` 在选中节点时设定 `expanded-keys` 时可能会抛出异常,关闭 [#3319](https://github.com/TuSimple/naive-ui/issues/3319)
|
||||
- 修复 `n-avatar` 加载失败时依然显示 placeholder,关闭 [#3315](https://github.com/TuSimple/naive-ui/issues/3315)
|
||||
- 修复 `n-input-number` 按住按钮时重复注册 `mouseup` 事件
|
||||
- 修复所有组件导出的 props 类型属性都是 `readonly` 的
|
||||
|
||||
### Feats
|
||||
|
||||
|
@ -3,8 +3,12 @@ import { useTheme } from '../../_mixins'
|
||||
|
||||
type themePropKeys = keyof typeof useTheme.props
|
||||
|
||||
type RemoveReadonly<T> = {
|
||||
-readonly [key in keyof T]: T[key]
|
||||
}
|
||||
|
||||
export type ExtractPublicPropTypes<T> = Omit<
|
||||
Partial<ExtractPropTypes<T>>,
|
||||
Partial<RemoveReadonly<ExtractPropTypes<T>>>,
|
||||
| Exclude<themePropKeys, 'themeOverrides'>
|
||||
| Extract<keyof T, `internal${string}`>
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user