mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
docs(plugin-enums): get has two optional parameters
This commit is contained in:
parent
abb28212df
commit
8dc0a5ee34
@ -10,14 +10,14 @@ Object.keys(_ENUMS).forEach(key => {
|
|||||||
/**
|
/**
|
||||||
* 获取枚举键值,如不传key,则返回name的枚举数组
|
* 获取枚举键值,如不传key,则返回name的枚举数组
|
||||||
* @param {string} name 枚举名称
|
* @param {string} name 枚举名称
|
||||||
* @param {string} key 枚举键名称
|
* @param {string} [key] 枚举键名称
|
||||||
* @param {{
|
* @param {{
|
||||||
* dir: string
|
* dir: string
|
||||||
* extend: Array<{
|
* extend: Array<{
|
||||||
* key:string
|
* key:string
|
||||||
* dir:string
|
* dir:string
|
||||||
* transfer: Function
|
* transfer: Function
|
||||||
* }>}} opt 配置项
|
* }>}} [opt] 配置项
|
||||||
*/
|
*/
|
||||||
function get(name, key, opt = { dir: 'value', extend: []}) {
|
function get(name, key, opt = { dir: 'value', extend: []}) {
|
||||||
if (Object.prototype.toString.call(key) === '[object Object]') {
|
if (Object.prototype.toString.call(key) === '[object Object]') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user