update at 2025-10-13 20:53:32
This commit is contained in:
@@ -183,7 +183,7 @@ export class XiaohongshuPreview {
|
|||||||
this.articleHTML = articleHTML;
|
this.articleHTML = articleHTML;
|
||||||
this.currentFile = file;
|
this.currentFile = file;
|
||||||
|
|
||||||
new Notice('正在分页...');
|
//new Notice('正在分页...');
|
||||||
|
|
||||||
// 创建临时容器用于分页
|
// 创建临时容器用于分页
|
||||||
const tempContainer = document.createElement('div');
|
const tempContainer = document.createElement('div');
|
||||||
@@ -200,7 +200,7 @@ export class XiaohongshuPreview {
|
|||||||
// 在分页前先应用主题与高亮,确保测量使用正确样式
|
// 在分页前先应用主题与高亮,确保测量使用正确样式
|
||||||
this.applyThemeCSS();
|
this.applyThemeCSS();
|
||||||
this.pages = await paginateArticle(tempContainer, this.settings);
|
this.pages = await paginateArticle(tempContainer, this.settings);
|
||||||
new Notice(`分页完成:共 ${this.pages.length} 页`);
|
//new Notice(`分页完成:共 ${this.pages.length} 页`);
|
||||||
|
|
||||||
this.currentPageIndex = 0;
|
this.currentPageIndex = 0;
|
||||||
// 初次渲染时应用当前主题
|
// 初次渲染时应用当前主题
|
||||||
@@ -520,7 +520,7 @@ export class XiaohongshuPreview {
|
|||||||
if (!this.articleHTML) return;
|
if (!this.articleHTML) return;
|
||||||
const totalBefore = this.pages.length || 1;
|
const totalBefore = this.pages.length || 1;
|
||||||
const posRatio = (this.currentPageIndex + 0.5) / totalBefore; // 以当前页中心作为相对位置
|
const posRatio = (this.currentPageIndex + 0.5) / totalBefore; // 以当前页中心作为相对位置
|
||||||
new Notice('重新分页中...');
|
//new Notice('重新分页中...');
|
||||||
|
|
||||||
const tempContainer = document.createElement('div');
|
const tempContainer = document.createElement('div');
|
||||||
tempContainer.innerHTML = this.articleHTML;
|
tempContainer.innerHTML = this.articleHTML;
|
||||||
@@ -539,7 +539,7 @@ export class XiaohongshuPreview {
|
|||||||
this.currentPageIndex = 0;
|
this.currentPageIndex = 0;
|
||||||
}
|
}
|
||||||
this.renderCurrentPage();
|
this.renderCurrentPage();
|
||||||
new Notice(`重新分页完成:共 ${this.pages.length} 页`);
|
//new Notice(`重新分页完成:共 ${this.pages.length} 页`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('重新分页失败', e);
|
console.error('重新分页失败', e);
|
||||||
new Notice('重新分页失败');
|
new Notice('重新分页失败');
|
||||||
|
|||||||
@@ -138,6 +138,9 @@ SOLVE:obsidian控制台打印信息,定位在哪里阻塞,AI修复。
|
|||||||
10. 新建docs文件夹,把除了README和todolist以外的markdown文件放到docs中。
|
10. 新建docs文件夹,把除了README和todolist以外的markdown文件放到docs中。
|
||||||
✅
|
✅
|
||||||
|
|
||||||
|
11. `` -- 不应该渲染为图片链接
|
||||||
|
|
||||||
|
|
||||||
## 经验
|
## 经验
|
||||||
1. 在不确定AI是否理解,或者需求是否准确的情况下,先用codex chat模式提问,看回答确定AI理解是否准确。
|
1. 在不确定AI是否理解,或者需求是否准确的情况下,先用codex chat模式提问,看回答确定AI理解是否准确。
|
||||||
尤其对于较大规模的重构需求,这点很重要 ‼️ 。
|
尤其对于较大规模的重构需求,这点很重要 ‼️ 。
|
||||||
|
|||||||
Reference in New Issue
Block a user