export function stringIsBlank(val) { try { val = val.trim() } catch { } return typeof val === 'undefined' || val === null || val === '' } export function stringNotBlank(val) { return typeof val !== 'undefined' && val !== null && val !== '' } export function listIsBlank(val) { return typeof val === 'undefined' || val === null || val.length === 0 } export function listNotBlank(val) { return !listIsBlank(val) } export function listToStr(val) { if (listNotBlank(val)) { let str = ""; for (let i = 0, len = val.length; i < len; i++) { let item = val[i]; str += item + (i === len - 1 ? "。" : ","); } return str; } return ""; }