formatEntityFieldValue()
function formatEntityFieldValue(
type,
value,
format?
): string;
Defined in: packages/rxdb-model/dist/entity-value.utils.d.ts:39
将字段值格式化为展示用字符串
Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | 字段类型 |
value | unknown | 字段值 |
format? | FieldFormat | 字段语义标注(可选) |
Returns
string
格式化后的字符串
Remarks
日期按本地格式展示,数组以逗号加空格连接,JSON 类值序列化为 JSON 字符串。
format 只影响展示形态:货币/百分比/评分/时长/日期显示模式