kn-hooks 0.0.14 → 0.0.15

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kn-hooks",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "scripts": {
5
5
  "dev": "cross-env env_api=dev env_package=dev webpack-dev-server --progress",
6
6
  "build": "cross-env env_api=prod env_package=prod webpack --config webpack.config.js",
@@ -186,6 +186,10 @@ const useDictionary=(props)=>{
186
186
  * @param {ReactDom} params.SelectOption - Antd的SelectOption组件
187
187
  * @param {ReactDom} params.RadioOption - Antd的SelectOption组件
188
188
  * @returns {void}
189
+ * @example
190
+ import {useDictionary} from 'kn-hooks';
191
+ import {Select,Radio} from 'antd';
192
+ useDictionary.SetConfig(Select.Option,Radio.Option);
189
193
  */
190
194
  export const SetConfig = ({SelectOption,RadioOption})=>{
191
195
  if(SelectOption)DEFAULT_CONFIG.SelectOption = SelectOption;
@@ -210,7 +214,8 @@ export const SetConfig = ({SelectOption,RadioOption})=>{
210
214
  *
211
215
  * @example
212
216
  // emUserType.jsx
213
- export const userType = createDictionary({
217
+ import {useDictionary} from 'kn-hooks';
218
+ export const userType = useDictionary.createDictionary({
214
219
  api:()=>Promise.resolve([{id:'1001',label:'项目1001',name:'pm1001'},]),
215
220
  afterApi:(response)=>{
216
221
  return response?.data;
@@ -371,6 +376,7 @@ export const createDictionary=options=>{
371
376
  */
372
377
 
373
378
 
374
-
379
+ useDictionary.createDictionary=createDictionary;
380
+ useDictionary.SetConfig = SetConfig;
375
381
 
376
382
  export default useDictionary