You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
213 B

9 months ago
/**
* 为样式动态赋值
* @param {*} style
*/
export function obj2style(style) {
let str = [];
Object.keys(style).forEach(key => {
str.push(`${key}:${style[key]};`);
});
return str.join(';');
}