src/utils/validate.js
@@ -1,6 +1,18 @@ /** * 判断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} path * @param {string} url * @returns {Boolean} */ export function isHttp(url) {