日照项目的居民端小程序
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.
 
 
 

15 lines
328 B

/**
* 把style对象转换为能直接使用的字符串
*
* 如{display: none} => 'display:none;'
*/
export default function (styleObj) {
let styleStr = '';
Object.keys(styleObj).forEach((k) => {
if (styleStr != '') {
styleStr += ';';
}
styleStr += k + ':' + styleObj[k];
});
return styleStr;
}