Blame view

src/components/demo/utils/index.js 213 Bytes
e7121c710   BigBoss   detail update
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(';');
  }