sud.getTextLineHeight
JS
Number sud.getTextLineHeight(Object object)获取一行文本的行高
参数
- Object object:传入参数,具体的属性见下表
object 的属性说明:
| 属性 | 键值类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| fontStyle | string | 否 | normal | 字体样式 |
| fontWeight | string | 否 | normal | 字重 |
| fontSize | number | 否 | 16 | 字号 |
| fontFamily | string | 是 | 字体名称 | |
| text | string | 是 | 文本的内容 | |
| success | function | 否 | 接口调用成功的回调函数 | |
| fail | function | 否 | 接口调用失败的回调函数 | |
| complete | function | 否 | 接口调用结束的回调函数 |
返回值
- Number: 返回文本的行高