@hi-ui/form 4.3.1 → 4.3.2
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/CHANGELOG.md +8 -0
- package/lib/cjs/index.js +2 -0
- package/lib/esm/index.js +1 -0
- package/lib/types/FormList.d.ts +18 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @hi-ui/form
|
|
2
2
|
|
|
3
|
+
## 4.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3160](https://github.com/XiaoMi/hiui/pull/3160) [`3244e5a`](https://github.com/XiaoMi/hiui/commit/3244e5a94d1cfa3d85a65bc8804a21b8b60b80a4) Thanks [@zyprepare](https://github.com/zyprepare)! - <br>
|
|
8
|
+
- feat(form): 入口新增 FormLabel 组件导出
|
|
9
|
+
- feat(form): 更新 FormListProps 中 children 渲染函数中 fields 参数的类型
|
|
10
|
+
|
|
3
11
|
## 4.3.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/lib/cjs/index.js
CHANGED
|
@@ -18,6 +18,7 @@ var FormItem = require('./FormItem.js');
|
|
|
18
18
|
var FormList = require('./FormList.js');
|
|
19
19
|
var FormSubmit = require('./FormSubmit.js');
|
|
20
20
|
var FormReset = require('./FormReset.js');
|
|
21
|
+
var FormLabel = require('./FormLabel.js');
|
|
21
22
|
var Form = Object.assign(Form$1.Form, {
|
|
22
23
|
Item: FormItem.FormItem,
|
|
23
24
|
List: FormList.FormList,
|
|
@@ -30,4 +31,5 @@ exports.FormItem = FormItem.FormItem;
|
|
|
30
31
|
exports.FormList = FormList.FormList;
|
|
31
32
|
exports.FormSubmit = FormSubmit.FormSubmit;
|
|
32
33
|
exports.FormReset = FormReset.FormReset;
|
|
34
|
+
exports.FormLabel = FormLabel.FormLabel;
|
|
33
35
|
exports["default"] = Form;
|
package/lib/esm/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { FormItem } from './FormItem.js';
|
|
|
14
14
|
import { FormList } from './FormList.js';
|
|
15
15
|
import { FormSubmit } from './FormSubmit.js';
|
|
16
16
|
import { FormReset } from './FormReset.js';
|
|
17
|
+
export { FormLabel } from './FormLabel.js';
|
|
17
18
|
var Form = Object.assign(Form$1, {
|
|
18
19
|
Item: FormItem,
|
|
19
20
|
List: FormList,
|
package/lib/types/FormList.d.ts
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HiBaseHTMLProps } from '@hi-ui/core';
|
|
3
3
|
import { FormFieldPath, FormListChildrenAction, FormListHelper } from './types';
|
|
4
|
+
declare const fieldListSymbol: unique symbol;
|
|
4
5
|
export declare const FormList: React.ForwardRefExoticComponent<FormListProps & React.RefAttributes<HTMLDivElement | null>>;
|
|
6
|
+
export interface FormListChildField {
|
|
7
|
+
/**
|
|
8
|
+
* 字段名
|
|
9
|
+
* - 实际上是元素在数组中的索引
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* 字段符号
|
|
14
|
+
*/
|
|
15
|
+
symbol: typeof fieldListSymbol;
|
|
16
|
+
/**
|
|
17
|
+
* 字段值
|
|
18
|
+
*/
|
|
19
|
+
value: unknown;
|
|
20
|
+
}
|
|
5
21
|
export interface FormListProps extends HiBaseHTMLProps<'div'> {
|
|
6
22
|
/**
|
|
7
23
|
* 表单控件渲染函数
|
|
8
24
|
*/
|
|
9
|
-
children?: (fields:
|
|
25
|
+
children?: (fields: FormListChildField[], action: FormListChildrenAction) => React.ReactElement;
|
|
10
26
|
/**
|
|
11
27
|
* 列表名称
|
|
12
28
|
*/
|
|
@@ -16,3 +32,4 @@ export interface FormListProps extends HiBaseHTMLProps<'div'> {
|
|
|
16
32
|
*/
|
|
17
33
|
innerRef?: React.Ref<FormListHelper>;
|
|
18
34
|
}
|
|
35
|
+
export {};
|
package/lib/types/index.d.ts
CHANGED