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
|
* isPopup means that the FixedBlock is in the popup mode
|
||||||
*/
|
*/
|
||||||
if (!fixedBlock && fixedBlockUID) return <>{props.children}</>;
|
if (!fixedBlock && fixedBlockUID) return <>{props.children}</>;
|
||||||
return (
|
return <div className="nb-fixed-block">{props.children}</div>;
|
||||||
<div
|
|
||||||
className="nb-fixed-block"
|
|
||||||
style={{
|
|
||||||
height: fixedBlockUID ? `calc(100vh - ${height})` : undefined,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface FixedBlockProps {
|
export interface FixedBlockProps {
|
||||||
@ -99,14 +90,7 @@ export const FixedBlock: React.FC<FixedBlockProps> = (props) => {
|
|||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<FixedBlockContext.Provider value={{ inFixedBlock: true, height, setFixedBlock, fixedBlockUID, fixedBlockUIDRef }}>
|
<FixedBlockContext.Provider value={{ inFixedBlock: true, height, setFixedBlock, fixedBlockUID, fixedBlockUIDRef }}>
|
||||||
<div
|
<div className={fixedBlockUID ? fixedBlockCss : ''}>{props.children}</div>
|
||||||
className={fixedBlockUID ? fixedBlockCss : ''}
|
|
||||||
style={{
|
|
||||||
height: fixedBlockUID ? `calc(100vh - ${height})` : undefined,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
</FixedBlockContext.Provider>
|
</FixedBlockContext.Provider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -63,7 +63,7 @@ export const Iframe: any = observer(
|
|||||||
try {
|
try {
|
||||||
const tempUrl = await replaceVariableValue(url, variables, localVariables);
|
const tempUrl = await replaceVariableValue(url, variables, localVariables);
|
||||||
const queryString = await parseVariablesAndChangeParamsToQueryString({
|
const queryString = await parseVariablesAndChangeParamsToQueryString({
|
||||||
searchParams: params,
|
searchParams: params || [],
|
||||||
variables,
|
variables,
|
||||||
localVariables,
|
localVariables,
|
||||||
replaceVariableValue,
|
replaceVariableValue,
|
||||||
|
@ -60,7 +60,7 @@ const InternalKanbanBlockProvider = (props) => {
|
|||||||
service,
|
service,
|
||||||
resource,
|
resource,
|
||||||
groupField,
|
groupField,
|
||||||
fixedBlock: field?.decoratorProps?.fixedBlock,
|
// fixedBlock: field?.decoratorProps?.fixedBlock,
|
||||||
sortField: props?.sortField,
|
sortField: props?.sortField,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -28,7 +28,7 @@ export const useKanbanBlockHeight = () => {
|
|||||||
|
|
||||||
const blockTitleHeaderHeight = title ? token.fontSizeLG * token.lineHeightLG + token.padding * 2 - 1 : 0;
|
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;
|
return height - actionBarHeight - kanbanHeaderHeight - footerheight - blockTitleHeaderHeight;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user