feat: widget
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
const script = document.createElement('script');
|
||||
script.id = props.SCRIPT_ID;
|
||||
script.type = 'text/javascript';
|
||||
script.async = true;
|
||||
// script.async = true;
|
||||
script.src = props.SCRIPT_SRC;
|
||||
script.onload = onload;
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
@@ -60,11 +60,15 @@
|
||||
onMounted(async () => {
|
||||
await Object.assign(widgets, {
|
||||
FireAnt: {
|
||||
script: () => new window.FireAnt.MarketsWidget(Object.assign({ container_id: props.CONTAINER_ID }, props.options)),
|
||||
script: () => new window.FireAnt.MarketsWidget({ container_id: props.CONTAINER_ID, ...props.options }),
|
||||
key: window.FireAnt
|
||||
}})
|
||||
},
|
||||
TradingView: {
|
||||
script: () => new window.TradingView.widget({ container_id: props.CONTAINER_ID, ...props.options }),
|
||||
key: window.TradingView
|
||||
}
|
||||
})
|
||||
appendScript(initWidget(props.widgetKey));
|
||||
// instance.proxy.$forceUpdate();
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// <div class="tradingview-widget-container">
|
||||
// <script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-ticker-tape.js" async>
|
||||
// {
|
||||
// "symbols": [
|
||||
// {
|
||||
// "proName": "FOREXCOM:SPXUSD",
|
||||
// "title": "S&P 500 Index"
|
||||
// },
|
||||
// {
|
||||
// "proName": "FOREXCOM:NSXUSD",
|
||||
// "title": "US 100 Cash CFD"
|
||||
// },
|
||||
// {
|
||||
// "proName": "FX_IDC:EURUSD",
|
||||
// "title": "EUR to USD"
|
||||
// },
|
||||
// {
|
||||
// "proName": "BITSTAMP:BTCUSD",
|
||||
// "title": "Bitcoin"
|
||||
// },
|
||||
// {
|
||||
// "proName": "BITSTAMP:ETHUSD",
|
||||
// "title": "Ethereum"
|
||||
// }
|
||||
// ],
|
||||
// "showSymbolLogo": true,
|
||||
// "isTransparent": false,
|
||||
// "displayMode": "adaptive",
|
||||
// "colorTheme": "dark",
|
||||
// "locale": "en"
|
||||
// }
|
||||
// </script>
|
||||
// </div>
|
||||
Reference in New Issue
Block a user