• 将 style 对象转为 htmlElement 上的 style 字符串

    Parameters

    • style: Properties<0 | string & {}, string & {}> | PropertiesHyphen<0 | string & {}, string & {}>

      一个 style 样式对象

    Returns string

    返回一个内联样式字符串

    Example

    // 将 style 对象转为内联样式字符串
    const styleString = styleToString({ 'font-size': '12px', color: 'red' })
    // 输出:"font-size:12px;color:red;"
    console.log(styleString)