首页 > 解决方案 > reactJs中锚标签中require属性的意义是什么

问题描述

在浏览一些教程时,我遇到了两个anchortag inReactJS

  1. <a id="newtD" download={'Report'} href='./reports/product/myTest.xlsx' display = "none"></a>

  2. <a id="newtD" download={'Report'} href={require('./reports/product/myTest.xlsx')} display = "none"></a>

那么,这个require属性在里面有什么意义href呢?

谢谢。

标签: reactjsanchorhref

解决方案


推荐阅读