繁体   English   中英

在html内插入组件

[英]Insert component inside html

我想在<a>阳台内添加组件的渲染。

我有一个组成部分:

import Tableau from "./tableauCOlonnes.jsx";

class Views_Default_Mapping extends React.Component {
    render() {
    var liste_colonnes = ["Nom", "Age", "Taille"];
    const html = 

    return (

        <div className="div_mapping">
            <ul>
                <li>
                    <a href="data:text/html,<Tableau liste_colonnes={liste_colonnes}>" target="tabcontent">Fichier 1</a>
                </li>
            </ul>
         </div>
    );
}
}

所以我想在<a>内添加带有道具的<Tableau /> ,但是它不起作用。 我也尝试了html-to-react,但是我不知道该怎么办,它也不起作用。 我该怎么办?

尝试

<a href={<Tableau liste_colonnes={liste_colonnes}>} target="tabcontent">
    Fichier 1
</a>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM