diff --git a/frontend/src/components/canvas/components/Editor/FrameLinks.vue b/frontend/src/components/canvas/components/Editor/FrameLinks.vue index b7f918dd96..351728af6a 100644 --- a/frontend/src/components/canvas/components/Editor/FrameLinks.vue +++ b/frontend/src/components/canvas/components/Editor/FrameLinks.vue @@ -27,6 +27,7 @@ diff --git a/frontend/src/utils/urlUtils.js b/frontend/src/utils/urlUtils.js new file mode 100644 index 0000000000..20f3eaa557 --- /dev/null +++ b/frontend/src/utils/urlUtils.js @@ -0,0 +1,9 @@ +export function checkAddHttp(url) { + if (!url) { + return url + } else if (/^(http(s)?:\/\/)/.test(url.toLowerCase())) { + return url + } else { + return 'http://' + url + } +} diff --git a/frontend/src/views/panel/LinkJumpSet/index.vue b/frontend/src/views/panel/LinkJumpSet/index.vue index 04b7d96e6c..565d3613a9 100644 --- a/frontend/src/views/panel/LinkJumpSet/index.vue +++ b/frontend/src/views/panel/LinkJumpSet/index.vue @@ -52,9 +52,9 @@ :disable-branch-nodes="true" :normalizer="normalizer" :placeholder="$t('panel.select_jump_panel')" - :noChildrenText="$t('commons.treeselect.no_children_text')" - :noOptionsText="$t('commons.treeselect.no_options_text')" - :noResultsText="$t('commons.treeselect.no_results_text')" + :no-children-text="$t('commons.treeselect.no_children_text')" + :no-options-text="$t('commons.treeselect.no_options_text')" + :no-results-text="$t('commons.treeselect.no_results_text')" style="margin-right: 10px" @select="panelNodeClick" @input="inputVal" @@ -166,6 +166,7 @@ import { groupTree } from '@/api/panel/panel' import { detailList } from '@/api/panel/panelView' import { mapState } from 'vuex' import { deepCopy } from '@/components/canvas/utils/utils' +import { checkAddHttp } from '@/utils/urlUtils' export default { components: { }, @@ -271,6 +272,7 @@ export default { this.$emit('closeJumpSetDialog') }, save() { + this.linkJumpInfo.content = checkAddHttp(this.linkJumpInfo.content) updateJumpSet(this.linkJump).then(rsp => { this.$message({ message: '保存成功', diff --git a/frontend/src/views/system/datasource/form.vue b/frontend/src/views/system/datasource/form.vue index 93007a3de4..d16f0d717d 100644 --- a/frontend/src/views/system/datasource/form.vue +++ b/frontend/src/views/system/datasource/form.vue @@ -539,8 +539,13 @@ export default { return } let configuration = JSON.parse(child.configuration) + if(!configuration){ + return + } switch (this.form.type) { case 'mysql': + case 'TiDB': + case 'StarRocks': case 'hive': case 'mariadb': case 'ds_doris':