Is there a way to ensure that all dynamic components are rendered at once?
Currently, only the component of the last tab is getting mounted. I want to mount them all at the same time.
const addTab = (symbol: string) => {
const id = nextTabId++;
tabs.value.push({
id,
symbol,
component: markRaw(ChartComponent),
});
activeTabId.value = id;
};
onMounted(() => {
addTab("USD");
addTab("EUR");
});
<KeepAlive>
<component
:key="activeTab?.id"
:is="activeTab?.component"
/>
</KeepAlive>