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,
 | 
			
		||||
      title,
 | 
			
		||||
      onClick,
 | 
			
		||||
      style,
 | 
			
		||||
      openSize,
 | 
			
		||||
      ...others
 | 
			
		||||
    } = useProps(props);
 | 
			
		||||
    const { wrapSSR, componentCls, hashId } = useStyles();
 | 
			
		||||
@ -54,7 +56,6 @@ export const Action: ComposedAction = observer(
 | 
			
		||||
    const designerProps = fieldSchema['x-designer-props'];
 | 
			
		||||
    const openMode = fieldSchema?.['x-component-props']?.['openMode'];
 | 
			
		||||
    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 { designable } = useDesignable();
 | 
			
		||||
    const tarComponent = useComponent(component) || component;
 | 
			
		||||
@ -111,10 +112,10 @@ export const Action: ComposedAction = observer(
 | 
			
		||||
 | 
			
		||||
    const buttonStyle = useMemo(() => {
 | 
			
		||||
      return {
 | 
			
		||||
        ...others.style,
 | 
			
		||||
        ...style,
 | 
			
		||||
        opacity: designable && field?.data?.hidden && 0.1,
 | 
			
		||||
      };
 | 
			
		||||
    }, [designable, field?.data?.hidden, others.style]);
 | 
			
		||||
    }, [designable, field?.data?.hidden, style]);
 | 
			
		||||
 | 
			
		||||
    const renderButton = () => {
 | 
			
		||||
      if (!designable && field?.data?.hidden) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user