提交 7faa88f2 authored 作者: taojinlong's avatar taojinlong

fix: 限制数据源端口号

上级 c5e3ff77
...@@ -278,6 +278,10 @@ export default { ...@@ -278,6 +278,10 @@ export default {
this.$message.error(this.$t('datasource.please_choose_schema')) this.$message.error(this.$t('datasource.please_choose_schema'))
return return
} }
if (this.form.configuration.dataSourceType === 'jdbc' && this.form.configuration.port <= 0) {
this.$message.error(this.$t('datasource.port_no_less_then_0'))
return
}
this.$refs.dsForm.validate(valid => { this.$refs.dsForm.validate(valid => {
if (valid) { if (valid) {
const data = JSON.parse(JSON.stringify(this.form)) const data = JSON.parse(JSON.stringify(this.form))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论