xiangpei
2025-02-19 eac6b7989a6cbb9d09b20a1c46f51bb68d9f5ae7
src/utils/validate.js
@@ -1,26 +1,4 @@
/**
 * 判断value字符串是否为空
 * @param {string} value
 * @returns {Boolean}
 */
export function isEmpty(value) {
  if (value == null || value == "" || value == undefined || value == "undefined") {
    return true;
  }
  return false;
}
/**
 * 判断url是否是http或https
 * @param {string} url
 * @returns {Boolean}
 */
export function isHttp(url) {
  return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1
}
/**
 * 判断path是否为外链
 * @param {string} path
 * @returns {Boolean}
 */
@@ -100,3 +78,7 @@
  }
  return Array.isArray(arg)
}
export function isHttp(url) {
  return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1;
}