@sheinx/base 3.9.3-beta.7 → 3.9.3-beta.9
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/cjs/form/form.type.d.ts +2 -2
- package/cjs/tree/tree.js +1 -1
- package/esm/form/form.type.d.ts +2 -2
- package/esm/tree/tree.js +1 -1
- package/package.json +2 -2
package/cjs/form/form.type.d.ts
CHANGED
|
@@ -26,12 +26,12 @@ export interface FormRef<FormValue> {
|
|
|
26
26
|
getValue: (name?: string) => any | FormValue;
|
|
27
27
|
/**
|
|
28
28
|
* @en Validate all fields in the entire form. Returns a Promise that resolves with the entire form data object (FormValue type) on successful validation, and rejects with error information on failure. Usually called before form submission to ensure all data validity
|
|
29
|
-
* @cn 校验整个表单的所有字段。返回一个 Promise,校验成功时 resolve
|
|
29
|
+
* @cn 校验整个表单的所有字段。返回一个 Promise,校验成功时 resolve(true),失败时 reject 错误信息。通常在提交表单前调用以确保所有数据的有效性
|
|
30
30
|
*/
|
|
31
31
|
validate: () => Promise<any>;
|
|
32
32
|
/**
|
|
33
33
|
* @en Validate specified form fields. The fields parameter is a field path, which can be a single path string or an array of paths. Field paths support: 'name' (top-level field), 'user.email' (nested object), 'list[0].name' (array element). Returns a Promise that resolves with the specified field data on success, and rejects with the first error encountered on failure. Suitable for step-by-step forms or partial validation scenarios
|
|
34
|
-
* @cn 校验指定的表单字段。fields 参数为字段路径,可以是单个路径字符串或路径数组。字段路径支持:'name'(顶层字段)、'user.email'(嵌套对象)、'list[0].name'(数组元素)。返回 Promise,成功时 resolve
|
|
34
|
+
* @cn 校验指定的表单字段。fields 参数为字段路径,可以是单个路径字符串或路径数组。字段路径支持:'name'(顶层字段)、'user.email'(嵌套对象)、'list[0].name'(数组元素)。返回 Promise,成功时 resolve(true),失败时 reject 第一个遇到的错误。适用于分步表单或部分校验场景
|
|
35
35
|
*/
|
|
36
36
|
validateFields: (fields: string | string[]) => Promise<any>;
|
|
37
37
|
/**
|
package/cjs/tree/tree.js
CHANGED
|
@@ -235,7 +235,7 @@ var Tree = function Tree(props) {
|
|
|
235
235
|
var realHeight = getHeight();
|
|
236
236
|
if (!realHeight) return null;
|
|
237
237
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_treeVirtual.default, _objectSpread(_objectSpread({}, props), {}, {
|
|
238
|
-
data: data,
|
|
238
|
+
data: props.filteredData || data,
|
|
239
239
|
line: line,
|
|
240
240
|
rowsInView: rowsInView,
|
|
241
241
|
expanded: expanded,
|
package/esm/form/form.type.d.ts
CHANGED
|
@@ -26,12 +26,12 @@ export interface FormRef<FormValue> {
|
|
|
26
26
|
getValue: (name?: string) => any | FormValue;
|
|
27
27
|
/**
|
|
28
28
|
* @en Validate all fields in the entire form. Returns a Promise that resolves with the entire form data object (FormValue type) on successful validation, and rejects with error information on failure. Usually called before form submission to ensure all data validity
|
|
29
|
-
* @cn 校验整个表单的所有字段。返回一个 Promise,校验成功时 resolve
|
|
29
|
+
* @cn 校验整个表单的所有字段。返回一个 Promise,校验成功时 resolve(true),失败时 reject 错误信息。通常在提交表单前调用以确保所有数据的有效性
|
|
30
30
|
*/
|
|
31
31
|
validate: () => Promise<any>;
|
|
32
32
|
/**
|
|
33
33
|
* @en Validate specified form fields. The fields parameter is a field path, which can be a single path string or an array of paths. Field paths support: 'name' (top-level field), 'user.email' (nested object), 'list[0].name' (array element). Returns a Promise that resolves with the specified field data on success, and rejects with the first error encountered on failure. Suitable for step-by-step forms or partial validation scenarios
|
|
34
|
-
* @cn 校验指定的表单字段。fields 参数为字段路径,可以是单个路径字符串或路径数组。字段路径支持:'name'(顶层字段)、'user.email'(嵌套对象)、'list[0].name'(数组元素)。返回 Promise,成功时 resolve
|
|
34
|
+
* @cn 校验指定的表单字段。fields 参数为字段路径,可以是单个路径字符串或路径数组。字段路径支持:'name'(顶层字段)、'user.email'(嵌套对象)、'list[0].name'(数组元素)。返回 Promise,成功时 resolve(true),失败时 reject 第一个遇到的错误。适用于分步表单或部分校验场景
|
|
35
35
|
*/
|
|
36
36
|
validateFields: (fields: string | string[]) => Promise<any>;
|
|
37
37
|
/**
|
package/esm/tree/tree.js
CHANGED
|
@@ -228,7 +228,7 @@ var Tree = function Tree(props) {
|
|
|
228
228
|
var realHeight = getHeight();
|
|
229
229
|
if (!realHeight) return null;
|
|
230
230
|
return /*#__PURE__*/_jsx(VirtualTree, _objectSpread(_objectSpread({}, props), {}, {
|
|
231
|
-
data: data,
|
|
231
|
+
data: props.filteredData || data,
|
|
232
232
|
line: line,
|
|
233
233
|
rowsInView: rowsInView,
|
|
234
234
|
expanded: expanded,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.9.3-beta.
|
|
3
|
+
"version": "3.9.3-beta.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"module": "./esm/index.js",
|
|
11
11
|
"typings": "./cjs/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sheinx/hooks": "3.9.3-beta.
|
|
13
|
+
"@sheinx/hooks": "3.9.3-beta.9",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.3.3"
|