mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +08:00
fix(client): fix components (#5651)
This commit is contained in:
parent
fd6b63d24f
commit
045cf01b05
@ -65,7 +65,6 @@ export const Action: ComposedAction = withDynamicSchemaProps(
|
|||||||
onClick,
|
onClick,
|
||||||
style,
|
style,
|
||||||
loading,
|
loading,
|
||||||
openSize: os,
|
|
||||||
disabled: propsDisabled,
|
disabled: propsDisabled,
|
||||||
actionCallback,
|
actionCallback,
|
||||||
confirm: propsConfirm,
|
confirm: propsConfirm,
|
||||||
@ -199,6 +198,8 @@ interface InternalActionProps {
|
|||||||
setSubmitted: (v: boolean) => void;
|
setSubmitted: (v: boolean) => void;
|
||||||
getAriaLabel: (postfix?: string) => string;
|
getAriaLabel: (postfix?: string) => string;
|
||||||
parentRecordData: any;
|
parentRecordData: any;
|
||||||
|
openMode?: ActionContextProps['openMode'];
|
||||||
|
openSize?: ActionContextProps['openSize'];
|
||||||
}
|
}
|
||||||
|
|
||||||
const InternalAction: React.FC<InternalActionProps> = observer(function Com(props) {
|
const InternalAction: React.FC<InternalActionProps> = observer(function Com(props) {
|
||||||
@ -231,14 +232,16 @@ const InternalAction: React.FC<InternalActionProps> = observer(function Com(prop
|
|||||||
setSubmitted,
|
setSubmitted,
|
||||||
getAriaLabel,
|
getAriaLabel,
|
||||||
parentRecordData,
|
parentRecordData,
|
||||||
|
openMode: om,
|
||||||
|
openSize: os,
|
||||||
...others
|
...others
|
||||||
} = props;
|
} = props;
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const { wrapSSR, componentCls, hashId } = useStyles();
|
const { wrapSSR, componentCls, hashId } = useStyles();
|
||||||
const [formValueChanged, setFormValueChanged] = useState(false);
|
const [formValueChanged, setFormValueChanged] = useState(false);
|
||||||
const designerProps = fieldSchema['x-toolbar-props'] || fieldSchema['x-designer-props'];
|
const designerProps = fieldSchema['x-toolbar-props'] || fieldSchema['x-designer-props'];
|
||||||
const openMode = fieldSchema?.['x-component-props']?.['openMode'];
|
const openMode = om ?? fieldSchema?.['x-component-props']?.['openMode'];
|
||||||
const openSize = fieldSchema?.['x-component-props']?.['openSize'];
|
const openSize = os ?? fieldSchema?.['x-component-props']?.['openSize'];
|
||||||
const refreshDataBlockRequest = fieldSchema?.['x-component-props']?.['refreshDataBlockRequest'];
|
const refreshDataBlockRequest = fieldSchema?.['x-component-props']?.['refreshDataBlockRequest'];
|
||||||
const { modal } = App.useApp();
|
const { modal } = App.useApp();
|
||||||
const form = useForm();
|
const form = useForm();
|
||||||
|
@ -12,7 +12,7 @@ export * from './FixedBlock';
|
|||||||
export * from './FixedBlockDesignerItem';
|
export * from './FixedBlockDesignerItem';
|
||||||
export * from './Page';
|
export * from './Page';
|
||||||
export * from './Page.Settings';
|
export * from './Page.Settings';
|
||||||
export { PagePopups } from './PagePopups';
|
export { PagePopups, useCurrentPopupContext } from './PagePopups';
|
||||||
export { getPopupPathFromParams, getStoredPopupContext, storePopupContext, withSearchParams } from './pagePopupUtils';
|
export { getPopupPathFromParams, getStoredPopupContext, storePopupContext, withSearchParams } from './pagePopupUtils';
|
||||||
export * from './PageTab.Settings';
|
export * from './PageTab.Settings';
|
||||||
export { PopupSettingsProvider, usePopupSettings } from './PopupSettingsProvider';
|
export { PopupSettingsProvider, usePopupSettings } from './PopupSettingsProvider';
|
||||||
|
@ -474,10 +474,10 @@ const columnOpacityStyle = {
|
|||||||
opacity: 0.3,
|
opacity: 0.3,
|
||||||
};
|
};
|
||||||
|
|
||||||
const HeaderCellComponent = (props) => {
|
const HeaderCellComponent = ({ columnHidden, ...props }) => {
|
||||||
const { designable } = useDesignable();
|
const { designable } = useDesignable();
|
||||||
|
|
||||||
if (props.columnHidden) {
|
if (columnHidden) {
|
||||||
return <th style={designable ? columnOpacityStyle : columnHiddenStyle}>{designable ? props.children : null}</th>;
|
return <th style={designable ? columnOpacityStyle : columnHiddenStyle}>{designable ? props.children : null}</th>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -515,10 +515,10 @@ const InternalBodyCellComponent = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const displayNone = { display: 'none' };
|
const displayNone = { display: 'none' };
|
||||||
const BodyCellComponent = (props) => {
|
const BodyCellComponent = ({ columnHidden, ...props }) => {
|
||||||
const { designable } = useDesignable();
|
const { designable } = useDesignable();
|
||||||
|
|
||||||
if (props.columnHidden) {
|
if (columnHidden) {
|
||||||
return (
|
return (
|
||||||
<td style={designable ? columnOpacityStyle : columnHiddenStyle}>
|
<td style={designable ? columnOpacityStyle : columnHiddenStyle}>
|
||||||
{designable ? props.children : <span style={displayNone}>{props.children}</span>}
|
{designable ? props.children : <span style={displayNone}>{props.children}</span>}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user