mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 23:35:59 +00:00
SYNC: auto-detect charts is disabled by default #1145
This commit is contained in:
committed by
Diflow
parent
a10fe6994a
commit
9bff8608c1
@@ -80,6 +80,7 @@
|
||||
label: `Result ${index + 1}`,
|
||||
isResult: true,
|
||||
component: JslDataGrid,
|
||||
resultIndex: info.resultIndex,
|
||||
props: { jslid: info.jslid, driver, onOpenChart: () => handleOpenChart(info.resultIndex) },
|
||||
}))),
|
||||
...charts.map((info, index) => ({
|
||||
@@ -144,6 +145,21 @@
|
||||
}
|
||||
onSetFrontMatterField?.('selected-chart', resultIndex + 1);
|
||||
}
|
||||
|
||||
export function openCurrentChart() {
|
||||
const currentIndex = domTabs.getValue();
|
||||
console.log('Current index:', currentIndex);
|
||||
const currentTab = allTabs[currentIndex];
|
||||
console.log('Current tab:', currentTab);
|
||||
if (currentTab?.isChart) {
|
||||
return;
|
||||
}
|
||||
const resultIndex = currentTab?.resultIndex;
|
||||
console.log('Result index:', resultIndex);
|
||||
if (resultIndex != null) {
|
||||
handleOpenChart(resultIndex);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<TabControl
|
||||
|
||||
Reference in New Issue
Block a user