首页 > 解决方案 > TypeError:无法读取未定义的属性(读取“工具提示”)

问题描述

我在我 的项目中使用 React:“^17.0.2”版本,打字稿:“^4.4.3”版本,材料设计:“^5.0.3”版本。我想在项目中添加工具提示时出现以下错误TypeError :

我的代码就像:

<Grid item xs={12} md={4} lg={5}>
   <div className="contactSection">
      <div className="title_wrapper">
        <p>Contact us</p>
        <div className="border" />
      </div>

      <ul className="contact_lists">
        <li>
          <div className="icon_wrapper">
            <div className="circle" />
            <IoLocationOutline className="icon" />
          </div>

          <Tooltip title="See on Google Map" placement="top">
            <div className="contact_text">
              <a href="https://g.page/hamro-technology-pvt--ltd-?share" target="_blank">
                Kalanki, Kathmandu, Nepal
              </a>
            </div>
          </Tooltip>
        </li>
        ....
    </ul>
  </div>
</Grid>

它抛出以下类型错误 在此处输入图像描述

这个问题怎么解决??

标签: reactjstypescriptmaterial-uitooltip

解决方案


推荐阅读