js 字符转换,小驼峰转大写字母开头并且加空格 changeDate -》 Change Date
var arr = ['changedBy', 'changedDate', 'createdBy', 'createdDate', 'deleteFlag'] let itemDate = arr.map(item => { let str = item.replace(/([A-Z])/g," $1") let value = str.substr(0,1).toUpperCase() + str.substr(1) return { name: item, 160, isShow: true, value: value } })
原链接: https://www.cnblogs.com/guozongzhang/p/10858327.html