mirror of
https://github.com/lana-k/sqliteviz.git
synced 2026-03-24 15:06:17 +08:00
tests
This commit is contained in:
@@ -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 []
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user