mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
fix(p): warns when depth
is number
This commit is contained in:
parent
a61efd370a
commit
b731e52dfc
@ -9,6 +9,10 @@
|
||||
- `n-date-picker` add `input-readonly` prop, closes [#1120](https://github.com/TuSimple/naive-ui/issues/1120).
|
||||
- `n-time-picker` add `input-readonly` prop, closes [#1120](https://github.com/TuSimple/naive-ui/issues/1120).
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix `n-p` warns when `depth` is number.
|
||||
|
||||
## 2.18.1 (2021-09-08)
|
||||
|
||||
### Feats
|
||||
|
@ -9,6 +9,10 @@
|
||||
- `n-date-picker` 新增 `input-readonly` 属性,关闭 [#1120](https://github.com/TuSimple/naive-ui/issues/1120)
|
||||
- `n-time-picker` 新增 `input-readonly` 属性,关闭 [#1120](https://github.com/TuSimple/naive-ui/issues/1120)
|
||||
|
||||
### Fixes
|
||||
|
||||
- 修复 `n-p` `depth` 传入 number 报错
|
||||
|
||||
## 2.18.1 (2021-09-08)
|
||||
|
||||
### Feats
|
||||
|
@ -13,7 +13,7 @@ text
|
||||
router-link
|
||||
```
|
||||
|
||||
## Props
|
||||
## API
|
||||
|
||||
### Text Props
|
||||
|
||||
@ -54,8 +54,6 @@ router-link
|
||||
| ---------- | --------- | ------- | ----------- |
|
||||
| align-text | `boolean` | `false` | Text align. |
|
||||
|
||||
## Slots
|
||||
|
||||
### All Typography Components
|
||||
|
||||
| Name | Parameters | Description |
|
||||
|
@ -13,7 +13,7 @@ text
|
||||
router-link
|
||||
```
|
||||
|
||||
## Props
|
||||
## API
|
||||
|
||||
### Text Props
|
||||
|
||||
@ -54,9 +54,7 @@ router-link
|
||||
| ---------- | --------- | ------- | -------- |
|
||||
| align-text | `boolean` | `false` | 文本对齐 |
|
||||
|
||||
## Slots
|
||||
|
||||
### All Typography Components
|
||||
### All Typography Components Slots
|
||||
|
||||
| 名称 | 参数 | 说明 |
|
||||
| ------- | ---- | ---------- |
|
||||
|
@ -8,10 +8,7 @@ import type { ExtractPublicPropTypes } from '../../_utils'
|
||||
|
||||
const blockquoteProps = {
|
||||
...(useTheme.props as ThemeProps<TypographyTheme>),
|
||||
alignText: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
alignText: Boolean
|
||||
} as const
|
||||
|
||||
export type BlockquoteProps = ExtractPublicPropTypes<typeof blockquoteProps>
|
||||
|
@ -8,10 +8,7 @@ import style from './styles/list.cssr'
|
||||
|
||||
const olProps = {
|
||||
...(useTheme.props as ThemeProps<TypographyTheme>),
|
||||
alignText: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
alignText: Boolean
|
||||
}
|
||||
|
||||
export type OlProps = ExtractPublicPropTypes<typeof olProps>
|
||||
|
@ -8,7 +8,7 @@ import type { ExtractPublicPropTypes } from '../../_utils'
|
||||
|
||||
const pProps = {
|
||||
...(useTheme.props as ThemeProps<TypographyTheme>),
|
||||
depth: String as PropType<1 | 2 | 3 | '1' | '2' | '3' | undefined>
|
||||
depth: [String, Number] as PropType<1 | 2 | 3 | '1' | '2' | '3'>
|
||||
}
|
||||
|
||||
export type PProps = ExtractPublicPropTypes<typeof pProps>
|
||||
|
@ -17,38 +17,17 @@ import style from './styles/text.cssr'
|
||||
|
||||
const textProps = {
|
||||
...(useTheme.props as ThemeProps<TypographyTheme>),
|
||||
code: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
code: Boolean,
|
||||
type: {
|
||||
type: String,
|
||||
default: 'default'
|
||||
},
|
||||
delete: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
strong: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
italic: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
underline: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
depth: {
|
||||
type: [String, Number] as PropType<1 | 2 | 3 | '1' | '2' | '3' | undefined>,
|
||||
default: undefined
|
||||
},
|
||||
tag: {
|
||||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
delete: Boolean,
|
||||
strong: Boolean,
|
||||
italic: Boolean,
|
||||
underline: Boolean,
|
||||
depth: [String, Number] as PropType<1 | 2 | 3 | '1' | '2' | '3'>,
|
||||
tag: String,
|
||||
// deprecated
|
||||
as: {
|
||||
type: String,
|
||||
|
@ -8,10 +8,7 @@ import type { ExtractPublicPropTypes } from '../../_utils'
|
||||
|
||||
const ulProps = {
|
||||
...(useTheme.props as ThemeProps<TypographyTheme>),
|
||||
alignText: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
alignText: Boolean
|
||||
} as const
|
||||
|
||||
export type UlProps = ExtractPublicPropTypes<typeof ulProps>
|
||||
|
Loading…
Reference in New Issue
Block a user