mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
fix(step): fix steps doesn't work with v-for children (#1119)
Co-authored-by: 07akioni <07akioni2@gmail.com>
This commit is contained in:
parent
6f985e810c
commit
0a4872df9a
@ -2,6 +2,10 @@
|
||||
|
||||
## Pending
|
||||
|
||||
### Fixes
|
||||
|
||||
- Fix `n-step` doesn't work with `v-for` children.
|
||||
|
||||
### Feats
|
||||
|
||||
- `useDialog` option add `style` prop, closes [#1054](https://github.com/TuSimple/naive-ui/issues/1054).
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
## Pending
|
||||
|
||||
### Fixes
|
||||
|
||||
- 修复 `n-step` 无法使用 `v-for` 的子元素
|
||||
|
||||
### Feats
|
||||
|
||||
- `useDialog` 选项新增 `style` 属性,关闭 [#1054](https://github.com/TuSimple/naive-ui/issues/1054)
|
||||
|
@ -14,7 +14,7 @@ import type { MergedTheme, ThemeProps } from '../../_mixins'
|
||||
import { useConfig, useTheme } from '../../_mixins'
|
||||
import { stepsLight } from '../styles'
|
||||
import style from './styles/index.cssr'
|
||||
import { ExtractPublicPropTypes, getSlot } from '../../_utils'
|
||||
import { ExtractPublicPropTypes, flatten, getSlot } from '../../_utils'
|
||||
import type { StepsTheme } from '../styles'
|
||||
|
||||
function stepWithIndex (step: VNodeChild, i: number): VNode | null {
|
||||
@ -87,7 +87,7 @@ export default defineComponent({
|
||||
this.vertical && `${mergedClsPrefix}-steps--vertical`
|
||||
]}
|
||||
>
|
||||
{stepsWithIndex(getSlot(this))}
|
||||
{stepsWithIndex(flatten(getSlot(this)))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user