This commit is contained in:
CareyWong 2020-03-28 18:15:34 +08:00
parent 8e9c361536
commit 178b35b48d
2 changed files with 12 additions and 0 deletions

View File

@ -50,6 +50,12 @@
ev.keyCode === 13 && this.doShort()
},
doShort() {
let re = new RegExp('http(s*)://[^\s]*')
if (re.exec(this.longUrl) === null) {
this.$message.warning('请输入正确格式的长链接')
return
}
this.loading = true
let data = new FormData();

View File

@ -50,6 +50,12 @@
ev.keyCode === 13 && this.doShort()
},
doShort() {
let re = new RegExp('http(s*)://[^\s]*')
if (re.exec(this.longUrl) === null) {
this.$message.warning('请输入正确格式的长链接')
return
}
this.loading = true
let data = new FormData();