reactjs - reactJs中锚标签中require属性的意义是什么
问题描述
在浏览一些教程时,我遇到了两个anchor
tag inReactJS
<a id="newtD" download={'Report'} href='./reports/product/myTest.xlsx' display = "none"></a>
<a id="newtD" download={'Report'} href={require('./reports/product/myTest.xlsx')} display = "none"></a>
那么,这个require
属性在里面有什么意义href
呢?
谢谢。
解决方案
推荐阅读
- php - 在此服务器上找不到请求的地址“/登录”
- php - 匹配目标数组值并获取准确的图像标题以提取图像 ID
- javascript - 发出 AJAX 跨源请求时,如何防止“与没有 SameSite 属性的跨站点资源集关联的 cookie”警告?
- c - 即使通过指针分配,位域的大小也会被保存吗?
- javascript - 如何使用Javascript增加字符串的结尾
- google-cloud-data-fusion - Google Cloud Data Fusion 产生不一致的输出数据
- python - django 函数不减去所选数量
- django-urls - 在 django/passenger 中找不到 Url Persian
- python - 在 Python 中处理许多参数/类属性
- linear-programming - 在线性规划(ORTools)中转换 IF-ELSE 语句