Home > SYS_PanelControl > toggleBottomPanelLockState
SYS_PanelControl.toggleBottomPanelLockState() method
Toggle the lock state of the bottom panel
Signature
typescript
function toggleBottomPanelLockState(state?: boolean): void;1
Parameters
Parameter | Type | Description |
|---|---|---|
state | boolean | (Optional) Whether to lock. If not specified, the current state is inverted |
Returns
void
Example
javascript
// 1. 记录当前锁定状态(异步查询,需要 await)
const before = await eda.sys_PanelControl.isBottomPanelLocked();
// 2. 切换到相反状态(显式传目标值;不传参数则直接反转当前状态)
eda.sys_PanelControl.toggleBottomPanelLockState(!before);
// 3. 验证切换已生效
const after = await eda.sys_PanelControl.isBottomPanelLocked();
console.log('切换前:', before, '切换后:', after);
// 4. 恢复原始锁定状态(不留痕迹,保证案例可重复运行)
eda.sys_PanelControl.toggleBottomPanelLockState(before);
console.log('已恢复原锁定状态:', before);1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13