修复直播编辑bug

This commit is contained in:
zhangyc
2022-11-11 01:22:29 +08:00
parent 80d6f1adc2
commit ee03a13e6e
6 changed files with 131 additions and 65 deletions

View File

@@ -229,7 +229,14 @@ export default {
//创建外链
const updateRef = () => {
if (!state.inputV1) return message.warning("请输入外链名称");
if (!state.inputV2) return message.warning("请输入链接");
if (!state.inputV2){
return message.warning("请输入链接");
}else{
const reg = /(https?|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/;
if ((!reg.test(state.inputV2)) && state.inputV2 != '') {
return message.warning("请输入合法的链接地址");
}
}
let obj = {
linkAddress: state.inputV2,
linkDescription: state.textV1,