diff --git a/src/components/SqlTable.vue b/src/components/SqlTable.vue
index 1909998..cb40adf 100644
--- a/src/components/SqlTable.vue
+++ b/src/components/SqlTable.vue
@@ -13,11 +13,16 @@
-
-
+
+
- |
+ |
{{ th }}
|
@@ -76,7 +81,7 @@ export default {
calculateHeadersWidth () {
this.tableWidth = this.$refs['table-container'].offsetWidth
this.$nextTick(() => {
- this.header = Array.from(document.querySelectorAll('th')).map(th => {
+ this.header = this.$refs.th.map(th => {
return { name: th.innerText, width: th.offsetWidth }
})
})
@@ -89,7 +94,7 @@ export default {
}
},
mounted () {
- new ResizeObserver(this.calculateHeadersWidth).observe(document.getElementById('table'))
+ new ResizeObserver(this.calculateHeadersWidth).observe(this.$refs.table)
this.calculateHeadersWidth()
},
watch: {
@@ -127,7 +132,6 @@ export default {
}
#table-container {
width: 100%;
- /* height: 200px; */
overflow: auto;
}
table {
@@ -167,7 +171,6 @@ td > div.cell-data {
width: -moz-max-content;
width: max-content;
white-space: nowrap;
- /* max-width: 250px; */
overflow: hidden;
text-overflow: ellipsis;
}
diff --git a/src/components/TabContent.vue b/src/components/TabContent.vue
index b3d7d01..66ef7e1 100644
--- a/src/components/TabContent.vue
+++ b/src/components/TabContent.vue
@@ -1,41 +1,43 @@
-
-
-
-
+
diff --git a/src/views/Editor.vue b/src/views/Editor.vue
index 9fadb10..198a602 100644
--- a/src/views/Editor.vue
+++ b/src/views/Editor.vue
@@ -9,7 +9,7 @@
-
+
@@ -18,14 +18,14 @@