nav组件下的option下的label属性支持表达式 #7430

This commit is contained in:
殷亮辉 2023-07-09 15:08:05 +00:00
parent b159a650e3
commit c2a8aee6ef

View File

@ -592,7 +592,7 @@ export class Navigation extends React.Component<
const label =
typeof link.label === 'string'
? link.label
? filter(link.label, data)
: React.isValidElement(link.label)
? React.cloneElement(link.label)
: render('inline', link.label as SchemaCollection);