diff --git a/frontend/src/views/dataset/add/AddApi.vue b/frontend/src/views/dataset/add/AddApi.vue
index 6a2c651051..dfa2afb486 100644
--- a/frontend/src/views/dataset/add/AddApi.vue
+++ b/frontend/src/views/dataset/add/AddApi.vue
@@ -281,7 +281,7 @@ export default {
const that = this
setTimeout(function() {
const currentHeight = document.documentElement.clientHeight
- that.height = currentHeight - 195 - 54
+ that.height = currentHeight - 56 - 64 - 75 - 32 - 24 - 16 - 10
}, 10)
},
setActiveName({ name, datasourceId, enableCheck }) {
diff --git a/frontend/src/views/dataset/add/AddDB.vue b/frontend/src/views/dataset/add/AddDB.vue
index 06d5c82607..abb2110b63 100644
--- a/frontend/src/views/dataset/add/AddDB.vue
+++ b/frontend/src/views/dataset/add/AddDB.vue
@@ -312,7 +312,7 @@ export default {
const that = this
setTimeout(function () {
const currentHeight = document.documentElement.clientHeight
- that.height = currentHeight - 195 - 54
+ that.height = currentHeight - 56 - 64 - 75 - 32 - 24 - 16 - 10
}, 10)
},
setActiveName({ name, datasourceId, enableCheck }) {
diff --git a/frontend/src/views/dataset/add/AddSQL.vue b/frontend/src/views/dataset/add/AddSQL.vue
index 8fad55ec00..7e237a1848 100644
--- a/frontend/src/views/dataset/add/AddSQL.vue
+++ b/frontend/src/views/dataset/add/AddSQL.vue
@@ -371,7 +371,7 @@ import 'codemirror/addon/hint/sql-hint'
import 'codemirror/addon/hint/show-hint'
import { engineMode } from '@/api/system/engine'
import msgCfm from '@/components/msgCfm/index'
-
+import _ from 'lodash'
export default {
name: 'AddSQL',
components: { codemirror },
@@ -488,6 +488,11 @@ export default {
handler: function () {
this.initTableInfo()
}
+ },
+ sqlHeight: {
+ handler: function () {
+ this.calHeight()
+ }
}
},
mounted() {
@@ -560,14 +565,11 @@ export default {
this.tableData = response.data
})
},
- calHeight() {
- const that = this
- setTimeout(function () {
- const currentHeight = document.documentElement.clientHeight
- that.height =
- currentHeight - 56 - 30 - 26 - 25 - 43 - 160 - 10 - 37 - 20 - 10 - 16
- }, 10)
- },
+ calHeight: _.debounce(function() {
+ const sqlHeight = Math.max(this.sqlHeight, 248)
+ const currentHeight = document.documentElement.clientHeight
+ this.height = currentHeight - sqlHeight - 56 - 54 - 36 - 64
+ }, 200),
initDataSource() {
listDatasource().then((response) => {
this.options = response.data.filter((item) => item.type !== 'api')
@@ -636,7 +638,7 @@ export default {
return
}
this.parseVariable()
- this.loading = true;
+ this.loading = true
const table = {
id: this.param.tableId,
name: this.param.name,
@@ -651,12 +653,14 @@ export default {
isBase64Encryption: true
})
}
- post('/dataset/table/update', table).then((response) => {
- this.openMessageSuccess('deDataset.set_saved_successfully')
- this.cancel()
- }).finally(() => {
- this.loading = false;
- })
+ post('/dataset/table/update', table)
+ .then((response) => {
+ this.openMessageSuccess('deDataset.set_saved_successfully')
+ this.cancel()
+ })
+ .finally(() => {
+ this.loading = false
+ })
},
cancel() {
diff --git a/frontend/src/views/dataset/add/AddUnion.vue b/frontend/src/views/dataset/add/AddUnion.vue
index 29b2d09951..5cfd6c541f 100644
--- a/frontend/src/views/dataset/add/AddUnion.vue
+++ b/frontend/src/views/dataset/add/AddUnion.vue
@@ -41,7 +41,7 @@
}}
-
+
@@ -22,6 +22,7 @@