mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix(client): fix variable input value type (#4955)
This commit is contained in:
parent
e4fcf69e45
commit
7bc6746f0b
@ -123,10 +123,10 @@ function getTypedConstantOption(type: string, types: true | string[], fieldNames
|
|||||||
Object.keys(item).reduce(
|
Object.keys(item).reduce(
|
||||||
(result, key) =>
|
(result, key) =>
|
||||||
fieldNames[key] in item
|
fieldNames[key] in item
|
||||||
? result
|
? Object.assign(result, {
|
||||||
: Object.assign(result, {
|
|
||||||
[fieldNames[key]]: item[key],
|
[fieldNames[key]]: item[key],
|
||||||
}),
|
})
|
||||||
|
: result,
|
||||||
item,
|
item,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -397,9 +397,9 @@ export function Input(props: VariableInputProps) {
|
|||||||
<div style={{ flex: 1 }}>
|
<div style={{ flex: 1 }}>
|
||||||
{children && isFieldValue ? (
|
{children && isFieldValue ? (
|
||||||
children
|
children
|
||||||
) : (
|
) : ConstantComponent ? (
|
||||||
<ConstantComponent role="button" aria-label="variable-constant" value={value} onChange={onChange} />
|
<ConstantComponent role="button" aria-label="variable-constant" value={value} onChange={onChange} />
|
||||||
)}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Cascader
|
<Cascader
|
||||||
|
Loading…
x
Reference in New Issue
Block a user