update at 2025-10-13 20:53:32

This commit is contained in:
douboer
2025-10-13 20:53:32 +08:00
parent 97a70bc23b
commit b9feb2f764
2 changed files with 7 additions and 4 deletions

View File

@@ -183,7 +183,7 @@ export class XiaohongshuPreview {
this.articleHTML = articleHTML;
this.currentFile = file;
new Notice('正在分页...');
//new Notice('正在分页...');
// 创建临时容器用于分页
const tempContainer = document.createElement('div');
@@ -200,7 +200,7 @@ export class XiaohongshuPreview {
// 在分页前先应用主题与高亮,确保测量使用正确样式
this.applyThemeCSS();
this.pages = await paginateArticle(tempContainer, this.settings);
new Notice(`分页完成:共 ${this.pages.length}`);
//new Notice(`分页完成:共 ${this.pages.length} 页`);
this.currentPageIndex = 0;
// 初次渲染时应用当前主题
@@ -520,7 +520,7 @@ export class XiaohongshuPreview {
if (!this.articleHTML) return;
const totalBefore = this.pages.length || 1;
const posRatio = (this.currentPageIndex + 0.5) / totalBefore; // 以当前页中心作为相对位置
new Notice('重新分页中...');
//new Notice('重新分页中...');
const tempContainer = document.createElement('div');
tempContainer.innerHTML = this.articleHTML;
@@ -539,7 +539,7 @@ export class XiaohongshuPreview {
this.currentPageIndex = 0;
}
this.renderCurrentPage();
new Notice(`重新分页完成:共 ${this.pages.length}`);
//new Notice(`重新分页完成:共 ${this.pages.length} 页`);
} catch (e) {
console.error('重新分页失败', e);
new Notice('重新分页失败');