From d7779a332ea47232acafa9b92d8f5ebeb78a3498 Mon Sep 17 00:00:00 2001 From: luoanbing Date: Wed, 13 Mar 2024 21:10:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++ docs/assets/navigation.js | 2 +- docs/assets/search.js | 2 +- docs/classes/NextUI_2_2.html | 28 ++++++++-------- docs/classes/Verifications.html | 54 +++++++++++++++--------------- docs/functions/getPromise.html | 2 ++ docs/functions/useAttr.html | 4 +-- docs/functions/useFormData.html | 24 +++++++------ docs/functions/useObjectData.html | 4 +-- docs/functions/useObjectState.html | 4 +-- docs/functions/useSubFormData.html | 22 ++++++------ docs/index.html | 23 +++++++++---- docs/modules.html | 9 +++-- docs/types/CallSetValue.html | 4 +-- docs/types/IError.html | 4 +-- docs/types/IErrors.html | 4 +-- docs/types/IObjectData.html | 2 +- docs/types/IValidateKey.html | 3 ++ docs/types/IVerification.html | 4 +-- docs/types/IVerificationItem.html | 10 +++--- docs/types/IVerifications.html | 4 +-- docs/types/IuseAttr.html | 2 +- docs/types/PasswordVerifProps.html | 14 ++++++++ docs/types/RenderAttr.html | 4 +-- docs/types/RenderAttrProps.html | 4 +-- package.json | 2 +- 26 files changed, 144 insertions(+), 101 deletions(-) create mode 100644 docs/functions/getPromise.html create mode 100644 docs/types/IValidateKey.html create mode 100644 docs/types/PasswordVerifProps.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 563dcce..cef4d80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # hook-form-react +## 2.1.0 + +### Minor Changes + +- 修复立即更新数据立即验证出现异常的问题 + ## 2.0.2 ### Patch Changes diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 7490ad9..5416e8b 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACpXSTWsCMRAG4P+Ss6gbqrbeRFvYi4qLXkqRuI64NftBMgsW8b+73X5sYmKip0DemQdmkvcTQTgiGZJpdSzDNV1T0iIFw311F3MmJchOk7X3mPKq4JBkWzIM6PO59S+sQCS7JGaY5Jk0ES12OWPGeQS4YryEhsGvokLUTDdo92UQ9KjihK9C5OJa+Lm9r1fam6W3e7b5hBgnDJkhNJFXUTdmOGr4kBQipE7tu+Ah0VyT460tVilhhGi+1O+9r38B2RaETWiS+425yAtjoKvYpxkD7cosrnfRsc7Uf9Kb33KR6p9HA/5iN2L7gxpz6yfaoQgZglOqK9xUVG48sykVBvVxAf1J+GCuBAAA" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACpXTW0vDMBQH8O+S5+Fc8Lo38QJF0GFxLyIja89cNL2QnKJD/O7GeknSxGR7GuR/zm/pac/DO0F4QzIlN/rnPlvQBSUj0jJc67NCMKVAjU22t8ZK6IIXXpdkOqEnH6M/YQ6Sr3jBkDe18hEnjjnnTIgccM5EB4bBTasRO3MNun96PDmklpNdStnIofB9ul2vCjerZPft8hkKvGDIPMFESUU/JS8ZwjVsPMbK0o41eR+ywp2kDKGKal8FO4n+uCPfTMDqFJwh+m/85zzVP9Pf6Wsjy/5PZ7Jpvfv4FSnzDuoSZOhWJtneCF5qEKe0J0BdV3Fl7daqq4t+xGOTus7RgUV4czb9wVEPm68aWbm74QC/cRwJrZjD/LdoYShHvUxRqa+IU3m3TDybVeFRj59cGezLjQUAAA==" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 633b4ba..c03143e 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACtVdW5Pbug3+L87r1jGpe95O08tkpk07Pe152cnseL1KVq0vG1+SdDL575UoUQJgQKJMeTd9yToWSHzEB4LkJ8v+Ptvvvh5mb26/z/5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f8fUUMwOWRnBYqRAlM4kLgp25w7A/QGUqnc7O6LNd5pgwIVSAXKPMkDeITFVbe7M2kSb+9WzW+Vo5kFkiGVmNzemclM91EhGGsi5dGW2VAA4KkMd1/9UOin+peJwajhqr6QIry9q6cvcgumTSpNWtvwbnNa49aAIXEBK1s3P/oHAMMJL+6Uy5bN776DlmAPkUlJsTVb3KX56VPQFG6g5JQoW54KVKNBO63EIJl25ofG4GoJIhRJcHdbZkcNnNpTjz3QpHbboqVB7LbCRj0AqW1PEfbok9ltkT3eKCWl0lN5iPmK8l6DFAylvDfNdng/oQGhoTSep8fdFo8DuItEd+ty97s9be5x8gWgjkVSHXvaHY7L9Wr3gN0CsJEI9nR4PDvkwN1iE117UmzPvfZUZzUAFbe7w/ZUZxdHe56v1C4exufPCDkAEEm07s1janRpTRTMfylgXdun+kFWsLRlcG2WZvs+/3wq9nhjoADN4qrcfD8c8Aeqkl0BmrAFrRDRHrKlAs8dVeGqaTtqPFiqQjuLolarsKZpqzFYpjN77lDSGnwsNvgMCWIZSrWoegoPRhG0CcQ253uqREPipepVNmSPOVAoE1f9sjG/A4f7MYmhtnE5VfExF54ZpLQpW++NEYwu2IQFPW4Pp3t2zPCUGUuRPssqGGabp01eNH+tJGb1nqTJrTajFjavW91RtYdcW00im/L2tKCsaKhSa2yP3XrRClpS/MSdrALMiwe2r9XihGZtACZXxE6HDzezp+IpXxflWvDm9sOPH/8DsynzJl66AAA="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACtVd25LbOJL9F/m1WhbAu996PLMTjtnp7Zje7ZcKR4VKRbvUrUtZF9sTDv/7EiBBZqaQBEhQ5ZoXlywCyIM8iQRwQFLfZof9l+Psze232Z/r3cPsjVwUmUjkzWy33JazN7N3/3P/R7k6/XV5Ws5uZufDpvru9O+n8vgaXJk/nrab6vJqszwey6q52ez7jWkxTZIobdu7u1O1HU29akuBFm9mT8tDuTsRUJ0hsZBxa+fzcnP2NDM3ZZ3G5g0uxu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9DYr7VSV7XsdGPE9kOvKVXbBqga0zQ2XqvZBF4KeAj1m16tVxeP53roBhwv2nGPnIrzgtNpQ2yqR9V+zDzcSbNaMjFZcNVqoMDWFETyF0UNEZhrPWk3V5DGz75JtOpQtAs5/7KpfgP6wtb+oORmN+wgk58S6En9/M3taP5WbdTV9vbl9//37/wMb79zz+MsAAA=="; \ No newline at end of file diff --git a/docs/classes/NextUI_2_2.html b/docs/classes/NextUI_2_2.html index 9ccaad9..36599c5 100644 --- a/docs/classes/NextUI_2_2.html +++ b/docs/classes/NextUI_2_2.html @@ -1,5 +1,5 @@ -NextUI_2_2 | Hook Form React - v2.0.0

NextUI 2.2 绑定组件属性 快速填写

-

Constructors

constructor +NextUI_2_2 | Hook Form React - v2.1.0

NextUI 2.2 绑定组件属性 快速填写

+

Constructors

Methods

Constructors

Methods

  • 字符串值绑定(value/onValueChange)

    -

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        onValueChange: ((value) => void);
        value: string;
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • onValueChange: ((value) => void)
        • (value): void
        • Parameters

          • value: string

          Returns void

    • value: string
  • 绑定value/onChange(value)

    -

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        onChange: ((value) => void);
        value: any;
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • onChange: ((value) => void)
        • (value): void
        • Parameters

          • value: any

          Returns void

    • value: any
  • HTML原生Input 绑定

    +

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        onValueChange: ((value) => void);
        value: string;
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • onValueChange: ((value) => void)
        • (value): void
        • Parameters

          • value: string

          Returns void

    • value: string
  • 绑定value/onChange(value)

    +

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        onChange: ((value) => void);
        value: any;
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • onChange: ((value) => void)
        • (value): void
        • Parameters

          • value: any

          Returns void

    • value: any
  • HTML原生Input 绑定

    Parameters

    Returns {
        onChange: ((e) => void);
        value: string;
    }

    • onChange: ((e) => void)
        • (e): void
        • Parameters

          • e: any

          Returns void

    • value: string
  • NextUI_Checkbox

    -

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        isSelected: boolean;
        onValueChange: ((value) => void);
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • isSelected: boolean
    • onValueChange: ((value) => void)
        • (value): void
        • Parameters

          • value: boolean

          Returns void

  • NextUI 表单错误绑定

    +

Returns {
    onChange: ((e) => void);
    value: string;
}

  • onChange: ((e) => void)
      • (e): void
      • Parameters

        • e: any

        Returns void

  • value: string
  • NextUI_Checkbox

    +

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        isSelected: boolean;
        onValueChange: ((value) => void);
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • isSelected: boolean
    • onValueChange: ((value) => void)
        • (value): void
        • Parameters

          • value: boolean

          Returns void

  • NextUI 表单错误绑定

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
  • NextUI_Input

    -

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        onChange: ((e) => void);
        value: string;
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • onChange: ((e) => void)
        • (e): void
        • Parameters

          • e: any

          Returns void

    • value: string
  • NextUI_RadioGroup

    -

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        onValueChange: ((value) => void);
        value: string;
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • onValueChange: ((value) => void)
        • (value): void
        • Parameters

          • value: string

          Returns void

    • value: string
  • NextUI_Select_Single

    -

    Type Parameters

    • T = any

    Parameters

    Returns Partial<SelectProps<T>>

  • NextUI_Select_Multiple

    -

    Type Parameters

    • T = any

    Parameters

    Returns Partial<SelectProps<T>>

  • NextUI_Slider

    -

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        onChange: ((value) => void);
        value: any;
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • onChange: ((value) => void)
        • (value): void
        • Parameters

          • value: any

          Returns void

    • value: any
  • NextUI_Switch

    -

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        isSelected: boolean;
        onValueChange: ((value) => void);
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • isSelected: boolean
    • onValueChange: ((value) => void)
        • (value): void
        • Parameters

          • value: boolean

          Returns void

  • NextUI_TextArea

    -

    Parameters

    Returns {
        errorMessage: ReactNode;
        isInvalid: undefined | boolean;
        onValueChange: ((value) => void);
        value: string;
    }

    • errorMessage: ReactNode
    • isInvalid: undefined | boolean
    • onValueChange: ((value) => void)
        • (value): void
        • Parameters

          • value: string

          Returns void

    • value: string

Generated using TypeDoc

\ No newline at end of file +

Returns {
    errorMessage: ReactNode;
    isInvalid: undefined | boolean;
}

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/classes/Verifications.html b/docs/classes/Verifications.html index d58765a..d2c2b4d 100644 --- a/docs/classes/Verifications.html +++ b/docs/classes/Verifications.html @@ -1,5 +1,5 @@ -Verifications | Hook Form React - v2.0.0

Class Verifications

基础校验规则

-

Constructors

constructor +Verifications | Hook Form React - v2.1.0

Class Verifications

基础校验规则

+

Constructors

Methods

chinese date email @@ -24,36 +24,36 @@ url username wechat -

Constructors

Methods

  • 中文字符正则表达式

    -

    Parameters

    • Optional msg: string = '必须包含中文字符'

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 日期(YYYY-MM-DD格式)正则表达式

    -

    Parameters

    • __namedParameters: {
          dash: undefined | string;
          msg: undefined | string;
      } = {}
      • dash: undefined | string
      • msg: undefined | string

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 电子邮件地址正则表达式(简单版,仅匹配基本的电子邮件格式)

    -

    Parameters

    • Optional msg: string = '电子邮件地址格式有误'

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 浮点数正则表达式(正浮点数和负浮点数)

    -

    Parameters

    • Optional msg: string = '浮点数格式有误'

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 十六进制颜色正则表达式

    -

    Parameters

    • Optional msg: string = '十六进制颜色格式有误'

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 身份证号码(简单版,15位或18位)正则表达式

    -

    Parameters

    • Optional msg: string = '身份证号码格式有误'

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 整数正则表达式(正整数和负整数)

    -

    Parameters

    • Optional msg: string = '整数格式有误'

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • IP地址(IPv4)正则表达式

    -

    Parameters

    • Optional msg: string = 'IP地址格式有误'

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 数量最大值

    +

Constructors

Methods

  • 中文字符正则表达式

    +

    Parameters

    • Optional msg: string = '必须包含中文字符'

    Returns Partial<{
        execute?: ((value, content) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 日期(YYYY-MM-DD格式)正则表达式

    +

    Parameters

    • __namedParameters: {
          dash: undefined | string;
          msg: undefined | string;
      } = {}
      • dash: undefined | string
      • msg: undefined | string

    Returns Partial<{
        execute?: ((value, content) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 电子邮件地址正则表达式(简单版,仅匹配基本的电子邮件格式)

    +

    Parameters

    • Optional msg: string = '电子邮件地址格式有误'

    Returns Partial<{
        execute?: ((value, content) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 浮点数正则表达式(正浮点数和负浮点数)

    +

    Parameters

    • Optional msg: string = '浮点数格式有误'

    Returns Partial<{
        execute?: ((value, content) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 十六进制颜色正则表达式

    +

    Parameters

    • Optional msg: string = '十六进制颜色格式有误'

    Returns Partial<{
        execute?: ((value, content) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 身份证号码(简单版,15位或18位)正则表达式

    +

    Parameters

    • Optional msg: string = '身份证号码格式有误'

    Returns Partial<{
        execute?: ((value, content) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 整数正则表达式(正整数和负整数)

    +

    Parameters

    • Optional msg: string = '整数格式有误'

    Returns Partial<{
        execute?: ((value, content) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • IP地址(IPv4)正则表达式

    +

    Parameters

    • Optional msg: string = 'IP地址格式有误'

    Returns Partial<{
        execute?: ((value, content) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 数量最大值

    Parameters

    • num: number

      最大数

    • msg: string = ''

      输入不能大于${num}

      -

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 数组/字符 最大限制

    +

Returns Partial<{
    execute?: ((value, content) => Promise<boolean>);
    msg: string;
    regex?: RegExp;
}>

  • 数组/字符 最大限制

    Parameters

    • num: number

      最大数量

    • msg: string = ''

      位数不能大于${num}

      -

    Returns Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

  • 数量最小值

    +

Returns Partial<{
    execute?: ((value, content) => Promise<boolean>);
    msg: string;
    regex?: RegExp;
}>

Returns Partial<{
    execute?: ((value, content) => Promise<boolean>);
    msg: string;
    regex?: RegExp;
}>

Generated using TypeDoc

\ No newline at end of file +

Returns Partial<{
    execute?: ((value, content) => Promise<boolean>);
    msg: string;
    regex?: RegExp;
}>

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/functions/getPromise.html b/docs/functions/getPromise.html new file mode 100644 index 0000000..a4c5249 --- /dev/null +++ b/docs/functions/getPromise.html @@ -0,0 +1,2 @@ +getPromise | Hook Form React - v2.1.0

Function getPromise

  • 获取一个Promise 外置了reslove,reject

    +

    Type Parameters

    • T

    Returns {
        promise: Promise<T>;
        reject: ((err) => void);
        reslove: ((value) => void);
    }

    • promise: Promise<T>
    • reject: ((err) => void)
        • (err): void
        • Parameters

          • err: any

          Returns void

    • reslove: ((value) => void)
        • (value): void
        • Parameters

          • value: T

          Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/functions/useAttr.html b/docs/functions/useAttr.html index 85efdfb..bbc9dcf 100644 --- a/docs/functions/useAttr.html +++ b/docs/functions/useAttr.html @@ -1,2 +1,2 @@ -useAttr | Hook Form React - v2.0.0

Function useAttr

  • 组件表单快速绑定

    -

    Type Parameters

    • T

    Parameters

    Returns {
        NextUI: typeof NextUI_2_2;
        <R, K, V>(key, renderAttr): R;
    }

      • <R, K, V>(key, renderAttr): R
      • Type Parameters

        • R
        • K extends string | number | symbol = keyof T
        • V = T[K]

        Parameters

        Returns R

    • NextUI: typeof NextUI_2_2

Generated using TypeDoc

\ No newline at end of file +useAttr | Hook Form React - v2.1.0

Function useAttr

  • 组件表单快速绑定

    +

    Type Parameters

    • T

    Parameters

    Returns {
        NextUI: typeof NextUI_2_2;
        <R, K, V>(key, renderAttr): R;
    }

      • <R, K, V>(key, renderAttr): R
      • Type Parameters

        • R
        • K extends string | number | symbol = keyof T
        • V = T[K]

        Parameters

        Returns R

    • NextUI: typeof NextUI_2_2

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/functions/useFormData.html b/docs/functions/useFormData.html index 5782a8e..f9f90d0 100644 --- a/docs/functions/useFormData.html +++ b/docs/functions/useFormData.html @@ -1,11 +1,13 @@ -useFormData | Hook Form React - v2.0.0

Function useFormData

  • 表单数据,表单验证和错误

    -

    Type Parameters

    • T extends Record<string, any> = Record<string, any>

    Parameters

    • defaultValue: T
    • verifications: Partial<{
          [P in string | number | symbol]: IVerification<T[P]>
      }> = {}

    Returns {
        assignValue: ((value) => void);
        doAllValidate: (() => Promise<boolean>);
        doValidate: (<K>(key) => Promise<{
            errors: Partial<{
                execute?: ((value) => Promise<boolean>);
                msg: string;
                regex?: RegExp;
            }>[];
            isTrue: boolean;
        }>);
        errors: Partial<Record<keyof T, IError>>;
        formData: {
            assignValue: ((value) => void);
            pushValue: (<K, V>(key, value) => void);
            setValue: Dispatch<SetStateAction<T>>;
            value: T;
        };
        formErrors: {
            assignValue: ((value) => void);
            pushValue: (<K, V>(key, value) => void);
            reset: ((value?) => void);
            setValue: Dispatch<SetStateAction<Partial<Record<keyof T, IError>>>>;
            value: Partial<Record<keyof T, IError>>;
        };
        isVerified: (() => boolean);
        pushValue: (<K, V>(key, value) => void);
        reset: ((value?) => void);
        setValue: Dispatch<SetStateAction<T>>;
        value: T;
    }

    • assignValue: ((value) => void)
        • (value): void
        • 更新对象的部分值,其他值保持

          -

          Parameters

          • value: Partial<T>

          Returns void

    • doAllValidate: (() => Promise<boolean>)
        • (): Promise<boolean>
        • Returns Promise<boolean>

    • doValidate: (<K>(key) => Promise<{
          errors: Partial<{
              execute?: ((value) => Promise<boolean>);
              msg: string;
              regex?: RegExp;
          }>[];
          isTrue: boolean;
      }>)
        • <K>(key): Promise<{
              errors: Partial<{
                  execute?: ((value) => Promise<boolean>);
                  msg: string;
                  regex?: RegExp;
              }>[];
              isTrue: boolean;
          }>
        • Type Parameters

          • K extends string | number | symbol

          Parameters

          • key: K

          Returns Promise<{
              errors: Partial<{
                  execute?: ((value) => Promise<boolean>);
                  msg: string;
                  regex?: RegExp;
              }>[];
              isTrue: boolean;
          }>

    • errors: Partial<Record<keyof T, IError>>

      错误状态

      -
    • formData: {
          assignValue: ((value) => void);
          pushValue: (<K, V>(key, value) => void);
          setValue: Dispatch<SetStateAction<T>>;
          value: T;
      }
      • assignValue: ((value) => void)
          • (value): void
          • 更新对象的部分值,其他值保持

            -

            Parameters

            • value: Partial<T>

            Returns void

      • pushValue: (<K, V>(key, value) => void)
          • <K, V>(key, value): void
          • 给对象的指定属性赋值

            -

            Type Parameters

            • K extends string | number | symbol
            • V extends any = T[K]

            Parameters

            Returns void

      • setValue: Dispatch<SetStateAction<T>>
      • value: T
    • formErrors: {
          assignValue: ((value) => void);
          pushValue: (<K, V>(key, value) => void);
          reset: ((value?) => void);
          setValue: Dispatch<SetStateAction<Partial<Record<keyof T, IError>>>>;
          value: Partial<Record<keyof T, IError>>;
      }
      • assignValue: ((value) => void)
          • (value): void
          • 更新对象的部分值,其他值保持

            -

            Parameters

            • value: Partial<Partial<Record<keyof T, IError>>>

            Returns void

      • pushValue: (<K, V>(key, value) => void)
          • <K, V>(key, value): void
          • 给对象的指定属性赋值

            -

            Type Parameters

            • K extends string | number | symbol
            • V extends undefined | IError = Partial<Record<keyof T, IError>>[K]

            Parameters

            Returns void

      • reset: ((value?) => void)

        重置为默认值

        -
          • (value?): void
          • Parameters

            • value: undefined | Partial<Partial<Record<keyof T, IError>>> = undefined

            Returns void

      • setValue: Dispatch<SetStateAction<Partial<Record<keyof T, IError>>>>
      • value: Partial<Record<keyof T, IError>>
    • isVerified: (() => boolean)
        • (): boolean
        • Returns boolean

    • pushValue: (<K, V>(key, value) => void)
        • <K, V>(key, value): void
        • 给对象的指定属性赋值

          -

          Type Parameters

          • K extends string | number | symbol
          • V extends any = T[K]

          Parameters

          Returns void

    • reset: ((value?) => void)
        • (value?): void
        • Parameters

          • value: undefined | T = undefined

          Returns void

    • setValue: Dispatch<SetStateAction<T>>
    • value: T

    Description

    处理不了嵌套对象验证

    -

Generated using TypeDoc

\ No newline at end of file +useFormData | Hook Form React - v2.1.0

Function useFormData

  • 表单数据,表单验证和错误

    +

    Type Parameters

    • T extends Record<string, any> = Record<string, any>

    Parameters

    • defaultValue: T
    • verifications: Partial<{
          [P in string | number | symbol]: IVerification<T[P]>
      }> = {}

    Returns {
        assignValue: ((value) => void);
        doAllValidate: (() => Promise<boolean>);
        doAllValidateImme: (() => Promise<{
            data: T;
            isValid: boolean;
        }>);
        doValidate: (<K>(key) => Promise<{
            errors: Partial<{
                execute?: ((value, content) => Promise<boolean>);
                msg: string;
                regex?: RegExp;
            }>[];
            isTrue: boolean;
        }>);
        doValidateImme: (<K>(key) => Promise<{
            errors: Partial<{
                execute?: ((value, content) => Promise<boolean>);
                msg: string;
                regex?: RegExp;
            }>[];
            isTrue: boolean;
        }>);
        errors: Partial<Record<keyof T, IError>>;
        formData: {
            assignValue: ((value) => void);
            pushValue: (<K, V>(key, value) => void);
            setValue: Dispatch<SetStateAction<T>>;
            value: T;
        };
        formErrors: {
            assignValue: ((value) => void);
            pushValue: (<K, V>(key, value) => void);
            reset: ((value?) => void);
            setValue: Dispatch<SetStateAction<Partial<Record<keyof T, IError>>>>;
            value: Partial<Record<keyof T, IError>>;
        };
        isVerified: (() => boolean);
        pushValue: (<K, V>(key, value) => void);
        reset: ((value?) => void);
        setValue: Dispatch<SetStateAction<T>>;
        value: T;
    }

    • assignValue: ((value) => void)
        • (value): void
        • 更新对象的部分值,其他值保持

          +

          Parameters

          • value: Partial<T>

          Returns void

    • doAllValidate: (() => Promise<boolean>)
        • (): Promise<boolean>
        • Returns Promise<boolean>

    • doAllValidateImme: (() => Promise<{
          data: T;
          isValid: boolean;
      }>)
        • (): Promise<{
              data: T;
              isValid: boolean;
          }>
        • 解决React赋值后马上验证获取不到最新数据的异常

          +

          Returns Promise<{
              data: T;
              isValid: boolean;
          }>

    • doValidate: (<K>(key) => Promise<{
          errors: Partial<{
              execute?: ((value, content) => Promise<boolean>);
              msg: string;
              regex?: RegExp;
          }>[];
          isTrue: boolean;
      }>)
        • <K>(key): Promise<{
              errors: Partial<{
                  execute?: ((value, content) => Promise<boolean>);
                  msg: string;
                  regex?: RegExp;
              }>[];
              isTrue: boolean;
          }>
        • Type Parameters

          • K extends string | number | symbol

          Parameters

          • key: K

          Returns Promise<{
              errors: Partial<{
                  execute?: ((value, content) => Promise<boolean>);
                  msg: string;
                  regex?: RegExp;
              }>[];
              isTrue: boolean;
          }>

    • doValidateImme: (<K>(key) => Promise<{
          errors: Partial<{
              execute?: ((value, content) => Promise<boolean>);
              msg: string;
              regex?: RegExp;
          }>[];
          isTrue: boolean;
      }>)
        • <K>(key): Promise<{
              errors: Partial<{
                  execute?: ((value, content) => Promise<boolean>);
                  msg: string;
                  regex?: RegExp;
              }>[];
              isTrue: boolean;
          }>
        • 解决React赋值后马上验证获取不到最新数据的异常

          +

          Type Parameters

          • K extends string | number | symbol

          Parameters

          • key: K

          Returns Promise<{
              errors: Partial<{
                  execute?: ((value, content) => Promise<boolean>);
                  msg: string;
                  regex?: RegExp;
              }>[];
              isTrue: boolean;
          }>

    • errors: Partial<Record<keyof T, IError>>

      错误状态

      +
    • formData: {
          assignValue: ((value) => void);
          pushValue: (<K, V>(key, value) => void);
          setValue: Dispatch<SetStateAction<T>>;
          value: T;
      }
      • assignValue: ((value) => void)
          • (value): void
          • 更新对象的部分值,其他值保持

            +

            Parameters

            • value: Partial<T>

            Returns void

      • pushValue: (<K, V>(key, value) => void)
          • <K, V>(key, value): void
          • 给对象的指定属性赋值

            +

            Type Parameters

            • K extends string | number | symbol
            • V extends any = T[K]

            Parameters

            Returns void

      • setValue: Dispatch<SetStateAction<T>>
      • value: T
    • formErrors: {
          assignValue: ((value) => void);
          pushValue: (<K, V>(key, value) => void);
          reset: ((value?) => void);
          setValue: Dispatch<SetStateAction<Partial<Record<keyof T, IError>>>>;
          value: Partial<Record<keyof T, IError>>;
      }
      • assignValue: ((value) => void)
          • (value): void
          • 更新对象的部分值,其他值保持

            +

            Parameters

            • value: Partial<Partial<Record<keyof T, IError>>>

            Returns void

      • pushValue: (<K, V>(key, value) => void)
          • <K, V>(key, value): void
          • 给对象的指定属性赋值

            +

            Type Parameters

            • K extends string | number | symbol
            • V extends undefined | IError = Partial<Record<keyof T, IError>>[K]

            Parameters

            Returns void

      • reset: ((value?) => void)

        重置为默认值

        +
          • (value?): void
          • Parameters

            • value: undefined | Partial<Partial<Record<keyof T, IError>>> = undefined

            Returns void

      • setValue: Dispatch<SetStateAction<Partial<Record<keyof T, IError>>>>
      • value: Partial<Record<keyof T, IError>>
    • isVerified: (() => boolean)
        • (): boolean
        • Returns boolean

    • pushValue: (<K, V>(key, value) => void)
        • <K, V>(key, value): void
        • 给对象的指定属性赋值

          +

          Type Parameters

          • K extends string | number | symbol
          • V extends any = T[K]

          Parameters

          Returns void

    • reset: ((value?) => void)
        • (value?): void
        • Parameters

          • value: undefined | T = undefined

          Returns void

    • setValue: Dispatch<SetStateAction<T>>
    • value: T

    Description

    处理不了嵌套对象验证

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/functions/useObjectData.html b/docs/functions/useObjectData.html index 78df193..c5aa0e9 100644 --- a/docs/functions/useObjectData.html +++ b/docs/functions/useObjectData.html @@ -1,5 +1,5 @@ -useObjectData | Hook Form React - v2.0.0

Function useObjectData

  • 用于处理表单等对象型数据

    +useObjectData | Hook Form React - v2.1.0

    Function useObjectData

    • 用于处理表单等对象型数据

      Type Parameters

      • T extends Record<string, any> = Record<string, any>

      Parameters

      • defaultValue: T

      Returns {
          assignValue: ((value) => void);
          pushValue: (<K, V>(key, value) => void);
          reset: ((value?) => void);
          setValue: Dispatch<SetStateAction<T>>;
          value: T;
      }

      • assignValue: ((value) => void)
          • (value): void
          • 更新对象的部分值,其他值保持

            Parameters

            • value: Partial<T>

            Returns void

      • pushValue: (<K, V>(key, value) => void)
          • <K, V>(key, value): void
          • 给对象的指定属性赋值

            Type Parameters

            • K extends string | number | symbol
            • V extends any = T[K]

            Parameters

            Returns void

      • reset: ((value?) => void)

        重置为默认值

        -
          • (value?): void
          • Parameters

            • value: undefined | Partial<T> = undefined

            Returns void

      • setValue: Dispatch<SetStateAction<T>>
      • value: T

    Generated using TypeDoc

    \ No newline at end of file +
      • (value?): void
      • Parameters

        • value: undefined | Partial<T> = undefined

        Returns void

  • setValue: Dispatch<SetStateAction<T>>
  • value: T

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/functions/useObjectState.html b/docs/functions/useObjectState.html index 7c670ec..6905928 100644 --- a/docs/functions/useObjectState.html +++ b/docs/functions/useObjectState.html @@ -1,4 +1,4 @@ -useObjectState | Hook Form React - v2.0.0

Function useObjectState

  • 处理ObjectState,但不存储数据

    +useObjectState | Hook Form React - v2.1.0

    Function useObjectState

    • 处理ObjectState,但不存储数据

      Type Parameters

      • T extends Record<string, any> = Record<string, any>

      Parameters

      • value: T
      • setValue: Dispatch<SetStateAction<T>>

      Returns {
          assignValue: ((value) => void);
          pushValue: (<K, V>(key, value) => void);
          setValue: Dispatch<SetStateAction<T>>;
          value: T;
      }

      • assignValue: ((value) => void)
          • (value): void
          • 更新对象的部分值,其他值保持

            Parameters

            • value: Partial<T>

            Returns void

      • pushValue: (<K, V>(key, value) => void)
          • <K, V>(key, value): void
          • 给对象的指定属性赋值

            -

            Type Parameters

            • K extends string | number | symbol
            • V extends any = T[K]

            Parameters

            Returns void

      • setValue: Dispatch<SetStateAction<T>>
      • value: T

    Generated using TypeDoc

    \ No newline at end of file +

    Type Parameters

    • K extends string | number | symbol
    • V extends any = T[K]

    Parameters

    Returns void

  • setValue: Dispatch<SetStateAction<T>>
  • value: T
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/useSubFormData.html b/docs/functions/useSubFormData.html index 6fc11b2..c0e705a 100644 --- a/docs/functions/useSubFormData.html +++ b/docs/functions/useSubFormData.html @@ -1,10 +1,12 @@ -useSubFormData | Hook Form React - v2.0.0

    Function useSubFormData

    • 表单数据,嵌套表单验证

      -

      Type Parameters

      • T extends Record<string, any> = Record<string, any>
      • K extends string | number | symbol = keyof T
      • V extends any = T[K]

      Parameters

      Returns {
          assignValue: ((value) => void);
          doAllValidate: (() => Promise<boolean>);
          doValidate: (<K>(key) => Promise<{
              errors: Partial<{
                  execute?: ((value) => Promise<boolean>);
                  msg: string;
                  regex?: RegExp;
              }>[];
              isTrue: boolean;
          }>);
          errors: Partial<Record<keyof V, IError>>;
          formData: {
              assignValue: ((value) => void);
              pushValue: (<K, V>(key, value) => void);
              setValue: Dispatch<SetStateAction<V>>;
              value: V;
          };
          formErrors: {
              assignValue: ((value) => void);
              pushValue: (<K, V>(key, value) => void);
              reset: ((value?) => void);
              setValue: Dispatch<SetStateAction<Partial<Record<keyof V, IError>>>>;
              value: Partial<Record<keyof V, IError>>;
          };
          isVerified: (() => boolean);
          pushValue: (<K, V>(key, value) => void);
          setValue: Dispatch<SetStateAction<V>>;
          value: V;
      }

      • assignValue: ((value) => void)
          • (value): void
          • 更新对象的部分值,其他值保持

            -

            Parameters

            • value: Partial<V>

            Returns void

      • doAllValidate: (() => Promise<boolean>)
          • (): Promise<boolean>
          • Returns Promise<boolean>

      • doValidate: (<K>(key) => Promise<{
            errors: Partial<{
                execute?: ((value) => Promise<boolean>);
                msg: string;
                regex?: RegExp;
            }>[];
            isTrue: boolean;
        }>)
          • <K>(key): Promise<{
                errors: Partial<{
                    execute?: ((value) => Promise<boolean>);
                    msg: string;
                    regex?: RegExp;
                }>[];
                isTrue: boolean;
            }>
          • Type Parameters

            • K extends string | number | symbol

            Parameters

            • key: K

            Returns Promise<{
                errors: Partial<{
                    execute?: ((value) => Promise<boolean>);
                    msg: string;
                    regex?: RegExp;
                }>[];
                isTrue: boolean;
            }>

      • errors: Partial<Record<keyof V, IError>>

        错误状态

        -
      • formData: {
            assignValue: ((value) => void);
            pushValue: (<K, V>(key, value) => void);
            setValue: Dispatch<SetStateAction<V>>;
            value: V;
        }
        • assignValue: ((value) => void)
            • (value): void
            • 更新对象的部分值,其他值保持

              -

              Parameters

              • value: Partial<V>

              Returns void

        • pushValue: (<K, V>(key, value) => void)
            • <K, V>(key, value): void
            • 给对象的指定属性赋值

              -

              Type Parameters

              • K extends string | number | symbol
              • V extends any = V[K]

              Parameters

              Returns void

        • setValue: Dispatch<SetStateAction<V>>
        • value: V
      • formErrors: {
            assignValue: ((value) => void);
            pushValue: (<K, V>(key, value) => void);
            reset: ((value?) => void);
            setValue: Dispatch<SetStateAction<Partial<Record<keyof V, IError>>>>;
            value: Partial<Record<keyof V, IError>>;
        }
        • assignValue: ((value) => void)
            • (value): void
            • 更新对象的部分值,其他值保持

              -

              Parameters

              • value: Partial<Partial<Record<keyof V, IError>>>

              Returns void

        • pushValue: (<K, V>(key, value) => void)
            • <K, V>(key, value): void
            • 给对象的指定属性赋值

              -

              Type Parameters

              • K extends string | number | symbol
              • V extends undefined | IError = Partial<Record<keyof V, IError>>[K]

              Parameters

              Returns void

        • reset: ((value?) => void)

          重置为默认值

          -
            • (value?): void
            • Parameters

              • value: undefined | Partial<Partial<Record<keyof V, IError>>> = undefined

              Returns void

        • setValue: Dispatch<SetStateAction<Partial<Record<keyof V, IError>>>>
        • value: Partial<Record<keyof V, IError>>
      • isVerified: (() => boolean)
          • (): boolean
          • Returns boolean

      • pushValue: (<K, V>(key, value) => void)
          • <K, V>(key, value): void
          • 给对象的指定属性赋值

            -

            Type Parameters

            • K extends string | number | symbol
            • V extends any = V[K]

            Parameters

            Returns void

      • setValue: Dispatch<SetStateAction<V>>
      • value: V

    Generated using TypeDoc

    \ No newline at end of file +useSubFormData | Hook Form React - v2.1.0

    Function useSubFormData

    • 表单数据,嵌套表单验证

      +

      Type Parameters

      • T extends Record<string, any> = Record<string, any>
      • K extends string | number | symbol = keyof T
      • V extends any = T[K]

      Parameters

      Returns {
          assignValue: ((value) => void);
          doAllValidate: (() => Promise<boolean>);
          doAllValidateImme: (() => Promise<{
              data: V;
              isValid: boolean;
          }>);
          doValidate: (<K>(key) => Promise<{
              errors: Partial<{
                  execute?: ((value, content) => Promise<boolean>);
                  msg: string;
                  regex?: RegExp;
              }>[];
              isTrue: boolean;
          }>);
          doValidateImme: (<K>(key) => Promise<{
              errors: Partial<{
                  execute?: ((value, content) => Promise<boolean>);
                  msg: string;
                  regex?: RegExp;
              }>[];
              isTrue: boolean;
          }>);
          errors: Partial<Record<keyof V, IError>>;
          formData: {
              assignValue: ((value) => void);
              pushValue: (<K, V>(key, value) => void);
              setValue: Dispatch<SetStateAction<V>>;
              value: V;
          };
          formErrors: {
              assignValue: ((value) => void);
              pushValue: (<K, V>(key, value) => void);
              reset: ((value?) => void);
              setValue: Dispatch<SetStateAction<Partial<Record<keyof V, IError>>>>;
              value: Partial<Record<keyof V, IError>>;
          };
          isVerified: (() => boolean);
          pushValue: (<K, V>(key, value) => void);
          setValue: Dispatch<SetStateAction<V>>;
          value: V;
      }

      • assignValue: ((value) => void)
          • (value): void
          • 更新对象的部分值,其他值保持

            +

            Parameters

            • value: Partial<V>

            Returns void

      • doAllValidate: (() => Promise<boolean>)
          • (): Promise<boolean>
          • Returns Promise<boolean>

      • doAllValidateImme: (() => Promise<{
            data: V;
            isValid: boolean;
        }>)
          • (): Promise<{
                data: V;
                isValid: boolean;
            }>
          • 解决React赋值后马上验证获取不到最新数据的异常

            +

            Returns Promise<{
                data: V;
                isValid: boolean;
            }>

      • doValidate: (<K>(key) => Promise<{
            errors: Partial<{
                execute?: ((value, content) => Promise<boolean>);
                msg: string;
                regex?: RegExp;
            }>[];
            isTrue: boolean;
        }>)
          • <K>(key): Promise<{
                errors: Partial<{
                    execute?: ((value, content) => Promise<boolean>);
                    msg: string;
                    regex?: RegExp;
                }>[];
                isTrue: boolean;
            }>
          • Type Parameters

            • K extends string | number | symbol

            Parameters

            • key: K

            Returns Promise<{
                errors: Partial<{
                    execute?: ((value, content) => Promise<boolean>);
                    msg: string;
                    regex?: RegExp;
                }>[];
                isTrue: boolean;
            }>

      • doValidateImme: (<K>(key) => Promise<{
            errors: Partial<{
                execute?: ((value, content) => Promise<boolean>);
                msg: string;
                regex?: RegExp;
            }>[];
            isTrue: boolean;
        }>)
          • <K>(key): Promise<{
                errors: Partial<{
                    execute?: ((value, content) => Promise<boolean>);
                    msg: string;
                    regex?: RegExp;
                }>[];
                isTrue: boolean;
            }>
          • 解决React赋值后马上验证获取不到最新数据的异常

            +

            Type Parameters

            • K extends string | number | symbol

            Parameters

            • key: K

            Returns Promise<{
                errors: Partial<{
                    execute?: ((value, content) => Promise<boolean>);
                    msg: string;
                    regex?: RegExp;
                }>[];
                isTrue: boolean;
            }>

      • errors: Partial<Record<keyof V, IError>>

        错误状态

        +
      • formData: {
            assignValue: ((value) => void);
            pushValue: (<K, V>(key, value) => void);
            setValue: Dispatch<SetStateAction<V>>;
            value: V;
        }
        • assignValue: ((value) => void)
            • (value): void
            • 更新对象的部分值,其他值保持

              +

              Parameters

              • value: Partial<V>

              Returns void

        • pushValue: (<K, V>(key, value) => void)
            • <K, V>(key, value): void
            • 给对象的指定属性赋值

              +

              Type Parameters

              • K extends string | number | symbol
              • V extends any = V[K]

              Parameters

              Returns void

        • setValue: Dispatch<SetStateAction<V>>
        • value: V
      • formErrors: {
            assignValue: ((value) => void);
            pushValue: (<K, V>(key, value) => void);
            reset: ((value?) => void);
            setValue: Dispatch<SetStateAction<Partial<Record<keyof V, IError>>>>;
            value: Partial<Record<keyof V, IError>>;
        }
        • assignValue: ((value) => void)
            • (value): void
            • 更新对象的部分值,其他值保持

              +

              Parameters

              • value: Partial<Partial<Record<keyof V, IError>>>

              Returns void

        • pushValue: (<K, V>(key, value) => void)
            • <K, V>(key, value): void
            • 给对象的指定属性赋值

              +

              Type Parameters

              • K extends string | number | symbol
              • V extends undefined | IError = Partial<Record<keyof V, IError>>[K]

              Parameters

              Returns void

        • reset: ((value?) => void)

          重置为默认值

          +
            • (value?): void
            • Parameters

              • value: undefined | Partial<Partial<Record<keyof V, IError>>> = undefined

              Returns void

        • setValue: Dispatch<SetStateAction<Partial<Record<keyof V, IError>>>>
        • value: Partial<Record<keyof V, IError>>
      • isVerified: (() => boolean)
          • (): boolean
          • Returns boolean

      • pushValue: (<K, V>(key, value) => void)
          • <K, V>(key, value): void
          • 给对象的指定属性赋值

            +

            Type Parameters

            • K extends string | number | symbol
            • V extends any = V[K]

            Parameters

            Returns void

      • setValue: Dispatch<SetStateAction<V>>
      • value: V

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index cdf5336..8ed1e64 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,6 +1,6 @@ -Hook Form React - v2.0.0

    Hook Form React - v2.0.0

    Hook Form React

    This library is a lightweight, dependency-free solution for form validation and submission designed specifically for React applications.

    +Hook Form React - v2.1.0

    Hook Form React - v2.1.0

    Hook Form React

    This library is a lightweight, dependency-free solution for form validation and submission designed specifically for React applications.

    该库是一个专为 React 应用设计的轻量级、无依赖的表单验证和提交解决方案。

    -

    中文 | English | API | Stackblitz

    +

    中文 | English | API | 示例:Stackblitz

    基于 React Hooks 和 TypeScript 开发,旨在提供一个简洁、高效且易于扩展的方式来处理表单验证和提交,无论是在简单还是复杂的表单场景中都能灵活应对。本库的设计哲学是兼容性和扩展性,理念是支持开发者以最少的代码实现最丰富的功能,不绑定任何 UI 组件库,从而支持所有 React 组件库。

    特点

    • 零依赖:避免了因引入外部依赖而可能导致的项目膨胀和兼容性问题。
    • @@ -17,13 +17,24 @@
    • MUI 组件: 组件未自带表单验证,一般使用 react-hook-form(体验并不好),所以后续会进行适配,但由于当前企业并未使用该套组件库,所以优先级并不高
    • -
    • v2.0.0(正式版)

      +
    • v2.1.0

      +
        +
      1. 修复立即赋值,立即验证时,获取不到最新的表单数据的问题(React.useState 异步执行导致的 bug), +新增两个方法:doValidateImme doAllValidateImme,当发现使用doValidate,doAllValidate存在问题时,相应替换一下对应的方法,原则上推荐优先使用doValidate,doAllValidate
      2. +
      +
    • +
    • v2.0.2

      +
        +
      1. 自定义校验规则,execute?: (value: V, content: any) => Promise<boolean> ,添加content参数用于获取表单上下文数据
      2. +
      +
    • +
    • v2.0.0

      1. 新增对象嵌套型表单的支持,具体可查看Stackblitz
      2. 添加 Stackblitz 示例项目(需要科学上网)
    • -
    • v1.0.0(正式版)

      +
    • v1.0.0

      1. 重构了验证规则实现类,使用会更友好,同时新增几个常用验证规则 所有的常用验证规则。验证规则并未完全经过测试,有问题欢迎@我。
      2. NextUI 组件:目前所有表单已经适配完成 所有已适配组件 (如有遗漏后续会补上,@手动 dog,嘿嘿)
      3. @@ -60,10 +71,10 @@
        // 高级用法:提供了辅助工具,可以使得开发更快捷,同时不丢失高度的可定制性
        import { Button, Input } from '@nextui-org/react'
        import { useAttr, useFormData, Verifications } from 'hook-form-react'

        export const Example = () => {
        const formData = useFormData(
        { password: '', username: '' },
        {
        // 支持多个校验
        password: [
        // 自带验证器必填校验
        // 开发者也可以自行在项目中补充其它验证规则,具体请看开发者文档(待补充)
        Verifications.required(),
        // 自带验证器密码校验
        Verifications.password()
        ],
        username: [
        // 自带验证器的必填校验 + 自定义提示
        Verifications.required('用户账户不能为空'),
        // 自带验证器的用户名校验
        Verifications.username()
        ]
        }
        )

        // 使用组件快速绑定hook
        const attr = useAttr(formData)

        const submit = async () => {
        const isValid = await formData.doAllValidate()
        console.log('submit:isValid: ', isValid)
        if (isValid) {
        console.log('formValue', formData.value)
        }
        }

        return (
        <div className="p-10 pt-18 pb-0 flex-col">
        <Input
        placeholder="请输入账户"
        // // 注释掉原有绑定逻辑
        // value={formData.value.username}
        // onChange={(e) => formData.pushValue('username', e.target.value)}
        // isInvalid={formData.errors.username?.isInvalid}
        // errorMessage={formData.errors.username?.msg}

        // 替换为快速绑定
        // NextUI.N_Input属于针对[NextUI.Input]的单独适配,其他组件正在补充中
        // 开发者也可以自行在项目中补充第三方组件,具体请看开发者文档(待补充)
        {...attr('username', attr.NextUI.N_Input)}
        ></Input>
        <Input
        autoComplete="new-password"
        type="password"
        placeholder="请输入登录密码"
        {...attr('password', attr.NextUI.N_Input)}
        // value={formData.value.password}
        // isInvalid={formData.errors.password?.isInvalid}
        // errorMessage={formData.errors.password?.msg}
        // onChange={(e) => formData.pushValue('password', e.target.value)}
        ></Input>

        <Button onClick={submit}>登录</Button>
        </div>
        )
        }

        嵌套对象表单

        新增一个 hook useSubFormData用于处理嵌套表单,原则上可以处理任意层数的对象嵌套(也就是无线套娃)。

        -
        // useSubFormData
        const value10Form = useSubFormData(formData.formData, 'value10', {
        haha: [Verifications.required(), Verifications.email()]
        })

        /**
        * 嵌套对象的表单组件需要用它来绑定
        */
        const attrValue10 = useAttr(value10Form)

        // 提交
        const submit = async () => {
        const isValid = await formData.doAllValidate()
        // 嵌套表单需要单独验证
        const isValidValue10 = await value10Form.doAllValidate()
        console.log('submit:isValid: ', isValid, isValidValue10)
        if (isValid && isValidValue10) {
        //顶层form能拿到所有value
        console.log('formValue', formData.value)
        }
        }

        // 重置
        const reset = () => {
        formData.reset()
        // 错误状态得单独重置
        value10Form.formErrors.reset()
        }
        +
        // useSubFormData
        const value10Form = useSubFormData(formData.formData, 'value10', {
        haha: [Verifications.required(), Verifications.email()]
        })

        /**
        * 嵌套对象的表单组件需要用它来绑定
        */
        const attrValue10 = useAttr(value10Form)

        // 提交
        const submit = async () => {
        const isValid = await formData.doAllValidate()
        // 嵌套表单需要单独验证
        const isValidValue10 = await value10Form.doAllValidate()
        console.log('submit:isValid: ', isValid, isValidValue10)
        if (isValid && isValidValue10) {
        //顶层form能拿到所有value
        console.log('formValue', formData.value)
        }
        }

        // 重置
        const reset = () => {
        formData.reset()
        // 错误状态得单独重置
        value10Form.formErrors.reset()
        }

        完整示例

        API 参考

        本节应详细介绍库中提供的 Hooks、函数及其参数、返回值类型和使用示例,以便开发者能够快速上手并有效利用库的功能。

        API

        贡献指南

        我们欢迎并鼓励社区成员对本项目做出贡献,无论是通过提交错误报告、功能请求还是直接提交代码。请参阅我们的贡献指南了解更多信息。

        许可证

        该项目采用 MIT 许可证,详情请见LICENSE文件。

        -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index d387b1e..1c40de2 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1,18 +1,21 @@ -Hook Form React - v2.0.0

    Hook Form React - v2.0.0

    Index

    Classes

    NextUI_2_2 +Hook Form React - v2.1.0

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/CallSetValue.html b/docs/types/CallSetValue.html index 1526b11..c818d17 100644 --- a/docs/types/CallSetValue.html +++ b/docs/types/CallSetValue.html @@ -1,2 +1,2 @@ -CallSetValue | Hook Form React - v2.0.0

    Type alias CallSetValue<V>

    CallSetValue<V>: V | ((oldValue) => V)

    可获取旧值的赋值

    -

    Type Parameters

    • V

    Type declaration

      • (oldValue): V
      • Parameters

        • oldValue: V

        Returns V

    Generated using TypeDoc

    \ No newline at end of file +CallSetValue | Hook Form React - v2.1.0

    Type alias CallSetValue<V>

    CallSetValue<V>: V | ((oldValue) => V)

    可获取旧值的赋值

    +

    Type Parameters

    • V

    Type declaration

      • (oldValue): V
      • Parameters

        • oldValue: V

        Returns V

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/IError.html b/docs/types/IError.html index a274330..87a6f7f 100644 --- a/docs/types/IError.html +++ b/docs/types/IError.html @@ -1,5 +1,5 @@ -IError | Hook Form React - v2.0.0

    Type alias IError

    IError: {
        errors: IVerificationItem<any>[];
        isInvalid: boolean;
        msg: React.ReactNode;
    }

    错误

    +IError | Hook Form React - v2.1.0

    Type alias IError

    IError: {
        errors: IVerificationItem<any>[];
        isInvalid: boolean;
        msg: React.ReactNode;
    }

    错误

    Type declaration

    • errors: IVerificationItem<any>[]

      当前字段的所有的错误

    • isInvalid: boolean

      是否错误

    • msg: React.ReactNode

      错误提示(存在多个时取第一个)

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/IErrors.html b/docs/types/IErrors.html index c37796c..8d254e1 100644 --- a/docs/types/IErrors.html +++ b/docs/types/IErrors.html @@ -1,2 +1,2 @@ -IErrors | Hook Form React - v2.0.0

    Type alias IErrors<T>

    IErrors<T>: Partial<Record<keyof T, IError>>

    错误集合

    -

    Type Parameters

    • T

    Generated using TypeDoc

    \ No newline at end of file +IErrors | Hook Form React - v2.1.0

    Type alias IErrors<T>

    IErrors<T>: Partial<Record<keyof T, IError>>

    错误集合

    +

    Type Parameters

    • T

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/IObjectData.html b/docs/types/IObjectData.html index 74e7d5f..4a76425 100644 --- a/docs/types/IObjectData.html +++ b/docs/types/IObjectData.html @@ -1 +1 @@ -IObjectData | Hook Form React - v2.0.0

    Type alias IObjectData<T>

    IObjectData<T>: {
        assignValue: ((value) => void);
        pushValue: (<K, V>(key, value) => void);
        reset?: ((value?) => void);
        setValue: React.Dispatch<React.SetStateAction<T>>;
        value: T;
    }

    Type Parameters

    • T

    Type declaration

    • assignValue: ((value) => void)
        • (value): void
        • Parameters

          • value: Partial<T>

          Returns void

    • pushValue: (<K, V>(key, value) => void)
        • <K, V>(key, value): void
        • Type Parameters

          • K extends keyof T
          • V extends T[K] = T[K]

          Parameters

          Returns void

    • Optional reset?: ((value?) => void)
        • (value?): void
        • Parameters

          • Optional value: Partial<T>

          Returns void

    • setValue: React.Dispatch<React.SetStateAction<T>>
    • value: T

    Generated using TypeDoc

    \ No newline at end of file +IObjectData | Hook Form React - v2.1.0

    Type alias IObjectData<T>

    IObjectData<T>: {
        assignValue: ((value) => void);
        pushValue: (<K, V>(key, value) => void);
        reset?: ((value?) => void);
        setValue: React.Dispatch<React.SetStateAction<T>>;
        value: T;
    }

    Type Parameters

    • T

    Type declaration

    • assignValue: ((value) => void)
        • (value): void
        • Parameters

          • value: Partial<T>

          Returns void

    • pushValue: (<K, V>(key, value) => void)
        • <K, V>(key, value): void
        • Type Parameters

          • K extends keyof T
          • V extends T[K] = T[K]

          Parameters

          Returns void

    • Optional reset?: ((value?) => void)
        • (value?): void
        • Parameters

          • Optional value: Partial<T>

          Returns void

    • setValue: React.Dispatch<React.SetStateAction<T>>
    • value: T

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/IValidateKey.html b/docs/types/IValidateKey.html new file mode 100644 index 0000000..4ca4948 --- /dev/null +++ b/docs/types/IValidateKey.html @@ -0,0 +1,3 @@ +IValidateKey | Hook Form React - v2.1.0

    Type alias IValidateKey<T>

    IValidateKey<T>: {
        key: keyof T;
        time: number;
    }

    Type Parameters

    • T

    Type declaration

    • key: keyof T

      验证属性

      +
    • time: number

      时间戳

      +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/IVerification.html b/docs/types/IVerification.html index 8b4195d..dc1aa6d 100644 --- a/docs/types/IVerification.html +++ b/docs/types/IVerification.html @@ -1,2 +1,2 @@ -IVerification | Hook Form React - v2.0.0

    Type alias IVerification<V>

    IVerification<V>: IVerificationItem<V>[]

    单值验证规则数组

    -

    Type Parameters

    • V

    Generated using TypeDoc

    \ No newline at end of file +IVerification | Hook Form React - v2.1.0

    Type alias IVerification<V>

    IVerification<V>: IVerificationItem<V>[]

    单值验证规则数组

    +

    Type Parameters

    • V

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/IVerificationItem.html b/docs/types/IVerificationItem.html index d7a7fb5..2dbcad0 100644 --- a/docs/types/IVerificationItem.html +++ b/docs/types/IVerificationItem.html @@ -1,8 +1,8 @@ -IVerificationItem | Hook Form React - v2.0.0

    Type alias IVerificationItem<V>

    IVerificationItem<V>: Partial<{
        execute?: ((value) => Promise<boolean>);
        msg: string;
        regex?: RegExp;
    }>

    验证规则: 如果同时设置了execute和regex,两者都通过才算验证通过

    -

    Type Parameters

    • V

    Type declaration

    • Optional execute?: ((value) => Promise<boolean>)

      自定义校验函数:异步

      +IVerificationItem | Hook Form React - v2.1.0

      Type alias IVerificationItem<V>

      IVerificationItem<V>: Partial<{
          execute?: ((value, content) => Promise<boolean>);
          msg: string;
          regex?: RegExp;
      }>

      验证规则: 如果同时设置了execute和regex,两者都通过才算验证通过

      +

      Type Parameters

      • V

      Type declaration

      • Optional execute?: ((value, content) => Promise<boolean>)

        自定义校验函数:异步

        Returns

        是否通过验证:true为通过,false为不通过

        -
          • (value): Promise<boolean>
          • Parameters

            • value: V

              要验证的值

              -

            Returns Promise<boolean>

      • msg: string

        /** +

          • (value, content): Promise<boolean>
          • Parameters

            • value: V

              要验证的值

              +
            • content: any

            Returns Promise<boolean>

      • msg: string

        /** 错误提示

      • Optional regex?: RegExp

        正则表达式

        -

      Generated using TypeDoc

      \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/IVerifications.html b/docs/types/IVerifications.html index eabb8f3..82a9a88 100644 --- a/docs/types/IVerifications.html +++ b/docs/types/IVerifications.html @@ -1,2 +1,2 @@ -IVerifications | Hook Form React - v2.0.0

    Type alias IVerifications<T, K>

    IVerifications<T, K>: Partial<{
        [P in K]: IVerification<T[P]>
    }>

    表单验证规则集合

    -

    Type Parameters

    • T
    • K extends keyof T = keyof T

    Generated using TypeDoc

    \ No newline at end of file +IVerifications | Hook Form React - v2.1.0

    Type alias IVerifications<T, K>

    IVerifications<T, K>: Partial<{
        [P in K]: IVerification<T[P]>
    }>

    表单验证规则集合

    +

    Type Parameters

    • T
    • K extends keyof T = keyof T

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/IuseAttr.html b/docs/types/IuseAttr.html index ba0e8b9..5070ed4 100644 --- a/docs/types/IuseAttr.html +++ b/docs/types/IuseAttr.html @@ -1 +1 @@ -IuseAttr | Hook Form React - v2.0.0

    Type alias IuseAttr<T, K>

    IuseAttr<T, K>: {
        errors: IErrors<T>;
        pushValue: ((key, value) => void);
        value: T;
    }

    Type Parameters

    • T
    • K extends keyof T = keyof T

    Type declaration

    • errors: IErrors<T>
    • pushValue: ((key, value) => void)
        • (key, value): void
        • Parameters

          • key: K
          • value: T[K]

          Returns void

    • value: T

    Generated using TypeDoc

    \ No newline at end of file +IuseAttr | Hook Form React - v2.1.0

    Type alias IuseAttr<T, K>

    IuseAttr<T, K>: {
        errors: IErrors<T>;
        pushValue: ((key, value) => void);
        value: T;
    }

    Type Parameters

    • T
    • K extends keyof T = keyof T

    Type declaration

    • errors: IErrors<T>
    • pushValue: ((key, value) => void)
        • (key, value): void
        • Parameters

          • key: K
          • value: T[K]

          Returns void

    • value: T

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/PasswordVerifProps.html b/docs/types/PasswordVerifProps.html new file mode 100644 index 0000000..8f0baa6 --- /dev/null +++ b/docs/types/PasswordVerifProps.html @@ -0,0 +1,14 @@ +PasswordVerifProps | Hook Form React - v2.1.0

    Type alias PasswordVerifProps

    PasswordVerifProps: Partial<{
        max: number;
        min: number;
        msg: string;
        mustLatter: boolean;
        mustNumber: boolean;
        mustSpecial: boolean;
    }>

    错误验证参数

    +

    Type declaration

    • max: number

      最大字符数

      +
    • min: number

      最小字符数

      +
    • msg: string

      错误提醒

      +
    • mustLatter: boolean

      至少一位字母:默认:true

      +

      Default

      true
      +
      +
    • mustNumber: boolean

      至少一位数字:默认:true

      +

      Default

      true
      +
      +
    • mustSpecial: boolean

      至少一位特殊字符:默认:true

      +

      Default

      true
      +
      +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/RenderAttr.html b/docs/types/RenderAttr.html index 5458bf9..2efb658 100644 --- a/docs/types/RenderAttr.html +++ b/docs/types/RenderAttr.html @@ -1,2 +1,2 @@ -RenderAttr | Hook Form React - v2.0.0

    Type alias RenderAttr<R, V>

    RenderAttr<R, V>: ((props) => R)

    自定义组件绑定的类型

    -

    Type Parameters

    • R
    • V

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file +RenderAttr | Hook Form React - v2.1.0

    Type alias RenderAttr<R, V>

    RenderAttr<R, V>: ((props) => R)

    自定义组件绑定的类型

    +

    Type Parameters

    • R
    • V

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/RenderAttrProps.html b/docs/types/RenderAttrProps.html index db04255..3c865ce 100644 --- a/docs/types/RenderAttrProps.html +++ b/docs/types/RenderAttrProps.html @@ -1,2 +1,2 @@ -RenderAttrProps | Hook Form React - v2.0.0

    Type alias RenderAttrProps<V>

    RenderAttrProps<V>: {
        isError: boolean | undefined;
        msg: React.ReactNode;
        setValue: ((value) => void);
        value: V;
    }

    绑定自定义组件的上下文信息

    -

    Type Parameters

    • V = unknown

    Type declaration

    • isError: boolean | undefined
    • msg: React.ReactNode
    • setValue: ((value) => void)
        • (value): void
        • Parameters

          • value: V

          Returns void

    • value: V

    Generated using TypeDoc

    \ No newline at end of file +RenderAttrProps | Hook Form React - v2.1.0

    Type alias RenderAttrProps<V>

    RenderAttrProps<V>: {
        isError: boolean | undefined;
        msg: React.ReactNode;
        setValue: ((value) => void);
        value: V;
    }

    绑定自定义组件的上下文信息

    +

    Type Parameters

    • V = unknown

    Type declaration

    • isError: boolean | undefined
    • msg: React.ReactNode
    • setValue: ((value) => void)
        • (value): void
        • Parameters

          • value: V

          Returns void

    • value: V

    Generated using TypeDoc

    \ No newline at end of file diff --git a/package.json b/package.json index 00b8975..dd8c79b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hook-form-react", - "version": "2.0.2", + "version": "2.1.0", "keywords": [ "react", "hooks",