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

#115 formats and call selections

This commit is contained in:
lana-k
2023-10-27 22:50:54 +02:00
parent 96877de532
commit ac1f7de62c
4 changed files with 114 additions and 17 deletions

View File

@@ -12,7 +12,9 @@
</template>
<div :id="'run-result-result-set-'+tab.id" class="result-set-container"/>
<template #right-pane v-if="viewValuePanelVisible">
<div><value-viewer :cellValue="testCell"/></div>
<div class="value-viewer-container">
<value-viewer v-show="selectedCell" :cellValue="selectedCellValue"/>
</div>
</template>
</component>
@@ -81,6 +83,7 @@
:time="time"
:pageSize="pageSize"
class="straight"
@updateSelectedCell="onUpdateSelectedCell"
/>
</div>
</teleport>
@@ -121,11 +124,8 @@ export default {
preparingCopy: false,
dataToCopy: null,
viewValuePanelVisible: false,
testCell: JSON.stringify(
JSON.parse('{"x": 1, "y": 2, "vector": [1,2,3]}'),
null,
4
)
selectedCell: null,
selectedCellValue: ''
}
},
components: {
@@ -227,6 +227,11 @@ export default {
toggleViewValuePanel () {
this.viewValuePanelVisible = !this.viewValuePanelVisible
},
onUpdateSelectedCell (e) {
this.selectedCell = e
this.selectedCellValue = this.selectedCell?.innerText
}
}
}
@@ -251,6 +256,11 @@ export default {
width: 100%;
box-sizing: border-box;
}
.value-viewer-container {
height: 100%;
width: 100%;
background-color: var(--color-white);
}
.table-preview {
position: absolute;