我有一个以下配置作为JSON
var componentConfig = {
content: { type: "ContentContent", data: "content"},
new_content: { type: "ContentFormContent", data: "content"}
}
Run Code Online (Sandbox Code Playgroud)
在react rendercomponent中,是否可以动态传递组件名称以进行反应渲染.
例如,在这个rendercomponent而不是直接放置ContentFormContent是可以从json配置传递数据,我可以循环或东西.
React.renderComponent(<ContentFormContent data={[componentConfig.new_content.data]} />, body);
Run Code Online (Sandbox Code Playgroud)
所以我将在json配置中有一个页面列表,并根据特定导航的选择,我将根据json文件中的"类型"渲染组件
我已经使用pip来安装PIL。安装时需要两个附加参数。因此,安装命令如下所示。
pip install PIL --allow-external PIL --allow-unverified PIL
Run Code Online (Sandbox Code Playgroud)
我需要在setup.py文件中添加PIL包。在install_requires列表中添加PIL 确实会安装PIL,但是它不起作用,因为我需要使用其他参数来安装PIL。
那么如何将PIL install_requires与其他参数一起添加到列表中呢?