看到一堆 “没有内容”, 那大概率就是 dv.paragraph(note.text || "没有内容");
出错了
实际并没有这个 note.text
可以搜搜论坛里一般怎么读笔记正文文本
有不少办法, app.vault.cachedRead(file)
以及 dv.io.load(path)
等等
这一段大致应该是
if (notes.length > 0) {
await notes.map(async note => {
// ^^^^^ 别忘了加 async
const content = await dv.io.load(note.file.path);
dv.header(3, note.file.link); // 显示笔记标题
dv.paragraph(content || "没有内容"); // 尝试显示内容
});
}