/*** 判断是否为空*/ export function empty (value) {switch (typeof value) {case 'undefined':return truecase 'string':if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return truebreakcase 'boolean':if (!value) return truebreakcase 'number':if (value === 0 || isNaN(value)) return truebreakcase 'object':if (value === null || value.length === 0) return truefor (const i in value) {return false}return true}return false }