mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 04:58:55 +08:00
fix: should support nested list
This commit is contained in:
parent
66b974a10f
commit
c9aff0ac92
@ -5,6 +5,10 @@ import { Menu } from '../../';
|
|||||||
export function objectToComponent(object, index) {
|
export function objectToComponent(object, index) {
|
||||||
if (object === null) return;
|
if (object === null) return;
|
||||||
|
|
||||||
|
if (typeof object === 'string') {
|
||||||
|
return <span key={index}>{ object }</span>;
|
||||||
|
}
|
||||||
|
|
||||||
const children = object.children;
|
const children = object.children;
|
||||||
|
|
||||||
if (object.type === 'html') {
|
if (object.type === 'html') {
|
||||||
|
Loading…
Reference in New Issue
Block a user