mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:15:36 +00:00
fix(client): fix variable input style when disabled (#3071)
This commit is contained in:
parent
c81fb46071
commit
e0c7d09cab
@ -332,25 +332,24 @@ export function Input(props) {
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{options.length > 1 && !disabled ? (
|
||||
<Cascader
|
||||
options={options}
|
||||
value={variable ?? ['', ...(children || !constantOption.children?.length ? [] : [type])]}
|
||||
onChange={onSwitch}
|
||||
loadData={loadData as any}
|
||||
changeOnSelect={changeOnSelect}
|
||||
fieldNames={fieldNames}
|
||||
>
|
||||
{button ?? (
|
||||
<XButton
|
||||
className={css(`
|
||||
margin-left: -1px;
|
||||
`)}
|
||||
type={variable ? 'primary' : 'default'}
|
||||
/>
|
||||
)}
|
||||
</Cascader>
|
||||
) : null}
|
||||
<Cascader
|
||||
options={options}
|
||||
value={variable ?? ['', ...(children || !constantOption.children?.length ? [] : [type])]}
|
||||
onChange={onSwitch}
|
||||
loadData={loadData as any}
|
||||
changeOnSelect={changeOnSelect}
|
||||
fieldNames={fieldNames}
|
||||
disabled={disabled}
|
||||
>
|
||||
{button ?? (
|
||||
<XButton
|
||||
className={css(`
|
||||
margin-left: -1px;
|
||||
`)}
|
||||
type={variable ? 'primary' : 'default'}
|
||||
/>
|
||||
)}
|
||||
</Cascader>
|
||||
</Space.Compact>,
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user