标签:return username color null use user define val def
/** * for js、vue: 格式化人名,可用于默认头像 **/
function userNameFormat(value) { if (typeof(value) == "undefined" || value == null || value == ‘‘) { return value; } if (value.length <= 1) { return value; } value = value.substr((value.length - 2), value.length) return value; };
标签:return username color null use user define val def
原文地址:https://www.cnblogs.com/sunshouguo/p/11727665.html