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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user