必须套索之后才能调用该接口,否则会调用失败。
返回
APIResponse<boolean>:result === true表示设置成功
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
设置套索框状态。
static setLassoBoxState(state: number): Promise<APIResponse<boolean>>;
| 参数 | 类型 | 说明 |
|---|---|---|
state | number | 0 显示,1 隐藏,2 完全移除,3 完全隐藏(包含套索元素),便于自定义工具条 |
APIResponse<boolean>:
result === true 表示设置成功import { PluginCommAPI } from 'sn-plugin-lib';
/**
* 设置套索框状态的示例。
*/
export async function exampleSetLassoBoxState() {
const res = await PluginCommAPI.setLassoBoxState(1);
if (!res.success) {
throw new Error(res.error?.message ?? 'setLassoBoxState 调用失败');
}
return res.result;
}