fix: height calculation for full-height tabs in approval initiation and approval block (#4686)

This commit is contained in:
Katherine 2024-06-18 16:42:32 +08:00 committed by GitHub
parent bb82faf583
commit 8a7e86fdd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View File

@ -181,7 +181,7 @@ export const MarkdownVoid: any = withDynamicSchemaProps(
) : ( ) : (
<div <div
className={cls([componentCls, hashId, 'nb-markdown nb-markdown-default nb-markdown-table', className])} className={cls([componentCls, hashId, 'nb-markdown nb-markdown-default nb-markdown-table', className])}
style={{ ...props.style, height: height || '100%' }} style={{ ...props.style, height: height || '100%', overflowY: height ? 'auto' : 'null' }}
dangerouslySetInnerHTML={{ __html: html }} dangerouslySetInnerHTML={{ __html: html }}
/> />
); );

View File

@ -49,7 +49,7 @@ const usePageFullScreenHeight = (props?) => {
const { token } = theme.useToken(); const { token } = theme.useToken();
const { designable } = useDesignable(); const { designable } = useDesignable();
const { heightProps } = useBlockHeightProps(); const { heightProps } = useBlockHeightProps();
const { disablePageHeader, enablePageTabs, hidePageTitle } = heightProps || props || {}; const { disablePageHeader, enablePageTabs, hidePageTitle } = props || heightProps || {};
const navHeight = token.sizeXXL - 2; const navHeight = token.sizeXXL - 2;
const addBlockBtnHeight = designable const addBlockBtnHeight = designable
? token.controlHeight + 2 * token.paddingContentHorizontalLG ? token.controlHeight + 2 * token.paddingContentHorizontalLG
@ -90,7 +90,7 @@ const useTableHeight = () => {
const { designable } = useDesignable(); const { designable } = useDesignable();
const schema = useFieldSchema(); const schema = useFieldSchema();
const heightProps = tableHeightProps || blockHeightProps; const heightProps = tableHeightProps || blockHeightProps;
const pageFullScreenHeight = useFullScreenHeight(); const pageFullScreenHeight = useFullScreenHeight(heightProps);
const { data } = useDataBlockRequest(); const { data } = useDataBlockRequest();
const { name } = useCollection(); const { name } = useCollection();
const { count, pageSize } = (data as any)?.meta || ({} as any); const { count, pageSize } = (data as any)?.meta || ({} as any);

View File

@ -56,9 +56,12 @@ export const SchemaSettingsBlockHeightItem = function BlockTitleItem() {
'x-component': 'InputNumber', 'x-component': 'InputNumber',
'x-component-props': { 'x-component-props': {
addonAfter: 'px', addonAfter: 'px',
min: 250,
max: 2000,
}, },
'x-validator': [
{
minimum: 200,
},
],
'x-reactions': { 'x-reactions': {
dependencies: ['heightMode'], dependencies: ['heightMode'],
fulfill: { fulfill: {