Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
查询当前视图是否支持电磁笔手写。
result === false
static canHandwrite(): Promise<APIResponse<boolean>>;
APIResponse<boolean>
result === true
import { PluginCommAPI } from 'sn-plugin-lib'; /** * 进入书写流程前,先确认当前视图是否可手写。 */ export async function exampleCanHandwrite() { const res = await PluginCommAPI.canHandwrite(); if (!res.success) { console.log('canHandwrite failed', res.error); throw new Error(res.error?.message ?? 'canHandwrite 调用失败'); } if (!res.result) { console.log('current view cannot handwrite'); return false; } return true; }