kn-hooks 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ const DEFAULT_CONFIG={
|
|
|
14
14
|
* [Demo - CodeSandBox]{@link https://codesandbox.io/s/usedictionary-j7cw8?file=/index.js}
|
|
15
15
|
*
|
|
16
16
|
* @param {Object} props
|
|
17
|
-
* @param {Api} props.api - 用于获取字典列表的接口
|
|
17
|
+
* @param {Api} [props.api] - 用于获取字典列表的接口
|
|
18
18
|
* @param {string} [props.idKey='id'] - 字段id的key键值
|
|
19
19
|
* @param {string} [props.nameKey='name'] - 字段name的key键值
|
|
20
20
|
* @param {string} [props.labelKey='label'] - 字段label的key键值
|
|
@@ -200,7 +200,7 @@ export const SetConfig = ({SelectOption,RadioOption})=>{
|
|
|
200
200
|
* @function
|
|
201
201
|
* @description 创建字典hooks工具
|
|
202
202
|
* @param {Object} options
|
|
203
|
-
* @param {Api} options.api - 用于获取字典列表的接口
|
|
203
|
+
* @param {Api} [options.api] - 用于获取字典列表的接口
|
|
204
204
|
* @param {string} [options.idKey='id'] - 字段id的key键值
|
|
205
205
|
* @param {string} [options.nameKey='name'] - 字段name的key键值
|
|
206
206
|
* @param {string} [options.labelKey='label'] - 字段label的key键值
|
|
@@ -356,9 +356,10 @@ export const createDictionary=options=>{
|
|
|
356
356
|
|
|
357
357
|
|
|
358
358
|
/**
|
|
359
|
-
* @
|
|
360
|
-
* @
|
|
361
|
-
* @
|
|
359
|
+
* @template [T=object]
|
|
360
|
+
* @callback Api
|
|
361
|
+
* @param {Object} params - 调用接口用到的参数
|
|
362
|
+
* @returns {Promise<T>}
|
|
362
363
|
*/
|
|
363
364
|
|
|
364
365
|
|