js首字母由大写变小写函数

toLower(record) {
    
    

    let obj = {
    
    };

    for (let key in record) {
    
    

        const name = key.charAt(0).toLowerCase() + key.slice(1);

        obj[name] = record[key];

    }

    return obj;

},

猜你喜欢

转载自blog.csdn.net/weixin_41886421/article/details/129328856