mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 11:56:29 +00:00
fix(client): fix action component warning (#2818)
This commit is contained in:
parent
2a8cc10faa
commit
62d9200657
@ -38,6 +38,8 @@ export const Action: ComposedAction = observer(
|
|||||||
icon,
|
icon,
|
||||||
title,
|
title,
|
||||||
onClick,
|
onClick,
|
||||||
|
style,
|
||||||
|
openSize,
|
||||||
...others
|
...others
|
||||||
} = useProps(props);
|
} = useProps(props);
|
||||||
const { wrapSSR, componentCls, hashId } = useStyles();
|
const { wrapSSR, componentCls, hashId } = useStyles();
|
||||||
@ -54,7 +56,6 @@ export const Action: ComposedAction = observer(
|
|||||||
const designerProps = fieldSchema['x-designer-props'];
|
const designerProps = fieldSchema['x-designer-props'];
|
||||||
const openMode = fieldSchema?.['x-component-props']?.['openMode'];
|
const openMode = fieldSchema?.['x-component-props']?.['openMode'];
|
||||||
const disabled = form.disabled || field.disabled || field.data?.disabled || props.disabled;
|
const disabled = form.disabled || field.disabled || field.data?.disabled || props.disabled;
|
||||||
const openSize = fieldSchema?.['x-component-props']?.['openSize'];
|
|
||||||
const linkageRules = fieldSchema?.['x-linkage-rules'] || [];
|
const linkageRules = fieldSchema?.['x-linkage-rules'] || [];
|
||||||
const { designable } = useDesignable();
|
const { designable } = useDesignable();
|
||||||
const tarComponent = useComponent(component) || component;
|
const tarComponent = useComponent(component) || component;
|
||||||
@ -111,10 +112,10 @@ export const Action: ComposedAction = observer(
|
|||||||
|
|
||||||
const buttonStyle = useMemo(() => {
|
const buttonStyle = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
...others.style,
|
...style,
|
||||||
opacity: designable && field?.data?.hidden && 0.1,
|
opacity: designable && field?.data?.hidden && 0.1,
|
||||||
};
|
};
|
||||||
}, [designable, field?.data?.hidden, others.style]);
|
}, [designable, field?.data?.hidden, style]);
|
||||||
|
|
||||||
const renderButton = () => {
|
const renderButton = () => {
|
||||||
if (!designable && field?.data?.hidden) {
|
if (!designable && field?.data?.hidden) {
|
||||||
|
Loading…
Reference in New Issue
Block a user