code: function styleProps(obj) {
    //If the parameter is a style object,then direct return.
    if (isObject(obj) || isArray(obj) || isNumber(obj)) {
      return obj;
    } //参数为字符串
  
  
    var pattern = /([^\s:]+)[\s]?:[\s]?([^;]+)[;]?/g,
        matchArr,
        ret;
  
    while (matchArr = pattern.exec(obj)) {
      var key = matchArr[1],
          value = matchArr[2];
  
      if (!ret) {
        ret = {};
      } //Convert to lowercase when style name is all capital.
  
  
      if (/^[A-Z-]+$/.test(key)) {
        key = key.toLowerCase();
      } //将连字符转为驼峰命名
  
  
      key = camelCase(key);
      ret[key] = REGEX_NUM.test(value) ? Number(value) : value;
    }
  
    return ret;
  }
docs: 提取style内参数