// 更新class和style
function updateStyle(target, _ref) {
  var style = _ref.style,
    className = _ref.className,
    baseClassName = _ref.baseClassName;
  if (!target) return;

  // 还原样式
  target.setAttribute('style', '');
  target.setAttribute('class', baseClassName);

  // 增加样式
  if (style) {
    for (var stylePropName in style) {
      target.style[stylePropName] = style[stylePropName];
    }
  }
  if (className) {
    target.className = "".concat(baseClassName).concat(className ? ' ' + className : '');
  }
}
export default updateStyle;