Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

面包屑组件的节点title可传入ReactNode,但实际只能传入文本 #917

Closed
XaviZhang-jy opened this issue Oct 28, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@XaviZhang-jy
Copy link

重现链接或代码

import React from 'react'
import ReactDOM from 'react-dom'
import { Breadcrumb } from '@kdcloudjs/kdesign'
const Demo = () => {
  // 改下面的代码
  const config = [
    {
      title:<div>KDesign</div>,
      href: '#'
    },
    {
      title: <div>KDesign</div>,
      href: '#'
    },
    {
      title:<div>KDesign</div>
    }
  ]
  return <Breadcrumb items={config} />
}
ReactDOM.render(<Demo />, mountNode)

重现问题步骤

将此代码贴到任一组件的演示代码中,无法正确渲染

期望的结果是什么

面包屑节点正确渲染传入的ReactNode

实际的结果是什么

根据文档描述,面包屑组件的节点title可传入ReactNode,但实际只能传入文本

组件库版本号、浏览器信息

组件库与浏览器均为最新版本

@albyben albyben added the bug Something isn't working label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants