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

fix column order in result set #74

This commit is contained in:
lana-k
2021-08-10 20:31:12 +02:00
parent 2ed5160f65
commit 9f32323a80
13 changed files with 155 additions and 92 deletions

View File

@@ -30,7 +30,7 @@
<tr v-for="rowIndex in currentPageData.count" :key="rowIndex">
<td v-for="(col, colIndex) in columns" :key="colIndex">
<div class="cell-data" :style="cellStyle">
{{ dataSet[col][rowIndex - 1 + currentPageData.start] }}
{{ dataSet.values[col][rowIndex - 1 + currentPageData.start] }}
</div>
</td>
</tr>
@@ -74,10 +74,10 @@ export default {
},
computed: {
columns () {
return Object.keys(this.dataSet)
return this.dataSet.columns
},
rowCount () {
return this.dataSet[this.columns[0]].length
return this.dataSet.values[this.columns[0]].length
},
cellStyle () {
const eq = this.tableWidth / this.columns.length