mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-10 18:03:01 +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
|
||||
|
||||
#### hideComponentAction
|
||||
|
||||
`@type {boolean}` `@default {false}`
|
||||
|
||||
隐藏设计器辅助层
|
||||
|
||||
#### thisRequiredInJSE
|
||||
|
||||
`@type {boolean}` `@default {true}`
|
||||
|
||||
@ -9,7 +9,7 @@ import {
|
||||
ComponentType,
|
||||
} from 'react';
|
||||
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 { IPublicTypeActionContentObject } from '@alilc/lowcode-types';
|
||||
import { BuiltinSimulatorHost } from '../host';
|
||||
@ -47,14 +47,18 @@ export class BorderSelectingInstance extends Component<{
|
||||
});
|
||||
|
||||
const { hideSelectTools } = observed.node.componentMeta.advanced;
|
||||
const hideComponentAction = engineConfig.get('hideComponentAction');
|
||||
|
||||
if (hideSelectTools) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={className} style={style}>
|
||||
{!dragging && <Toolbar observed={observed} />}
|
||||
<div
|
||||
className={className}
|
||||
style={style}
|
||||
>
|
||||
{(!dragging && !hideComponentAction) ? <Toolbar observed={observed} /> : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -159,6 +159,11 @@ const VALID_ENGINE_OPTIONS = {
|
||||
type: 'function',
|
||||
description: '应用级设计模式下,窗口为空时展示的占位组件',
|
||||
},
|
||||
hideComponentAction: {
|
||||
type: 'boolean',
|
||||
description: '是否隐藏设计器辅助层',
|
||||
default: false,
|
||||
},
|
||||
};
|
||||
|
||||
const getStrictModeValue = (engineOptions: IPublicTypeEngineOptions, defaultValue: boolean): boolean => {
|
||||
|
||||
@ -177,6 +177,12 @@ export interface IPublicTypeEngineOptions {
|
||||
* 应用级设计模式下,自动打开第一个窗口
|
||||
*/
|
||||
enableAutoOpenFirstWindow?: boolean;
|
||||
|
||||
/**
|
||||
* @default false
|
||||
* 隐藏设计器辅助层
|
||||
*/
|
||||
hideComponentAction?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user