index.js 213 Bytes edit raw blame history 1 2 3 4 5 6 7 8 9 10 11 /** * 为样式动态赋值 * @param {*} style */ export function obj2style(style) { let str = []; Object.keys(style).forEach(key => { str.push(`${key}:${style[key]};`); }); return str.join(';'); }