mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
feat: add hideComponentAction config
This commit is contained in:
parent
e1f3a11c41
commit
c24c3d8ae5
@ -216,6 +216,12 @@ config.set('enableCondition', false)
|
|||||||
|
|
||||||
是否在只有一个 item 的时候隐藏设置 tabs
|
是否在只有一个 item 的时候隐藏设置 tabs
|
||||||
|
|
||||||
|
#### hideComponentAction
|
||||||
|
|
||||||
|
`@type {boolean}` `@default {false}`
|
||||||
|
|
||||||
|
隐藏设计器辅助层
|
||||||
|
|
||||||
#### thisRequiredInJSE
|
#### thisRequiredInJSE
|
||||||
|
|
||||||
`@type {boolean}` `@default {true}`
|
`@type {boolean}` `@default {true}`
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import {
|
|||||||
ComponentType,
|
ComponentType,
|
||||||
} from 'react';
|
} from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { observer, computed, Tip } from '@alilc/lowcode-editor-core';
|
import { observer, computed, Tip, engineConfig } from '@alilc/lowcode-editor-core';
|
||||||
import { createIcon, isReactComponent, isActionContentObject } from '@alilc/lowcode-utils';
|
import { createIcon, isReactComponent, isActionContentObject } from '@alilc/lowcode-utils';
|
||||||
import { IPublicTypeActionContentObject } from '@alilc/lowcode-types';
|
import { IPublicTypeActionContentObject } from '@alilc/lowcode-types';
|
||||||
import { BuiltinSimulatorHost } from '../host';
|
import { BuiltinSimulatorHost } from '../host';
|
||||||
@ -47,14 +47,18 @@ export class BorderSelectingInstance extends Component<{
|
|||||||
});
|
});
|
||||||
|
|
||||||
const { hideSelectTools } = observed.node.componentMeta.advanced;
|
const { hideSelectTools } = observed.node.componentMeta.advanced;
|
||||||
|
const hideComponentAction = engineConfig.get('hideComponentAction');
|
||||||
|
|
||||||
if (hideSelectTools) {
|
if (hideSelectTools) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={className} style={style}>
|
<div
|
||||||
{!dragging && <Toolbar observed={observed} />}
|
className={className}
|
||||||
|
style={style}
|
||||||
|
>
|
||||||
|
{(!dragging && !hideComponentAction) ? <Toolbar observed={observed} /> : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -159,6 +159,11 @@ const VALID_ENGINE_OPTIONS = {
|
|||||||
type: 'function',
|
type: 'function',
|
||||||
description: '应用级设计模式下,窗口为空时展示的占位组件',
|
description: '应用级设计模式下,窗口为空时展示的占位组件',
|
||||||
},
|
},
|
||||||
|
hideComponentAction: {
|
||||||
|
type: 'boolean',
|
||||||
|
description: '是否隐藏设计器辅助层',
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const getStrictModeValue = (engineOptions: IPublicTypeEngineOptions, defaultValue: boolean): boolean => {
|
const getStrictModeValue = (engineOptions: IPublicTypeEngineOptions, defaultValue: boolean): boolean => {
|
||||||
|
|||||||
@ -177,6 +177,12 @@ export interface IPublicTypeEngineOptions {
|
|||||||
* 应用级设计模式下,自动打开第一个窗口
|
* 应用级设计模式下,自动打开第一个窗口
|
||||||
*/
|
*/
|
||||||
enableAutoOpenFirstWindow?: boolean;
|
enableAutoOpenFirstWindow?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @default false
|
||||||
|
* 隐藏设计器辅助层
|
||||||
|
*/
|
||||||
|
hideComponentAction?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user