Merge pull request #86 from daotl/pr/docs-plugin-enums

更新plugin-enums中get放大发JSDoc,后两个参数为可选
This commit is contained in:
qlin 2021-12-27 11:23:04 +08:00 committed by GitHub
commit 71ccf01c2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,14 +10,14 @@ Object.keys(_ENUMS).forEach(key => {
/**
* 获取枚举键值如不传key则返回name的枚举数组
* @param {string} name 枚举名称
* @param {string} key 枚举键名称
* @param {string} [key] 枚举键名称
* @param {{
* dir: string
* extend: Array<{
* key:string
* dir:string
* transfer: Function
* }>}} opt 配置项
* }>}} [opt] 配置项
*/
function get(name, key, opt = { dir: 'value', extend: []}) {
if (Object.prototype.toString.call(key) === '[object Object]') {