reactjs - React - 冒号被替换

标签 reactjs url

谁能解释一下,为什么在这种情况下要替换冒号?

<div className="col-6 text-left">
{
    hasHomepage && 
    <a href={'http://' + this.props.productGroup.supplierWebsite} target="_blank">
        {this.props.productGroup.supplierName}
    </a>
}
{
    !hasHomepage &&
    this.props.productGroup.supplierName
}
</div> 

渲染时的结果是:

enter image description here

这是一个已知问题还是我错过了什么?

最佳答案

您看到的是this.props.productGroup.supplierName的内容,您添加http://的地方不会显示在浏览器内容中

关于reactjs - React - 冒号被替换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51966804/

相关文章:

reactjs - 如何将 Gatsby-Image 作为属性发送到组件

reactjs - npx create-react-app myapp 命令抛出错误

python - 为什么我需要在路径转换器中使用 to_url() 方法? Django

javascript - 使用 Django/Django.js 和 WSGIScriptAlias 进行 URL 反向

php - 如何在 PHP 中通过 url 发送数组值?

reactjs - 为什么react应用程序中的代码覆盖率是空的?尝试使用 npm run test -- --coverage。但总是显示空代码覆盖率

reactjs - React-redux 与 re-base-firebase。好主意?

node.js - 如何在客户端正确显示服务器请求的数据

python - Django 导入错误,URLS 和 ROOT_URLCONF 混淆

url - 是否有用于将短网址翻译回常规链接的 API?