1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2026-03-24 15:06:17 +08:00
This commit is contained in:
lana-k
2025-11-15 14:29:41 +01:00
parent 65c1c18fcb
commit 68221cba6d
4 changed files with 148 additions and 9 deletions

View File

@@ -338,11 +338,10 @@ export default {
if (!this.dataSources) {
return []
}
const firstColumnName = Object.keys(this.dataSources)[0]
try {
return (
this.dataSources[Object.keys(this.dataSources)[0] || 'doc'].map(
json => JSON.parse(json)
) || []
this.dataSources[firstColumnName].map(json => JSON.parse(json)) || []
)
} catch {
return []

View File

@@ -16,6 +16,7 @@
</div>
<side-tool-bar panel="dataView" @switch-to="$emit('switchTo', $event)">
<icon-button
ref="chartBtn"
:active="mode === 'chart'"
tooltip="Switch to chart"
tooltipPosition="top-left"
@@ -33,6 +34,7 @@
<pivot-icon />
</icon-button>
<icon-button
ref="graphBtn"
:active="mode === 'graph'"
tooltip="Switch to graph"
tooltipPosition="top-left"
@@ -56,6 +58,7 @@
<div class="side-tool-bar-divider" />
<icon-button
ref="pngExportBtn"
:disabled="!exportToPngEnabled || loadingImage"
:loading="loadingImage"
tooltip="Save as PNG image"