fix(UI自动化): 修复UI grid配置兼容localhost

This commit is contained in:
nathan.liu 2022-10-16 13:40:33 +08:00 committed by nathanliu2022
parent a571694b79
commit 2ee9232640
1 changed files with 2 additions and 1 deletions

View File

@ -84,7 +84,8 @@ export default {
isURL(url) {
let regEx =
/^(http|https):\/\/(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6})(:[0-9]{1,5})?$/;
if (regEx.test(url)) {
let localhostRegEx = /^http:\/\/localhost:[0-9]{1,5}$/;
if (regEx.test(url) || localhostRegEx.test(url)) {
return true;
} else {
return false;