zy-react-library 1.1.40 → 1.1.41
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FormProps } from "antd/es/form";
|
|
1
|
+
import type { FormInstance, FormProps } from "antd/es/form";
|
|
2
2
|
import type { Gutter } from "antd/es/grid/row";
|
|
3
3
|
import type { FC, ReactNode } from "react";
|
|
4
4
|
import type { FormOption, FormValues } from "./FormItemsRenderer";
|
|
@@ -6,7 +6,7 @@ import type { FormOption, FormValues } from "./FormItemsRenderer";
|
|
|
6
6
|
/**
|
|
7
7
|
* FormBuilder 组件属性
|
|
8
8
|
*/
|
|
9
|
-
export interface FormBuilderProps extends FormProps {
|
|
9
|
+
export interface FormBuilderProps extends Omit<FormProps, "form"> {
|
|
10
10
|
/** 表单初始值 */
|
|
11
11
|
values?: FormValues;
|
|
12
12
|
/** 表单配置项数组 */
|
|
@@ -33,6 +33,8 @@ export interface FormBuilderProps extends FormProps {
|
|
|
33
33
|
extraActionButtons?: ReactNode;
|
|
34
34
|
/** 是否处于加载状态,默认 false */
|
|
35
35
|
loading?: boolean;
|
|
36
|
+
/** 表单实例(通过 Form.useForm() 创建) */
|
|
37
|
+
form: FormInstance;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{request as e}from"@cqsjjb/jjb-common-lib/http.js";import{useState as t,useEffect as r}from"react";import a from"../../Basic/index.js";import{jsx as n}from"react/jsx-runtime";const o=new Map;function i(i){const{params:s={},placeholder:m="人员",isNeedCorpInfoId:d=!1,isNeedDepartmentId:c=!0,isNeedPostId:p=!1,extraParams:f={noMain:"",eqEmploymentFlag:1}
|
|
1
|
+
import{request as e}from"@cqsjjb/jjb-common-lib/http.js";import{useState as t,useEffect as r}from"react";import a from"../../Basic/index.js";import{jsx as n}from"react/jsx-runtime";const o=new Map;function i(i){const{params:s={},placeholder:m="人员",isNeedCorpInfoId:d=!1,isNeedDepartmentId:c=!0,isNeedPostId:p=!1,extraParams:f={},...l}=i,u={noMain:"",eqEmploymentFlag:1},[I,g]=t([]);return r(()=>{(async()=>{const t={...u,...f},r=JSON.stringify({params:s,extraParams:t});if(o.has(r))return void g(o.get(r));if(g([]),d&&!s.corpinfoId)return;if(c&&!s.departmentId)return;if(p&&!s.postId)return;if(!d&&!c&&!p)return void console.error("【PersonnelSelect】 请至少传入一个参数");const{data:a}=await e("/basicInfo/user/listAll","get",{...s,...t,time:(new Date).getTime()});o.set(r,a),g(a)})()},[JSON.stringify(s),d,c,p,JSON.stringify(f)]),n(a,{data:I,placeholder:m,...l})}i.displayName="PersonnelSelect";export{i as default};
|