mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 17:08:14 +00:00
feat: 支持设置切换节点时, 设置区tab是否停留在原位置, 默认回到第一个
This commit is contained in:
parent
a68eaf902f
commit
87b57ab4f1
@ -55,6 +55,10 @@ export interface EngineOptions {
|
||||
* 打开画布的锁定操作,默认值:false
|
||||
*/
|
||||
enableCanvasLock: boolean;
|
||||
/**
|
||||
* 当选中节点切换时,是否停留在相同的设置 tab 上,默认值:false
|
||||
*/
|
||||
stayOnTheSameSettingTab: boolean;
|
||||
/**
|
||||
* Vision-polyfill settings
|
||||
*/
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import React, { Component } from 'react';
|
||||
import { Tab, Breadcrumb } from '@alifd/next';
|
||||
import { Title, observer, Editor, obx, globalContext } from '@ali/lowcode-editor-core';
|
||||
import { Title, observer, Editor, obx, globalContext, engineConfig } from '@ali/lowcode-editor-core';
|
||||
import { Node, isSettingField, SettingField, Designer } from '@ali/lowcode-designer';
|
||||
import { SettingsMain } from './main';
|
||||
import { SettingsPane } from './settings-pane';
|
||||
@ -24,7 +24,9 @@ export class SettingsPrimaryPane extends Component<{ editor: Editor; config: any
|
||||
this.setShouldIgnoreRoot();
|
||||
|
||||
this.props.editor.on('designer.selection.change', () => {
|
||||
this._activeKey = null;
|
||||
if (!engineConfig.get('stayOnTheSameSettingTab', false)) {
|
||||
this._activeKey = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user