SDK 文档版本:v0.1.25
获取笔记的页面图层数据。
static getLayers(notePath: string, page: number): Promise<APIResponse<Layer[]>>;
notePath
string
page
number
APIResponse<Layer[]>
result
import { PluginFileAPI } from 'sn-plugin-lib'; /** * 获取页面图层数据的示例。 */ export async function exampleGetLayers() { const notePath = '/storage/emulated/0/Note/demo.note'; const page = 1; const res = await PluginFileAPI.getLayers(notePath, page); if (!res.success) { throw new Error(res.error?.message ?? 'getLayers 调用失败'); } return res.result; }