@hzab/list-render 1.10.20-alpha.3 → 1.10.20-alpha.4
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
|
@@ -41,8 +41,10 @@ export const useSlotsComponents = (props) => {
|
|
|
41
41
|
Object.keys(formilyComponents || {}).forEach((key) => {
|
|
42
42
|
formilyComponents[key] = function (cProps) {
|
|
43
43
|
const field = useField();
|
|
44
|
-
|
|
45
|
-
const
|
|
44
|
+
// useIndex 适用于 ArrayTable 默认表单从 props 获取
|
|
45
|
+
const index = useIndex() ?? cProps.index;
|
|
46
|
+
// useRecord 适用于 ArrayTable 默认表单从 props 获取
|
|
47
|
+
const record = useRecord() ?? cProps.record;
|
|
46
48
|
|
|
47
49
|
const fieldSchema = useFieldSchema();
|
|
48
50
|
const name = fieldSchema.name;
|
|
@@ -59,7 +61,7 @@ export const useSlotsComponents = (props) => {
|
|
|
59
61
|
...cProps,
|
|
60
62
|
index,
|
|
61
63
|
record,
|
|
62
|
-
text: cProps.value,
|
|
64
|
+
text: cProps.value || cProps.text,
|
|
63
65
|
field: field,
|
|
64
66
|
fieldSchema: fieldSchema,
|
|
65
67
|
/** 原始组件 */
|