GeezerVison is showing github.com — feat: add hideComponentAction config · Devancn/lowcode-engine@c24c3d8
File treeExpand file treeCollapse file tree Open diff view settings designer/src/builtin-simulator/bem-tools
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: docs/docs/api/configOptions.md +6Lines changed: 6 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -216,6 +216,12 @@ config.set('enableCondition', false) | 216 | 216 |
| 217 | 217 | 是否在只有一个 item 的时候隐藏设置 tabs | 218 | 218 |
| | 219 | +#### hideComponentAction | | 220 | + | | 221 | +`@type {boolean}` `@default {false}` | | 222 | + | | 223 | +隐藏设计器辅助层 | | 224 | + | 219 | 225 | #### thisRequiredInJSE | 220 | 226 |
| 221 | 227 | `@type {boolean}` `@default {true}` | |
Collapse file Copy file name to clipboardExpand all lines: packages/designer/src/builtin-simulator/bem-tools/border-selecting.tsx +7-3Lines changed: 7 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | ComponentType, | 10 | 10 | } from 'react'; | 11 | 11 | import classNames from 'classnames'; | 12 | | -import { observer, computed, Tip } from '@alilc/lowcode-editor-core'; | | 12 | +import { observer, computed, Tip, engineConfig } from '@alilc/lowcode-editor-core'; | 13 | 13 | import { createIcon, isReactComponent, isActionContentObject } from '@alilc/lowcode-utils'; | 14 | 14 | import { IPublicTypeActionContentObject } from '@alilc/lowcode-types'; | 15 | 15 | import { BuiltinSimulatorHost } from '../host'; | @@ -47,14 +47,18 @@ export class BorderSelectingInstance extends Component<{ | 47 | 47 | }); | 48 | 48 |
| 49 | 49 | const { hideSelectTools } = observed.node.componentMeta.advanced; | | 50 | + const hideComponentAction = engineConfig.get('hideComponentAction'); | 50 | 51 |
| 51 | 52 | if (hideSelectTools) { | 52 | 53 | return null; | 53 | 54 | } | 54 | 55 |
| 55 | 56 | return ( | 56 | | - <div className={className} style={style}> | 57 | | - {!dragging && <Toolbar observed={observed} />} | | 57 | + <div | | 58 | + className={className} | | 59 | + style={style} | | 60 | + > | | 61 | + {(!dragging && !hideComponentAction) ? <Toolbar observed={observed} /> : null} | 58 | 62 | </div> | 59 | 63 | ); | 60 | 64 | } | |
Collapse file Copy file name to clipboardExpand all lines: packages/editor-core/src/config.ts +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -159,6 +159,11 @@ const VALID_ENGINE_OPTIONS = { | 159 | 159 | type: 'function', | 160 | 160 | description: '应用级设计模式下,窗口为空时展示的占位组件', | 161 | 161 | }, | | 162 | + hideComponentAction: { | | 163 | + type: 'boolean', | | 164 | + description: '是否隐藏设计器辅助层', | | 165 | + default: false, | | 166 | + }, | 162 | 167 | }; | 163 | 168 |
| 164 | 169 | const getStrictModeValue = (engineOptions: IPublicTypeEngineOptions, defaultValue: boolean): boolean => { | |
Collapse file Copy file name to clipboardExpand all lines: packages/types/src/shell/type/engine-options.ts +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -177,6 +177,12 @@ export interface IPublicTypeEngineOptions { | 177 | 177 | * 应用级设计模式下,自动打开第一个窗口 | 178 | 178 | */ | 179 | 179 | enableAutoOpenFirstWindow?: boolean; | | 180 | + | | 181 | + /** | | 182 | + * @default false | | 183 | + * 隐藏设计器辅助层 | | 184 | + */ | | 185 | + hideComponentAction?: boolean; | 180 | 186 | } | 181 | 187 |
| 182 | 188 | /** | |
|