1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-06 18:18:53 +08:00

#115 record and row navigator

This commit is contained in:
lana-k
2023-10-28 22:51:28 +02:00
parent 07d31dbfe9
commit 735e4ec7f6
5 changed files with 311 additions and 2 deletions

View File

@@ -37,6 +37,15 @@
<clipboard-icon/>
</icon-button>
<icon-button
:disabled="!result"
tooltip="View record"
tooltip-position="top-left"
@click="toggleViewRecord"
>
<export-to-csv-icon/>
</icon-button>
<icon-button
:disabled="!result"
tooltip="View value"
@@ -78,7 +87,16 @@
</div>
<logs v-if="error" :messages="[error]"/>
<sql-table
v-if="result"
v-if="result && !viewRecord"
:data-set="result"
:time="time"
:pageSize="pageSize"
class="straight"
@updateSelectedCell="onUpdateSelectedCell"
/>
<record
v-if="result && viewRecord"
:data-set="result"
:time="time"
:pageSize="pageSize"
@@ -107,6 +125,7 @@ import loadingDialog from '@/components/LoadingDialog'
import events from '@/lib/utils/events'
import Teleport from 'vue2-teleport'
import ValueViewer from './ValueViewer'
import Record from './Record/index.vue'
export default {
name: 'RunResult',
@@ -125,7 +144,8 @@ export default {
dataToCopy: null,
viewValuePanelVisible: false,
selectedCell: null,
selectedCellValue: ''
selectedCellValue: '',
viewRecord: false
}
},
components: {
@@ -138,6 +158,7 @@ export default {
ClipboardIcon,
loadingDialog,
ValueViewer,
Record,
Splitpanes,
Teleport
},
@@ -229,6 +250,10 @@ export default {
this.viewValuePanelVisible = !this.viewValuePanelVisible
},
toggleViewRecord () {
this.viewRecord = !this.viewRecord
},
onUpdateSelectedCell (e) {
this.selectedCell = e
this.selectedCellValue = this.selectedCell?.innerText