mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 17:08:14 +00:00
feat: 新增enableLockedNodeSetting,支持设置容器锁定是属性仍然可以设置
This commit is contained in:
parent
8c8d2799d6
commit
09785db2a2
@ -56,6 +56,10 @@ export interface EngineOptions {
|
||||
* 打开画布的锁定操作,默认值:false
|
||||
*/
|
||||
enableCanvasLock?: boolean;
|
||||
/**
|
||||
* 容器锁定后,容器本身是否可以设置属性,仅当画布锁定特性开启时生效, 默认值为:false
|
||||
*/
|
||||
enableLockedNodeSetting?: boolean;
|
||||
/**
|
||||
* 当选中节点切换时,是否停留在相同的设置 tab 上,默认值:false
|
||||
*/
|
||||
|
||||
@ -7,6 +7,7 @@ import { SettingsPane } from './settings-pane';
|
||||
import { StageBox } from '../stage-box';
|
||||
import { SkeletonContext } from '../../context';
|
||||
import { createIcon } from '@ali/lowcode-utils';
|
||||
|
||||
@observer
|
||||
export class SettingsPrimaryPane extends Component<{ editor: Editor; config: any }, { shouldIgnoreRoot: boolean }> {
|
||||
state = {
|
||||
@ -67,7 +68,7 @@ export class SettingsPrimaryPane extends Component<{ editor: Editor; config: any
|
||||
const designer = editor.get('designer');
|
||||
const current = designer?.currentSelection?.getNodes()?.[0];
|
||||
let node: Node | null = settings.first;
|
||||
const focusNode = node.document.focusNode;
|
||||
const { focusNode } = node.document;
|
||||
|
||||
const items = [];
|
||||
let l = 3;
|
||||
@ -138,7 +139,8 @@ export class SettingsPrimaryPane extends Component<{ editor: Editor; config: any
|
||||
);
|
||||
}
|
||||
|
||||
if (settings.isLocked) {
|
||||
// 当节点被锁定,且未开启锁定后容器可设置属性
|
||||
if (settings.isLocked && !engineConfig.get('enableLockedNodeSetting', false)) {
|
||||
return (
|
||||
<div className="lc-settings-main">
|
||||
<div className="lc-settings-notice">
|
||||
@ -147,7 +149,6 @@ export class SettingsPrimaryPane extends Component<{ editor: Editor; config: any
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (Array.isArray(settings.items) && settings.items.length === 0) {
|
||||
return (
|
||||
<div className="lc-settings-main">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user