mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix: compatibility issues with historical kanban and iframe block (#4587)
* fix: iframe params undefined * fix: kanban fixed block * fix: kanban fixed block * fix: kanban fixed block * fix: kanban fixed block
This commit is contained in:
parent
cf740897cc
commit
17edad6014
@ -53,16 +53,7 @@ export const FixedBlockWrapper: React.FC = (props) => {
|
||||
* isPopup means that the FixedBlock is in the popup mode
|
||||
*/
|
||||
if (!fixedBlock && fixedBlockUID) return <>{props.children}</>;
|
||||
return (
|
||||
<div
|
||||
className="nb-fixed-block"
|
||||
style={{
|
||||
height: fixedBlockUID ? `calc(100vh - ${height})` : undefined,
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
return <div className="nb-fixed-block">{props.children}</div>;
|
||||
};
|
||||
|
||||
export interface FixedBlockProps {
|
||||
@ -99,14 +90,7 @@ export const FixedBlock: React.FC<FixedBlockProps> = (props) => {
|
||||
};
|
||||
return (
|
||||
<FixedBlockContext.Provider value={{ inFixedBlock: true, height, setFixedBlock, fixedBlockUID, fixedBlockUIDRef }}>
|
||||
<div
|
||||
className={fixedBlockUID ? fixedBlockCss : ''}
|
||||
style={{
|
||||
height: fixedBlockUID ? `calc(100vh - ${height})` : undefined,
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
</div>
|
||||
<div className={fixedBlockUID ? fixedBlockCss : ''}>{props.children}</div>
|
||||
</FixedBlockContext.Provider>
|
||||
);
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ export const Iframe: any = observer(
|
||||
try {
|
||||
const tempUrl = await replaceVariableValue(url, variables, localVariables);
|
||||
const queryString = await parseVariablesAndChangeParamsToQueryString({
|
||||
searchParams: params,
|
||||
searchParams: params || [],
|
||||
variables,
|
||||
localVariables,
|
||||
replaceVariableValue,
|
||||
|
@ -60,7 +60,7 @@ const InternalKanbanBlockProvider = (props) => {
|
||||
service,
|
||||
resource,
|
||||
groupField,
|
||||
fixedBlock: field?.decoratorProps?.fixedBlock,
|
||||
// fixedBlock: field?.decoratorProps?.fixedBlock,
|
||||
sortField: props?.sortField,
|
||||
}}
|
||||
>
|
||||
|
@ -28,7 +28,7 @@ export const useKanbanBlockHeight = () => {
|
||||
|
||||
const blockTitleHeaderHeight = title ? token.fontSizeLG * token.lineHeightLG + token.padding * 2 - 1 : 0;
|
||||
|
||||
const footerheight = token.padding + 2 * token.marginSM + token.paddingLG + 10;
|
||||
const footerheight = token.padding + 2 * token.marginSM + token.paddingLG + (designable ? 0 : 10);
|
||||
|
||||
return height - actionBarHeight - kanbanHeaderHeight - footerheight - blockTitleHeaderHeight;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user