Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在react组件中加载外部脚本标记_Html_Dom_Reactjs - Fatal编程技术网

Html 在react组件中加载外部脚本标记

Html 在react组件中加载外部脚本标记,html,dom,reactjs,Html,Dom,Reactjs,我正在构建一个选股应用程序。我发现这个图表模板非常棒,它附带了一个html脚本: <!-- TradingView Widget BEGIN --> <div id="tv-medium-widget-b3840"></div> <script type="text/javascript" src="https://d33t3vvu2t2yu5.cloudfront.net/tv.js"></script> <script typ

我正在构建一个选股应用程序。我发现这个图表模板非常棒,它附带了一个html脚本:

<!-- TradingView Widget BEGIN -->
<div id="tv-medium-widget-b3840"></div>
<script type="text/javascript" src="https://d33t3vvu2t2yu5.cloudfront.net/tv.js"></script>
<script type="text/javascript">
new TradingView.Widget({
"container_id": "tv-medium-widget-b3840",
"symbols": [
[
  "Apple",
  "AAPL "
],
[
  "Google",
  "GOOGL"
],
[
  "Yahoo!",
  "YHOO"
]
],

"gridLineColor": "#e9e9ea",

"fontColor": "#83888D",

"underLineColor": "#dbeffb",

"trendLineColor": "#4bafe9",

"width": 1000,

"height": 350,

"tradeItWidget": false,

"locale": "en"

});
 </script>
<!-- TradingView Widget END -->
const TradingViews = React.createClass({

componentDidMount:
   new TradingView.widget({

   "width": 980,
   "height": 610,
   "symbol": "QUANDL:YAHOO/FUND_FUSEX",
   "interval": "M",
   "timezone": "Etc/UTC",
   "theme": "White",
   "style": "1",
   "locale": "en",
   "toolbar_bg": "#f1f3f6",
   "enable_publishing": false,
   "allow_symbol_change": true,
   "hideideas": true,
   "show_popup_button": true,
   "popup_width": "1000",
   "popup_height": "650"


   }),

render:function(){
    return(
        null
    )

   }

});

export default TradingViews;