diff --git a/dbapi-ui/src/components/api/common/SqlCode.vue b/dbapi-ui/src/components/api/common/SqlCode.vue index ad6e96fbb4dfdb02206525a64fed781f90af5154..5df92113a2993407f2d91e444bc8ef8fffdb8313 100644 --- a/dbapi-ui/src/components/api/common/SqlCode.vue +++ b/dbapi-ui/src/components/api/common/SqlCode.vue @@ -57,7 +57,7 @@
-
+
SQL-{{ item.label }}
@@ -281,8 +281,12 @@ export default { } }, - focusCM(index) { + focusCM(index, sql) { this.currentIndex = index + const _this = this + this.$nextTick(() => { + _this.$refs['codeui-'+index][0].$refs['codemirror'].codemirror.refresh() + }) }, tag(item) { let val = '' diff --git a/dbapi-ui/src/components/api/common/codeUI.vue b/dbapi-ui/src/components/api/common/codeUI.vue index f3b3ebecb4db8f857382e8aab83dfd0312156719..5328b4e1540721270834226f9d0bb8e2463e4890 100644 --- a/dbapi-ui/src/components/api/common/codeUI.vue +++ b/dbapi-ui/src/components/api/common/codeUI.vue @@ -1,6 +1,6 @@