本文へ移動

@eightkk/vue-weave / core / formatFieldValue

Function: formatFieldValue() ​

formatFieldValue(spec, value): string

Defined in: src/core/fieldEditing.ts:504

Turn a field value into editor text. null becomes an empty string; 0 stays 0. The built-in formats read back with parseFieldValue: a select shows each choice by its label unless the label does not name it (then by its value), a multiple select quotes entries that contain a comma, a quote or surrounding whitespace, and a time with timeZone appends the offset to a wall time that occurs twice.

Parameters ​

spec ​

TimelineFieldSpec<any>

value ​

FieldValue

Returns ​

string

MIT ライセンスで公開しています。