$ui/utils/dictionary

字典数组与映射对象互转模块

Source:
Author:
  • 陈华春

Methods

(static) arrayToMap(array, label, value) → {Object}

Source:

数组转换成映射对象

Parameters:
Name Type Description
array Array.<Object>

要转换的数组

label string

健名称

value string

值名称

Returns:
Type
Object

(static) keysToMap(keys) → {object}

Source:

数组keys转换成对象

Parameters:
Name Type Description
keys Array.<string>
Returns:
Type
object

(static) mapToArray(map, label, value) → {Array.<Object>}

Source:

映射对象转换成数组

Parameters:
Name Type Description
map Object

要转换的映射对象

label string

健名称

value string

值名称

Returns:
Type
Array.<Object>

(static) mapToKeys(map) → {Array.<string>}

Source:

对象映射转换成数组keys

Parameters:
Name Type Description
map object
Returns:
Type
Array.<string>