let reUrl = /(http|https):\/\/([\w.]+\/?)\S*/ if (reUrl.test(values.url) === false) { return this.$message.error(‘请输入以 http 或者 https 开头的url‘) }
校验 以 http 或者 https 开头的url
原文:https://www.cnblogs.com/guangzhou11/p/12486348.html